-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
Fix shared libs for multilib macOS builds & tackle -rpath #2659
Conversation
Oookay, so the macOS shared libs issue is even worse with master here, segfaulting during the
|
Oh wait, there's a mixture of |
9305538
to
ee10f07
Compare
@JohanEngelen @klickverbot: install_name + symlink macOS fixes (for MULTILIB=ON) aside, I think that's a sane solution for rpath now. There'll be a default rpath (absolute path to the lib dir(s)) for produced binaries linked against the shared default libs now, for CMake-installed LDC too, so homebrewed builds and the official prebuilt packages (still portable) will produce shared libs and executables working out of the box. I guess it's fine the way it is for distros too, and they can simply adapt the .conf.in templates if need be. I guess fiddling with rpath is now only really required when the user releases a (portable) binary linked against shared druntime/Phobos/ldc-jit, where the default rpath should be replaced by an appropriate relative one containing the shipped-with druntime/Phobos libs. |
It's needed as otherwise the default rpath isn't set anymore with ldc-developers/ldc#2659.
0670e3e
to
a48d15a
Compare
CircleCI OSX now working fine with |
a219099
to
397da88
Compare
Switching from XCode 9.0 (9.0.1 supposedly) to 9.2 makes the CMake-installed |
Since using MACOSX_RPATH=ON for the 32/64-bit libs, the install_names of the individual libs already contain the `@rpath/` prefix (i.e., the built libs already, not just the CMake-installed copies). It is correctly retained when merging the libs via `lipo`. The actual issue was that the install_name contains the version too (`@rpath/libdruntime-ldc-shared.78.dylib`), so it needs to be retained in in order not to end up with duplicate druntime dependencies via prebuilt Phobos (depending on `@rpath/libdruntime-ldc-shared.78.dylib` from before the merging) and user-built binaries (linked against merged druntime with overridden install_name `@rpath/libdruntime-ldc-shared.dylib` without version number).
This mimics building an individual shared druntime/Phobos lib with CMake.
But still in a portable way for the portable prebuilt packages, which will replace the absolute install path with `%%ldcbinarypath%/..` in the config file, which will still lead to an absolute rpath in produced binaries.
This fixes the corrupt CMake-installed `libldc-jit-rt.a` issue ldc-developers#2618.
No description provided.