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
CMake cannot find Vulkan. This is because shaderc is actually a build-time dependency, and should be put in the nativeBuildInputs list rather than buildInputs.
Building vulkan-shaders-gen fails. It seems to try to use GNU ld, which makes no sense, because I'm using LLVM (so lld is the correct linker). It looks like the host toolchain logic does not account for this correctly, as well as potentially other Nix CMake settings.
First Bad Commit
No response
Compile command
nix-build path/to/give/file.nix
Relevant log output
-- The C compiler identification is Clang 19.1.6
-- The CXX compiler identification is Clang 19.1.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /nix/store/2d1r5kvz7plg24bwb316972knqmiyf2p-clang-19.1.6/bin/clang
-- Check for working C compiler: /nix/store/2d1r5kvz7plg24bwb316972knqmiyf2p-clang-19.1.6/bin/clang - broken
CMake Error at /nix/store/mfrfb675a16gqchycqv16aziivn09dxa-cmake-3.31.3/share/cmake-3.31/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/nix/store/2d1r5kvz7plg24bwb316972knqmiyf2p-clang-19.1.6/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/build/source/build/ggml/src/ggml-vulkan/vulkan-shaders-gen-prefix/src/vulkan-shaders-gen-build/CMakeFiles/CMakeScratch/TryCompile-sMlsZU'
Run Build Command(s): /nix/store/sqzac7j4cazddikz1nqb7y7q9v9vcwg0-ninja-1.12.1/bin/ninja -v cmTC_9a82f
[1/2] /nix/store/2d1r5kvz7plg24bwb316972knqmiyf2p-clang-19.1.6/bin/clang -O2 -O3 -DNDEBUG -MD -MT CMakeFiles/cmTC_9a82f.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_9a82f.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_9a82f.dir/testCCompiler.c.o -c /build/source/build/ggml/src/ggml-vulkan/vulkan-shaders-gen-prefix/src/vulkan-shaders-gen-build/CMakeFiles/CMakeScratch/TryCompile-sMlsZU/testCCompiler.c
[2/2] :&& /nix/store/2d1r5kvz7plg24bwb316972knqmiyf2p-clang-19.1.6/bin/clang -O2 -O3 -DNDEBUG -rdynamic CMakeFiles/cmTC_9a82f.dir/testCCompiler.c.o -o cmTC_9a82f &&:
FAILED: cmTC_9a82f
:&& /nix/store/2d1r5kvz7plg24bwb316972knqmiyf2p-clang-19.1.6/bin/clang -O2 -O3 -DNDEBUG -rdynamic CMakeFiles/cmTC_9a82f.dir/testCCompiler.c.o -o cmTC_9a82f &&:
clang: error: unable to execute command: Executable "ld" doesn't exist! clang: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project.Call Stack (most recent call first): CMakeLists.txt
The text was updated successfully, but these errors were encountered:
Git commit
106045e
Operating systems
Linux
GGML backends
Vulkan
Problem description & steps to reproduce
I am trying to use Nix (with the derivations in this repo) to cross compile a static build with musl and LLVM.
I am using the following Nix file:
There are a couple of issues:
CMake cannot find Vulkan. This is because
shaderc
is actually a build-time dependency, and should be put in thenativeBuildInputs
list rather thanbuildInputs
.For now, this can be worked around like so:
Building
vulkan-shaders-gen
fails. It seems to try to use GNUld
, which makes no sense, because I'm using LLVM (solld
is the correct linker). It looks like the host toolchain logic does not account for this correctly, as well as potentially other Nix CMake settings.First Bad Commit
No response
Compile command
Relevant log output
The text was updated successfully, but these errors were encountered: