-
Bug
-
Resolution: Not a Bug
-
Undefined
-
None
-
None
-
None
-
None
-
None
-
rhel-sst-pt-llvm-rust-go
-
ssg_platform_tools
-
None
-
False
-
-
None
-
None
-
None
-
None
-
None
What were you trying to do that didn't work?
Due to bug of cargo https://github.com/rust-lang/cargo/issues/5045, by default, the cargo will not set SONAME for C library build from rust code.
Previously, we are using `.cargo/config.toml` and merge it to `.cargo/config` like:
[target.'cfg(target_os="linux")'] rustflags = "-Clink-arg=-Wl,-soname=libnmstate.so.2"
But with rust-toolset-1.75.0-1.el9.noarch changed the %cargo_build to use `RUSTFLAGS` which override any changes to `.cargo/config` regarding `rustflags`.
I found a workaround by using
%if 0%{?rhel} # RHEL does not have patchelf, hence we need to solve the SONAME problem # by ourselves: https://github.com/rust-lang/cargo/issues/5045 %define _package_note_status 1 %define _package_note_flags -Wl,-soname=libnmstate.so.2 %endif
Please provide the package NVR for which bug is seen:
rust-toolset-1.75.0-1.el9.noarch
How reproducible:
100%
Steps to reproduce
- rebuild nmstate-2.2.22-1.el9
- try to install its produced `nmstate-devel` rpm along with `nmstate-libs`
Expected results
No failure
Actual results
error: Failed dependencies:
libnmstate.so()(64bit) is needed by nmstate-2.2.22-1.el9.x86_64