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

Building "examples/MyLib" fails on macOS #928

Closed
densmojd opened this issue Mar 15, 2024 · 1 comment
Closed

Building "examples/MyLib" fails on macOS #928

densmojd opened this issue Mar 15, 2024 · 1 comment

Comments

@densmojd
Copy link

Attempting to build "examples/MyLib" on macOS (Ventura 13.6.5) fails with "ERROR: System image file failed consistency check: maybe opened the wrong version?"

(I was trying to use PackageCompiler.jl for my own package, got the same error, so I thought I start with the example from the documentation.)

Here's all the output:

/Users/jdd/work/julia_playground/MyLib>make
julia --startup-file=no --project=. -e 'using Pkg; Pkg.instantiate()'
julia --startup-file=no --project=build -e 'using Pkg; Pkg.instantiate(); include("build/build.jl")'
Creating library in /Users/jdd/work/julia_playground/MyLib/build/../MyLibCompiled
PackageCompiler: bundled libraries:
  ├── Base:
  │    ├── libLLVM.dylib - 54.815 MiB
  │    ├── libatomic.1.dylib - 67.109 KiB
  │    ├── libdSFMT.dylib - 45.453 KiB
  │    ├── libgcc_s.1.1.dylib - 172.844 KiB
  │    ├── libgcc_s.1.dylib - 41.750 KiB
  │    ├── libgfortran.5.dylib - 3.292 MiB
  │    ├── libgmp.10.dylib - 676.188 KiB
  │    ├── libgmpxx.4.dylib - 60.391 KiB
  │    ├── libgomp.1.dylib - 428.344 KiB
  │    ├── libjulia-codegen.1.10.2.dylib - 2.111 MiB
  │    ├── libjulia-internal.1.10.2.dylib - 4.820 MiB
  │    ├── libmpfr.6.dylib - 573.312 KiB
  │    ├── libopenlibm.4.0.dylib - 185.875 KiB
  │    ├── libpcre2-8.0.dylib - 835.812 KiB
  │    ├── libquadmath.0.dylib - 355.469 KiB
  │    ├── libssp.0.dylib - 35.578 KiB
  │    ├── libstdc++.6.dylib - 3.901 MiB
  │    ├── libuv.2.dylib - 326.609 KiB
  │    ├── libz.1.2.13.dylib - 127.500 KiB
  │    ├── libunwind.1.0.dylib - 73.594 KiB
  │    ├── libjulia.1.10.2.dylib - 229.812 KiB
  ├── Stdlibs:
  Total library file size: 73.075 MiB
✔ [02m:15s] PackageCompiler: creating compiler .ji image (incremental=false)
✔ [03m:15s] PackageCompiler: compiling fresh sysimage (incremental=false)
ERROR: System image file failed consistency check: maybe opened the wrong version?
ERROR: LoadError: failed process: Process(setenv(`/Applications/Julia-1.10.app/Contents/Resources/julia/bin/julia --color=yes --startup-file=no --pkgimages=no --sysimage=/var/folders/59/24q4kjgn0h76jkmgtpd77k680000gp/T/jl_pNoauH/sys.dylib --compile=all --trace-compile=/var/folders/59/24q4kjgn0h76jkmgtpd77k680000gp/T/jl_packagecompiler_3SGdo4/jl_TPN4Gx -e ''`,["XPC_FLAGS=0x0", "MFLAGS=", "PATH=/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin", "MAKELEVEL=1", "PWD=/Users/jdd/work/julia_playground/MyLib", "DISPLAY=/private/tmp/com.apple.launchd.1xuiW08J12/org.xquartz:0", "XPC_SERVICE_NAME=0", "TERM_PROGRAM=Apple_Terminal", "MAKEFLAGS=", "SHELL=/bin/tcsh"  …  "TERM_SESSION_ID=CA2B1E73-94C5-48CC-963F-1FAB0C0F3FE7", "JULIA_LOAD_PATH=/Users/jdd/work/julia_playground/MyLib:@stdlib", "OPENBLAS_DEFAULT_NUM_THREADS=1", "USER=jdd", "HOME=/Users/jdd", "TERM=xterm-256color", "TERM_PROGRAM_VERSION=447.1", "OPENBLAS_MAIN_FREE=1", "HOSTTYPE=amd", "GROUP=staff"]), ProcessExited(1)) [1]

Stacktrace:
  [1] pipeline_error
    @ ./process.jl:565 [inlined]
  [2] run(::Cmd; wait::Bool)
    @ Base ./process.jl:480
  [3] run
    @ ./process.jl:477 [inlined]
  [4] run_precompilation_script(project::String, sysimg::String, precompile_file::Nothing, precompile_dir::String)
    @ PackageCompiler ~/.julia/packages/PackageCompiler/nT5sD/src/PackageCompiler.jl:306
  [5] create_sysimg_object_file(object_file::String, packages::Vector{String}, packages_sysimg::Set{Base.PkgId}; project::String, base_sysimage::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, extra_precompiles::String, incremental::Bool)
    @ PackageCompiler ~/.julia/packages/PackageCompiler/nT5sD/src/PackageCompiler.jl:344
  [6] create_sysimg_object_file
    @ ~/.julia/packages/PackageCompiler/nT5sD/src/PackageCompiler.jl:311 [inlined]
  [7] create_sysimage(packages::Vector{String}; sysimage_path::String, project::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, incremental::Bool, filter_stdlibs::Bool, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, include_transitive_dependencies::Bool, base_sysimage::Nothing, julia_init_c_file::Nothing, julia_init_h_file::Nothing, version::Nothing, soname::Nothing, compat_level::String, extra_precompiles::String)
    @ PackageCompiler ~/.julia/packages/PackageCompiler/nT5sD/src/PackageCompiler.jl:628
  [8] create_sysimage_workaround(ctx::Pkg.Types.Context, sysimage_path::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, incremental::Bool, filter_stdlibs::Bool, cpu_target::String; sysimage_build_args::Cmd, include_transitive_dependencies::Bool, julia_init_c_file::String, julia_init_h_file::Vector{String}, version::Nothing, soname::Nothing, script::Nothing, base_sysimage::Nothing)
    @ PackageCompiler ~/.julia/packages/PackageCompiler/nT5sD/src/PackageCompiler.jl:1168
  [9] create_sysimage_workaround
    @ ~/.julia/packages/PackageCompiler/nT5sD/src/PackageCompiler.jl:1146 [inlined]
 [10] create_library(package_or_project::String, dest_dir::String; lib_name::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, incremental::Bool, filter_stdlibs::Bool, force::Bool, header_files::Vector{String}, julia_init_c_file::String, julia_init_h_file::String, version::Nothing, compat_level::String, cpu_target::String, include_lazy_artifacts::Bool, sysimage_build_args::Cmd, include_transitive_dependencies::Bool, include_preferences::Bool, script::Nothing, base_sysimage::Nothing)
    @ PackageCompiler ~/.julia/packages/PackageCompiler/nT5sD/src/PackageCompiler.jl:1093
 [11] top-level scope
    @ ~/work/julia_playground/MyLib/build/build.jl:7
 [12] include(fname::String)
    @ Base.MainInclude ./client.jl:489
 [13] top-level scope
    @ none:1
in expression starting at /Users/jdd/work/julia_playground/MyLib/build/build.jl:7
make: *** [build-library] Error 1

Julia was installed from homebrew (as a cask), and here's the output from versioninfo():

Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (x86_64-apple-darwin22.4.0)
  CPU: 4 × Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
@sjkelly
Copy link
Collaborator

sjkelly commented Mar 18, 2024

Thanks for the report. This seems to be a duplicate of #738

@sjkelly sjkelly closed this as completed Mar 18, 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

2 participants