-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Only add an automatic SONAME for Rust dylibs #130960
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
(Is the bot sleeping? trying again...) r? petrochenkov |
I also encountered a breaking change related to this. In my case, I was explicitly renaming the final shared library to something different (from libmylib_ffi.so to libmylib.so) to package it nicely and it broke my cgo bindings. It turned out that the cgo dynamic loader was very confused with a library file having a certain name and the SONAME being different. This wasn't a problem before since previously the shared library did not have a SONAME. I ultimately found a way around it but I bet it a broke a variety of subtle use cases for people. I was too lazy to open a GitHub issue at the time though as I initially thought the change was intented. |
@bors r+ |
This fixes a stable-to-stable regression from Rust 1.81.0 (#126094). |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#128778 (atomics: allow atomic and non-atomic reads to race) - rust-lang#130918 (simplify LLVM submodule handling) - rust-lang#130960 (Only add an automatic SONAME for Rust dylibs) - rust-lang#130973 (compiletest: rename "runtest/crash.rs" to "runtest/crashes.rs" to be in line with the test directory) - rust-lang#130976 (remove couple redundant clones) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#130960 - cuviper:cdylib-soname, r=petrochenkov Only add an automatic SONAME for Rust dylibs rust-lang#126094 added an automatic relative `SONAME` to all dynamic libraries, but it was really only needed for Rust `--crate-type="dylib"`. In Fedora, it was a surprise to see `SONAME` on `"cdylib"` libraries like Python modules, especially because that generates an undesirable RPM `Provides`. We can instead add a `SONAME` just for Rust dylibs by passing the crate-type argument farther. Ref: https://bugzilla.redhat.com/show_bug.cgi?id=2314879
[beta] backports - Only add an automatic SONAME for Rust dylibs rust-lang#130960 - Reject leading unsafe in `cfg!(...)` and `--check-cfg` rust-lang#131057, resolving rust-lang#131055 - Disable jump threading `UnOp::Not` for non-bool rust-lang#131201 - Update LLVM submodule rust-lang#131448 r? ghost
[beta] backports - Only add an automatic SONAME for Rust dylibs rust-lang#130960 - Reject leading unsafe in `cfg!(...)` and `--check-cfg` rust-lang#131057, resolving rust-lang#131055 - Disable jump threading `UnOp::Not` for non-bool rust-lang#131201 - Update LLVM submodule rust-lang#131448 r? ghost
[beta] backports - Only add an automatic SONAME for Rust dylibs rust-lang#130960 - Reject leading unsafe in `cfg!(...)` and `--check-cfg` rust-lang#131057, resolving rust-lang#131055 - Disable jump threading `UnOp::Not` for non-bool rust-lang#131201 - Update LLVM submodule rust-lang#131448 r? ghost
[beta] backports - Only add an automatic SONAME for Rust dylibs rust-lang#130960 - Reject leading unsafe in `cfg!(...)` and `--check-cfg` rust-lang#131057, resolving rust-lang#131055 - Disable jump threading `UnOp::Not` for non-bool rust-lang#131201 - Update LLVM submodule rust-lang#131448 - Split x86_64-msvc-ext into two jobs rust-lang#130072 - Use a small runner for msvc-ext2 job rust-lang#130151 r? ghost
#126094 added an automatic relative
SONAME
to all dynamic libraries, but it was really only needed for Rust--crate-type="dylib"
. In Fedora, it was a surprise to seeSONAME
on"cdylib"
libraries like Python modules, especially because that generates an undesirable RPMProvides
. We can instead add aSONAME
just for Rust dylibs by passing the crate-type argument farther.Ref: https://bugzilla.redhat.com/show_bug.cgi?id=2314879