- Notifications
You must be signed in to change notification settings - Fork 13.9k
Open
Labels
A-lldArea: Linkage issues specific to rust-lldArea: Linkage issues specific to rust-lldC-external-bugCategory: issue that is caused by bugs in software beyond our controlCategory: issue that is caused by bugs in software beyond our control
Description
When upgrading to rust 1.90.0, LLD cannot find a symbol that exists on Intel MKL binary.
Opting out of LLD works (-Clinker-features=-lld
).
Code
I tried this code:
use petal_decomposition::RandomizedPca; fn main() { let matrix_vec = vec![[1.2, 1.3], [2.2, 2.3], [3.2, 3.3]]; let features: ndarray::Array2<f64> = matrix_vec.into(); let mut pca: RandomizedPca<f64, _> = RandomizedPca::new(2); pca.fit(&features).unwrap(); println!("{:?}", pca.components()); }
Here's the Cargo.toml file:
[package] name = "rust190" version = "0.1.0" edition = "2024" [dependencies] ndarray = "0.15.6" petal-decomposition = { version = "0.7.0", features = ["intel-mkl-system"] }
And some information about the OS:
$ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" $ apt list --installed | grep libmkl-intel-lp64 libmkl-intel-lp64/oldstable,now 2020.4.304-4 amd64 [installed] $ nm -D /lib/x86_64-linux-gnu/libmkl_intel_lp64.so | grep mkl_lapack_zhesvxx U mkl_lapack_zhesvxx $ nm -D /lib/x86_64-linux-gnu/libmkl_core.so | grep mkl_lapack_zhesvxx 0000000000c4c830 T mkl_lapack_zhesvxx
I expected to see this happen: the binary compiles and runs properly.
Instead, this happened:
$ cargo run Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s Running `target/debug/rust190` target/debug/rust190: symbol lookup error: /lib/x86_64-linux-gnu/libmkl_intel_lp64.so: undefined symbol: mkl_lapack_zhesvxx shell returned 127
The executable that DO NOT work doesn't list libmkl_core.so as a dependency:
$ ldd /opt/san-francisco/bin/pl-score linux-vdso.so.1 (0x00007ffdbc552000) libmkl_intel_lp64.so => /lib/x86_64-linux-gnu/libmkl_intel_lp64.so (0x00007f01f8800000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f01f9602000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f01f9522000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f01f861e000) /lib64/ld-linux-x86-64.so.2 (0x00007f01f9c0b000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f01f8619000)
On the other hand, the one that works does:
$ ldd pl-score linux-vdso.so.1 (0x00007ffd4bbdb000) libmkl_intel_lp64.so => /lib/x86_64-linux-gnu/libmkl_intel_lp64.so (0x00007f2c3dc00000) libmkl_sequential.so => /lib/x86_64-linux-gnu/libmkl_sequential.so (0x00007f2c3be00000) libmkl_core.so => /lib/x86_64-linux-gnu/libmkl_core.so (0x00007f2c37600000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2c3e9e0000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2c3db20000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2c3741e000) /lib64/ld-linux-x86-64.so.2 (0x00007f2c3eff9000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2c3efd8000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2c3efd3000)
Version it worked on
It most recently worked on: 1.89.0
Version with regression
rustc --version --verbose
:
rustc 1.90.0 (1159e78c4 2025-09-14) binary: rustc commit-hash: 1159e78c4747b02ef996e55082b704c09b970588 commit-date: 2025-09-14 host: x86_64-unknown-linux-gnu release: 1.90.0 LLVM version: 20.1.8
Metadata
Metadata
Assignees
Labels
A-lldArea: Linkage issues specific to rust-lldArea: Linkage issues specific to rust-lldC-external-bugCategory: issue that is caused by bugs in software beyond our controlCategory: issue that is caused by bugs in software beyond our control