-
I'm trying to build some unit tests with a clang toolchain installed in a non-system location, and meson refuses to setup my project: > meson setup --backend ninja --buildtype debug -D platform-name=native --native-file xpacks/micro-os-plus-build-helper/meson/toolchains/clang-linux.ini --native-file tests/platform-native/meson/native.ini build/native-meson-clang15-debug tests
The Meson build system
Version: 0.63.3
Source dir: /home/ilg/Work/micro-os-plus/utils-lists-xpack.git/tests
Build dir: /home/ilg/Work/micro-os-plus/utils-lists-xpack.git/build/native-meson-clang15-debug
Build type: native build
Project name: micro-os-plus-utils-lists
Project version: undefined
C compiler for the host machine: clang (clang 15.0.7 "xPack x86_64 clang version 15.0.7")
C linker for the host machine: clang ld.bfd 2.30
/home/ilg/Work/micro-os-plus/utils-lists-xpack.git/build/native-meson-clang15-debug/meson-private/sanitycheckcpp.exe: error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or directory
tests/meson.build:16:0: ERROR: Executables created by cpp compiler clang++ are not runnable.
A full log can be found at /home/ilg/Work/micro-os-plus/utils-lists-xpack.git/build/native-meson-clang15-debug/meson-logs/meson-log.txt
error: running 'meson setup --backend ninja --buildtype debug -D platform-name=native --native-file xpacks/micro-os-plus-build-helper/meson/toolchains/clang-linux.ini --native-file tests/platform-native/meson/native.ini build/native-meson-clang15-debug tests' failed I tried to add
The compiler is fully functional, and the compiled binaries are also fully functional, as long as However, with meson, I can't even build the binaries, since meson quits prematurely. Any suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 18 replies
-
This sounds like https://gcc.gnu.org/faq.html#rpath |
Beta Was this translation helpful? Give feedback.
-
If GCC spec files / clang config files are not to your taste, then simply pass the correct rpath in your LDFLAGS to be passed to the linker. |
Beta Was this translation helpful? Give feedback.
-
What might work is that instead of doing a native build you do a cross build and define an exe wrapper. In that wrapper you can set whatever flags and envvars you want to make things work. |
Beta Was this translation helpful? Give feedback.
-
For those interested, here is a GitHub run with the CI tests for this project: This is the short list of these tests, since they use only the latest versions of the toolchains. Before project releases, I trigger a different GitHub Actions workflow, which runs with all those many toolchain versions, on even more platforms, currently not available as GitHub runners. As it can be seen, for the native builds, the meson clang configuration is missing, as being problematic. :-( |
Beta Was this translation helpful? Give feedback.
I elided it because in CMake using those checks is not mandatory, and my tests run very well without them, while meson thinks it knows better and mandates these checks, failing to setup my projects.
I'm afraid this thread leads nowhere. The current answer is that the compiler sanity checks cannot be disabled.