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

Error when creating a c-callable library on MacOS #932

Closed
roman-schaerer opened this issue Mar 21, 2024 · 3 comments
Closed

Error when creating a c-callable library on MacOS #932

roman-schaerer opened this issue Mar 21, 2024 · 3 comments

Comments

@roman-schaerer
Copy link

I'm using Julia version 1.10.2 on MacOS Sonoma 14.4. When running PackageCompiler.create_library (based on the example code https://github.com/JuliaLang/PackageCompiler.jl/tree/master/examples/MyLib) as

PackageCompiler.create_library(".", target_dir;
                                lib_name="my_lib",
                                precompile_execution_file=["$(@__DIR__)/generate_precompile.jl"],
                                precompile_statements_file=["$(@__DIR__)/additional_precompile.jl"],
                                incremental=false,
                                filter_stdlibs=false,
                                force=true, # Overwrite target_dir.
                                header_files = ["$(@__DIR__)/my_lib.h"],
                            )

the process errors with

ERROR: System image file failed consistency check: maybe opened the wrong version?

The same error occurs for clang 15.0, as well as gcc 13.2.0.

Maybe this issue is related to: #738? There a workaround has been suggested, however I don't know if it is applicable to the create_library function.

@sloede
Copy link
Collaborator

sloede commented Mar 23, 2024

Yes, this is essentially the same issue (which I also encountered). I am looking forward to #930 hopefully fixing it for both.

@DilumAluthge
Copy link
Member

This looks like a duplicate of #738, which should be fixed in the recently-released PackageCompiler v2.1.19.

@roman-schaerer Can you try out PackageCompiler v2.1.19 and let me know if it fixes the bug for you?

If your issue still occurs on PackageCompiler v2.1.19, let me know, and I will re-open this issue.

@DilumAluthge
Copy link
Member

Duplicate of #738

@DilumAluthge DilumAluthge marked this as a duplicate of #738 Oct 16, 2024
@DilumAluthge DilumAluthge closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2024
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

3 participants