-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
macOS: System image file fails consistency check on binary startup #738
Comments
Similar issue here on
the app execute smoothly when it is in the folder where it has been compiled but fail with > Code/Julia/PackageCompiler.jl/examples/MyAppCompiled/bin/MyApp
Downloaded artifact: MKL
ARGS = String[]
Base.PROGRAM_FILE = "Code/Julia/PackageCompiler.jl/examples/MyAppCompiled/bin/MyApp"
...
> cp -r Code/Julia/PackageCompiler.jl/examples/MyAppCompiled .
> MyAppCompiled/bin/MyApp
ERROR: System image file failed consistency check: maybe opened the wrong version? |
I'm running into this issue as well, just trying to build any sysimage, e.g.
then
|
Same issue, tried on Julia 1.9.3, 1.9.2, 1.10.0-beta2, all with PackageCompiler version 2.1.9, also tried on Julia 1.9.2 with PackageCompiler version 2.1.7 (the mix I had when I last had it running a few weeks ago), this versioninfo() below is from this latest combination.
|
I'm seeing the same error when building GSEA-MSigDB/GSEA.jl@79364ca |
This happens on macOS only? |
I have only tried on macOS Sonoma 14.0. |
I'm still getting the error on PackageCompiler 2.1.11 (which specifically addresses this issue) on macOS Ventura (13.6). Running Julia 1.8.5, not sure if 1.9 is required for the fix. |
Thanks for reporting. Just to clarify: There is no fix available as of yet (also not in PC v2.1.11) |
Thanks for clarifying! I assumed that the closed issue indicated that it was fixed. Please let me know if I can contribute to a fix in some way. |
At the moment we are lacking an understanding of why the consistency check fails. If you manage to find out about this, we could start looking for a remedy 🙂 |
I was able to build apps using Julia 1.9.0, PackageCompiler 2.1.7, and macOS 13. Recently I upgraded Julia to 1.9.3, PackageCompiler to 2.1.2, and macOS to 14, and the error occurred. I tried to restore Julia to 1.9.0 and PackageCompiler to 2.1.7, and the error still occurs. So I guess macOS should cause it since Xcode Command Line Tools was also upgraded to 15, which is required by PackageCompiler to compile executables. Unfortunately, when I tried to downgrade Xcode Command Line Tools, it warned that older version Xcode C. L. T. can not be installed on macOS 14... And I can not downgrade the OS... :( I would recommend anyone (@jayscook ?) still using macOS 13 try to install an older version (v14.3?)of Xcode. It can be downloaded from: https://developer.apple.com/download/all/ |
i can't build sysimages on apple silicon either. please let me know how i can help fix it. |
I can confirm it is related to |
it really works! but remember to set the compiler to you can specify the compiler by running an export JULIA_CC="gcc-13" |
Great catch! Could you please report which version of clang/gcc you are each using by default on your systems that works (using |
clang v15 from Xcode CLT doesn't work
(clang v14 should work, but older version Xcode CLT can not be installed on latest macOS) gcc v13 from brew works
versioninfo
|
Good catch! I've installed gcc-13 with
|
Since the versions of Julia and LLVM are different, maybe you should try older versions of gcc or upgrade Julia to 1.9. |
Hm, this is unfortunate. It also means we're back to square one, since I don't understand now (again) what the necessary conditions are to trigger the error. |
This is expected as per JuliaLang/julia#49581. You should pick an earlier version of GCC/Clang or newer version of Julia. |
How can we make this work with the latest mac gcc? I would be nice to not have to downgrade. |
TBH, I do not know, since I neither know the rationale behind this check nor do I understand what it actually checks 😅 It seems this check was introduced in JuliaLang/julia@4e7ec79, specifically here. @vtjnash can you maybe shed some light on this and help us understand
|
It simply checks if the symbol |
Thanks for the explanation! So you mean we should set Sorry for the many questions, we just don't have any enough experience to tackle this at the moment. |
See |
I've been trying to reproduce the problem on my M1 Macbook, but without success so far - all my sysimages or apps I build seem to work. @KwatMDPhD @bjarthur @hycakir @ctarn Can someone who had this problem please provide an MWE with a sysimage/app as small as possible and the exact commands you use to build it? In addition, please also post the output of |
Hey folks, I went ahead and opened a PR for @PhilReinhold's fix. I'd love it if someone can review! I haven't contributed here before so please let me know if I'm missing any conventions, considerations, etc. |
I was experiencing the same problem and I can confirm the above fix works on
|
@FerreolS did you ever get resolution for your problem? It seems to be closely-related-yet-distinct from the workarounds mentioned in this thread. After using @PhilReinhold fix I am able to build an app and run it in its build location; but now I am facing your problem where relocating the app causes the I've created a new issue: #943 |
I run into the same problem again... I previously set o_file_flags = Sys.isapple() ? `-Wl,-ld_classic,-all_load $object_files` : `-Wl,--whole-archive $object_files -Wl,--no-whole-archive` Hope we can solve the issue soon.😵💫 |
I have face the same issue, hope it can be fix soon. |
Facing the same issue on x64 machine |
I have released PackageCompiler v2.1.19. This release includes #930. In the macOS CI for this repo, #930 has fixed this bug. As evidence, see:
However, I want to make sure that this release also fixes the bug for people in their local usage. To those following this thread: Can you try out PackageCompiler v2.1.19, and see if it fixes this bug for you in your use cases? |
Sorry but not working for me got an exception. (M1 Mac, macOS Sequoia 15.0.1, Julia 1.11, PackageCompiler 2.1.19) |
at the end of the compilation process i still get this warning (still meaning i see it with #738 (comment) too):
and then when executing one workflow i still (same meaning as above) get haven't tested relocatability by running on a different machine. M2, Sonoma 14.6.1, julia 1.10 |
@bjarthur Just to clarify, with PackageCompiler v2.1.19, you no longer get the @SWSAmor Can you post the full error message that you are getting when you use PackageCompiler v2.1.19? Also, can you try using the PR branch from each of the following PRs, and if you still get an error with those two PRs, post the full error message for each? |
@DilumAluthge Hey, thx for the quick reply! Here's the error message, hope it helps:
Sorry, I'm not at home rn, so I can't run those PR branches yet. I'll give them a try when I get back. Appreciate the help! 👾🖥️ |
@SWSAmor Hmmm, that looks like a different error (not the error in this issue). Can you try with Julia 1.10 and PackageCompiler v2.1.19, and see if you get an error? |
@DilumAluthge It's perfectly build with:
|
Hey @DilumAluthge, @SWSAmor's colleague here. As @SWSAmor said, our project builds well on GitLab's macOS runner with components @SWSAmor mentioned. If I change Julia to 1.10.5 and leave everything else unchanged, I get the following error:
|
correct! |
@zhorvath83 Hmmm, that seems like a different bug, not the bug described in this issue ( Can you open a separate GitHub issue for the bug that you are running into? |
Just to clarify my request, what I'm looking for in this issue is to see if there is anyone that can reproduce the specific bug in this issue (the If you run into a different error while running Package Compiler v2.1.19 or v2.1.20 (but not the |
Upon creating an app, the process goes on smoothly, untill it is time to actually call the binary.
I get the error:
ERROR: System image file failed consistency check: maybe opened the wrong version?
I installed julia through
juliaup
. the juliaup folder is in~/.local/juliaup
and the julia versions in~/.local/julia/juliaup
.the binaries in
~/.local/juliaup/bin
are symlinked to~/.local/bin
which is in thePATH
.I also have julia aliased to
julia --project=@.
Could it be that the symlinking throws some pathing off somewhere?
The text was updated successfully, but these errors were encountered: