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
Unfortunately this is not correct, and can (and does on arm64 Ubuntu) result in undefined symbol errors in the C ABI static library, which is dependent on libc, but is specified after libc on the link command line.
Some previously proposed solutions are:
rustc to always link with libc last. I feel that this is inelegant due to specified external libraries not necessarily always requiring libc.
Meson to emit -Clink-arg=-lc explicitly on the rustc command line when linking against C ABI libraries. This is the patch I have proposed for Ubuntu.
The text was updated successfully, but these errors were encountered:
This was first reported in Debian at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059223
Then also reported in Ubuntu at: https://bugs.launchpad.net/ubuntu/+source/meson/+bug/2049904
When linking together a Rust program with a C static library, Meson produces the following command line:
Which ultimately ends up as rustc executing the following link command:
Unfortunately this is not correct, and can (and does on arm64 Ubuntu) result in undefined symbol errors in the C ABI static library, which is dependent on libc, but is specified after libc on the link command line.
Some previously proposed solutions are:
rustc
to always link with libc last. I feel that this is inelegant due to specified external libraries not necessarily always requiring libc.-Clink-arg=-lc
explicitly on therustc
command line when linking against C ABI libraries. This is the patch I have proposed for Ubuntu.The text was updated successfully, but these errors were encountered: