You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way it worked previously is bazel will inject rpaths into an executable, ie:
path @loader_path/../../_solib_arm64/
This directory contains symlinks for all the mangled names of shared libraries that have been built.
This can only work if the install_name for a shared library is set to the mangled name. #13427 changes it so that runtime_solib_name is no longer mangled. ie, it went from libexternal_Sboost_Slibasio.dylib to libasio.dylib.
Also, the test as it existed was also correct as cc_test will link its dependencies using dynamic linking by default. The new test is broken as it does not capture the use case this feature was written to support (and I expect the change caused the test to start failing before it was rewritten).
Also see the description of the variable:
/** The name of the runtime solib symlink of the shared library. */
RUNTIME_SOLIB_NAME("runtime_solib_name");
which states that it is the mangled name that exists in the _solib_* dir.
This reverts commit b06f495.
Also had to add a missing mnemonic function call parameter to `getDynamicLibrarySoname`. Copy-pasted the parameter from the other use of that function in the codebase.
Tested manually with a custom toolchain and there is also a test from the reverted code.
Fixes#15214Closes#15261.
PiperOrigin-RevId: 446662219
Co-authored-by: Chris Clearwater <chris@clearwater.dev>
This reverts commit b06f495.
Also had to add a missing mnemonic function call parameter to `getDynamicLibrarySoname`. Copy-pasted the parameter from the other use of that function in the codebase.
Tested manually with a custom toolchain and there is also a test from the reverted code.
Fixes#15214Closes#15261.
PiperOrigin-RevId: 446662219
Co-authored-by: Chris Clearwater <chris@clearwater.dev>
Description of the bug:
The only use of
runtime_solib_name
in the bazel repo is this:This line is now broken.
The way it worked previously is bazel will inject rpaths into an executable, ie:
This directory contains symlinks for all the mangled names of shared libraries that have been built.
This can only work if the install_name for a shared library is set to the mangled name. #13427 changes it so that
runtime_solib_name
is no longer mangled. ie, it went fromlibexternal_Sboost_Slibasio.dylib
tolibasio.dylib
.Also, the test as it existed was also correct as cc_test will link its dependencies using dynamic linking by default. The new test is broken as it does not capture the use case this feature was written to support (and I expect the change caused the test to start failing before it was rewritten).
Also see the description of the variable:
which states that it is the mangled name that exists in the
_solib_*
dir.Can we please revert #13427? @csmulhern @oquenchil
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
Macos
What is the output of
bazel info release
?5.1.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: