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

macOS: libjulia.dylib version changed from 1.0.0 to 0.0.0, breaking CxxWrap and all (?) JLLs built against libjulia #38782

Closed
fingolfin opened this issue Dec 9, 2020 · 1 comment · Fixed by #38829
Labels
building Build system, or building Julia or its dependencies system:mac Affects only macOS
Milestone

Comments

@fingolfin
Copy link
Contributor

With current master builds, I cannot use CxxWrap on macOS, I get this errror:

julia> using CxxWrap
[ Info: Precompiling CxxWrap [1f15a43c-97ca-5a2a-ae31-89f07a497df4]
ERROR: LoadError: InitError: could not load library "/Users/mhorn/.julia/artifacts/1417b691b9d1117225089c656ede8940fbf2eba8/lib/libcxxwrap_julia.0.8.2.dylib"
dlopen(/Users/mhorn/.julia/artifacts/1417b691b9d1117225089c656ede8940fbf2eba8/lib/libcxxwrap_julia.0.8.2.dylib, 9): Library not loaded: @rpath/libjulia.dylib
  Referenced from: /Users/mhorn/.julia/artifacts/1417b691b9d1117225089c656ede8940fbf2eba8/lib/libcxxwrap_julia.0.8.2.dylib
  Reason: Incompatible library version: libcxxwrap_julia.0.8.2.dylib requires version 1.0.0 or later, but libjulia.dylib provides version 0.0.0
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:114
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:114
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/KuIwt/src/products/library_generators.jl:61 [inlined]
  [4] __init__()
    @ libcxxwrap_julia_jll ~/.julia/packages/libcxxwrap_julia_jll/KSGmQ/src/wrappers/x86_64-apple-darwin.jl:9
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:669
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:755
  [7] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:993
  [8] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:909
  [9] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:896
 [10] include
    @ ./Base.jl:386 [inlined]
 [11] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1208
 [12] top-level scope
    @ none:1
 [13] eval
    @ ./boot.jl:360 [inlined]
 [14] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [15] top-level scope
    @ none:1
during initialization of module libcxxwrap_julia_jll
in expression starting at /Users/mhorn/.julia/packages/CxxWrap/ZOkSN/src/CxxWrap.jl:1
...

Indeed, in my latest master build from an hour or so ago, I see this:

$ otool -L usr/lib/libjulia.dylib
usr/lib/libjulia.dylib:
	@rpath/libjulia.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)

While with a build of the release-1.5 branch, I see this:

$ otool -L usr/lib/libjulia.dylib
usr/lib/libjulia.dylib:
	@rpath/libjulia.dylib (compatibility version 1.0.0, current version 1.5.4)
	@rpath/libosxunwind.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libLLVM.dylib (compatibility version 1.0.0, current version 9.0.1)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1575.17.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)

The same in the latest nightly build:

$ otool -L /Volumes/Julia-1.6.0-DEV-624e734698/Julia-1.6.app/Contents/Resources/julia/lib/libjulia.dylib
/Volumes/Julia-1.6.0-DEV-624e734698/Julia-1.6.app/Contents/Resources/julia/lib/libjulia.dylib:
	@rpath/libjulia.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)

So the compatibility and current version are not set anymore for these builds.

@mgkuhn mgkuhn added building Build system, or building Julia or its dependencies system:mac Affects only macOS labels Dec 9, 2020
@fingolfin
Copy link
Contributor Author

This regression was introduced in commit 2e3364e from PR #38160 by @staticfloat . It is IMHO a blocker for 1.6 and a fix ought to be backported to the release-1.6 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies system:mac Affects only macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants