-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Milestone
Description
Describe the bug
I am building mesa against LLVMSPIRVLib installed in a user prefix, with --pkg-config-path specified in the configuration. A full build of main succeeds. However, adding a rust.test() against an existing static Rust lib requiring LLVMSPIRVLib causes link to fail.
The resulting compile command adds -Clink-arg=${INSTALL_PATH}/libLLVMSPIRVLib.a to the rustc command; it does not add a -L${INSTALL_PATH}. The final cc includes both -l:libLLVMSPIRVLib.a and ${INSTALL_PATH}/libLLVMSPIRVLib.a, and the lack of -L causes it to be unable to find libLLVMSPIRVLib.a.
To Reproduce
- Install https://github.com/KhronosGroup/SPIRV-LLVM-Translator/ under a prefix which is not in
ld's search path, e.g.$HOME/.local. - Attempt to build the
libmesa_rust_testtarget of following mesa branch: https://gitlab.freedesktop.org/orowith2os/oro-mesa/-/tree/unit-tests
Expected behavior
The test should successfully link.
system parameters
- Fedora 42, native build
- Python: 3.13.3
- Meson: 1.8.0
- Ninja: 1.12.1
- Rust: 1.86.0