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

Restore the version information for libjulia.dylib #38829

Merged

Conversation

fingolfin
Copy link
Contributor

Fixes #38782

This is a bit of a hack, but seems to work on my Mac, but I have not yet tested this on other operating systems. The main question is whether the other non-empty value for JLIBLDFLAGS , namely -Wl,-Bsymbolic-functions, which is used on Linux systems if the linker there supports it. I have no idea what this does; in particular, I don't know if setting it here ...

  1. does not matter,
  2. is incorrect,
  3. fixes another potential bug.

CC @staticfloat

@fingolfin
Copy link
Contributor Author

Note that even with this, there are troubles:

[ Info: Precompiling CxxWrap [1f15a43c-97ca-5a2a-ae31-89f07a497df4]
dyld: lazy symbol binding failed: Symbol not found: _jl_cstr_to_string
  Referenced from: /Users/mhorn/.julia/artifacts/0eb6ffcbe0cde10007a2678013611da80643b728/lib/libcxxwrap_julia.0.8.2.dylib
  Expected in: /Users/mhorn/Projekte/Julia/julia.master/usr/bin/../lib/libjulia.dylib

dyld: Symbol not found: _jl_cstr_to_string
  Referenced from: /Users/mhorn/.julia/artifacts/0eb6ffcbe0cde10007a2678013611da80643b728/lib/libcxxwrap_julia.0.8.2.dylib
  Expected in: /Users/mhorn/Projekte/Julia/julia.master/usr/bin/../lib/libjulia.dylib

@thofma
Copy link
Contributor

thofma commented Dec 12, 2020

Needs the backport label.

@ViralBShah ViralBShah added the backport 1.6 Change should be backported to release-1.6 label Dec 12, 2020
@KristofferC KristofferC mentioned this pull request Dec 14, 2020
53 tasks
@staticfloat
Copy link
Member

@vtjnash do you have any insight into whether -Bsymbolic-functions would interfere with our trampoline symbols?

@vtjnash
Copy link
Member

vtjnash commented Dec 15, 2020

Why not -Bsymbolic? Though I think this may be the same as the protected visibility?

@staticfloat
Copy link
Member

It's not that I want to add these linker commands, it's that they get added as a side-effect of the other flags that are added to libjulia.so through JLIBLDFLAGS.

@fingolfin
Copy link
Contributor Author

Besides all that, even with this PR, I can't use various JLLs which access libjulia.dylib (linked at build time via libjulia_jll) because references to e.g. jl_cstr_to_string or jl_n_threads cannot be resolved even though they are marked as JL_DLLEXPORT. What's up with that?

This affects e.g. CxxWrap.jl which as a result is broken for me in 1.6 / 1.7 (CC @barche)

@fingolfin
Copy link
Contributor Author

Of course the answer to that might be to create a libjulia_jll 1.6, and rebuild all JLLs using libjulia_jll to also have a 1.6 variant. But it'd be much nicer if one could use the same binaries for 1.5 and 1.6...

@KristofferC KristofferC merged commit 9ec3147 into JuliaLang:master Dec 17, 2020
KristofferC pushed a commit that referenced this pull request Dec 17, 2020
@fingolfin fingolfin deleted the mh/fix-libjulia.dylib-version branch December 17, 2020 14:36
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label Dec 19, 2020
@barche
Copy link
Contributor

barche commented Dec 20, 2020

I don't really understand what changed here, but from Julia 1.6 on we can have julia_version in the platform, so having a libjulia for each of those seems the cleanest solution to me? Maybe on the libjulia dependencies we couls have an expand_julia_versions function that works like the expand_cxx_abis in BinaryBuilder?

staticfloat pushed a commit that referenced this pull request Jan 15, 2021
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
staticfloat pushed a commit that referenced this pull request Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants