Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiled system image incorrect when building on GitHub Action MacOS-latest with Manifest.toml #438

Closed
Roger-luo opened this issue Sep 3, 2020 · 2 comments

Comments

@Roger-luo
Copy link

This happened when I commit the Manifest.toml to the repo and build it using this github Action:
https://github.com/Roger-luo/IonCLI.jl/blob/master/.github/workflows/sysimg.yml

Everything works fine when there was no Manifest.toml in the repo, but when I build with Manifest.toml on GitHub action, after I download the system image and use it locally with -J option, I got

ERROR: could not load library "/Users/jc/.julia/packages/IonCLI/DJ2Ch/deps/lib/libion.dylib"
dlopen(/Users/jc/.julia/packages/IonCLI/DJ2Ch/deps/lib/libion.dylib, 6): no suitable image found.  Did find:
	/Users/jc/.julia/packages/IonCLI/DJ2Ch/deps/lib/libion.dylib: unknown file type, first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	/Users/jc/.julia/packages/IonCLI/DJ2Ch/deps/lib/libion.dylib: stat() failed with errno=38

so I use nm to check if there are any symbols compiled into this system image, but there is no symbols at all, e.g this image

https://github.com/Roger-luo/IonCLI.jl/releases/download/v0.4.6%2B1/ion-1.5.0-darwin-x86_64.tar.gz

I'm not sure if I'm doing something wrong, since the only difference between the working one is a Manifest.toml, the build script basically just calls PackageCompiler.create_sysimage: https://github.com/Roger-luo/Comonicon.jl/blob/master/src/tools/build.jl#L317

and it seems to be MacOS specific, Linux works just fine. However, when I build it locally on my own Macbook, it works fine too. My Macbook has the same MacOS minor version with GitHub Action. So I really have no idea why this doesn't work... Anyone could help me?

@Roger-luo
Copy link
Author

for whoever wants to try themselves, I tagged different versions to build with or without a Manifest.toml:

with Manifest.toml: https://github.com/Roger-luo/IonCLI.jl/releases/tag/v0.4.6
without: https://github.com/Roger-luo/IonCLI.jl/releases/tag/v0.4.5

@Roger-luo
Copy link
Author

I find out why, this is because I was using cpu_target=x86_64 but it seems there are some issues building using this target on github action runners for MacOS. It should use the default app cpu_target suggested by PackageCompiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant