-
Notifications
You must be signed in to change notification settings - Fork 12.1k
cmake: remove shader-gen step-targets from ggml-vulkan #14226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: remove shader-gen step-targets from ggml-vulkan #14226
Conversation
This section:
contains the "INSTALL_COMMAND" instruction that seems to cause the failure during build. It shouldn't be necessary to install the temporary toolchain command. |
Build failure log:
|
Technically, external projects are part of the build process (not the install step) and supporting an install step should be perfectly valid—and separate from the top-level project install step. Just to re-state and get to the core of the problem:
So, the problem is not in the fact that ExternalProject_Add is using an install step, but that the same statement is evaluating to different paths. This is likely a problem with the generator expression being used in the set command, I'm thinking. I need a way to reproduce this, though. Do you know how the stage directory is being set separately from the .build directory? |
The stage directory is set using the DESTDIR=/path/to/stage during "make install". |
I ran the following and had no issues: cmake -G "Unix Makefiles" -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=OFF -DGGML_VULKAN=ON
mkdir stage
cd build
make
DESTDIR="$(cd ..; pwd)/stage" make install What I notice in your output, however, indicates that in fact the build step is using the staging directory:
So I tried and skipped the separate "make" command, because the "make install" triggers the build, and was able to reproduce the issue:
So here's the real culprit: When DESTDIR is set for a "make install" that triggers the build step directly, vulkan-shaders-gen external project is picking up the same DESTDIR expected by the top-level install. |
@yurivict I have fixed the issue on my side. If you would be so kind and test it on FreeBSD with the latest bandoti:cmake-vulkan-shaders-gen-install branch, that would be great. Thanks! |
It builds successfully now. |
Awesome! We're good to go then. Thank you for catching this corner-case. 😊 @0cc4m whenever you give the approval we can merge this fix in. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing it.
The build/install steps of vulkan-shaders-gen are an implementation detail, but they are included as dependencies for ggml-vulkan. This removes such dependency so vulkan-shaders-gen doesn't get installed with the top-level "make install".
In addition it fixes an issue when the DESTDIR is specified for a Makefile generator when "make install" triggers the build step.