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
Describe the bug
When building Rust cdylibs, meson does not set the soname, producing libraries that do not get found properly by downstream users.
There are some bug filings upstream but they are simply a matter of setting a link flag on the Meson side when building a Rust cdylib (plausibly also dylib? unsure but I am about to find out because I'm ✨using both✨) target.
meson/bug .venv » meson setup build
The Meson build system
Version: 1.5.99
Source dir: /home/jade/src/co/meson/bug
Build dir: /home/jade/src/co/meson/bug/build
Build type: native build
Project name: bug
Project version: 0.0.0
C++ compiler for the host machine: sccache c++ (gcc 14.2.1 "c++ (GCC) 14.2.1 20240805")
C++ linker for the host machine: c++ ld.bfd 2.43.0
nRust compiler for the host machine: rustc -C linker=cc (rustc 1.78.0)
Rust linker for the host machine: rustc -C linker=cc ld.bfd 2.43.0
inHost machine cpu family: x86_64
Host machine cpu: x86_64
Build targets in project: 3
Found ninja-1.12.1 at /usr/bin/ninja
meson/bug .venv » ninja -C build
ninja: Entering directory `build'
[7/7] Linking target libmeow.so
Observe bad thing: crabby/libcrabby.so does not have a soname set. In the output below it should read libcrabby.so rather than crabby/libcrabby.so. Meson would set this soname if it were C++, and you can see it doing so by libmerely_irate.so not having the subdirectory.
I expect libcrabby.so to be listed as merely libcrabby.so rather than crabby/libcrabby.so since it should have a soname set, in a similar fashion to libmerely_irate.so.
system parameters
Is this a cross build or just a plain native build (for the same computer)? Native
what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.) Arch Linux
what Python version are you using? 3.12.4
what meson --version8ef4e34 (1.5.99, installed in a venv)
what ninja --version if it's a Ninja build 1.12.1
The text was updated successfully, but these errors were encountered:
lf-
changed the title
Rust does not set soname of built cdylibs
Meson does not set soname of built Rust cdylibs
Aug 12, 2024
Describe the bug
When building Rust cdylibs, meson does not set the soname, producing libraries that do not get found properly by downstream users.
There are some bug filings upstream but they are simply a matter of setting a link flag on the Meson side when building a Rust cdylib (plausibly also dylib? unsure but I am about to find out because I'm ✨using both✨) target.
rust-lang/rust#37529
To Reproduce
File: meow.cc
File: meson.build
File: crabby/crabby.rs
File: crabby/meson.build
File: merely-irate/merely-irate.cc
File: merely-irate/meson.build
Setup and build:
Observe bad thing:
crabby/libcrabby.so
does not have a soname set. In the output below it should readlibcrabby.so
rather thancrabby/libcrabby.so
. Meson would set this soname if it were C++, and you can see it doing so bylibmerely_irate.so
not having the subdirectory.Expected behavior
I expect
libcrabby.so
to be listed as merelylibcrabby.so
rather thancrabby/libcrabby.so
since it should have a soname set, in a similar fashion tolibmerely_irate.so
.system parameters
meson --version
8ef4e34 (1.5.99, installed in a venv)ninja --version
if it's a Ninja build 1.12.1The text was updated successfully, but these errors were encountered: