Comments (7)
Works fine for me:
~/Volkmold/build $ cmake -GNinja -DCMAKE_CXX_FLAGS="-fuse-ld=mold" ..
-- The CXX compiler identification is GNU 12.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Vulkan as target
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/zeux/Volkmold/build
~/Volkmold/build $ ninja
(0.145) [2/2] Linking CXX executable Volkmold
However, I do see libvulkan.so appended in the command line. This should not happen. I think it's happening because of declared dependency on Vulkan::Vulkan in volk's CMakeLists.txt via target_link_libraries here:
if(TARGET volk)
target_link_libraries(volk PUBLIC Vulkan::Vulkan)
endif()
target_link_libraries(volk_headers INTERFACE Vulkan::Vulkan)
These are wrong, but I'd need to go back in CMake history to see why they were added / how to best fix it, as we need an include dependency from Vulkan::Vulkan but not the libraries.
from volk.
Ok yeah this is due to a dependency on Vulkan::Vulkan, which should not be here. What needs to happen is either that we only depend on Vulkan::Headers, or that we grab the include path from Vulkan::Vulkan and manually add it to volk. I have a patch for the latter that seems to work but I need to look at whether we can just rely on Vulkan::Headers as it's simpler.
from volk.
You should not be linking libvulkan when using volk.
from volk.
I am not, at least not on purpose. Could it be that SDL pulls in vulkan somehow?
I just checked, the same issue persists when removing SDL from the equation. The only cmake subfolder I go into that calls find_package(Vulkan ...)
is volk. I will do some more invastigating, certainly odd.
from volk.
I put a minimal example to reproduce the issue over here: https://github.com/mokafolio/Volkmold. Build using:
mkdir build
cd build
cmake -GNinja -DCMAKE_CXX_FLAGS="-fuse-ld=mold" ..
ninja
from volk.
Posted a patch that seems to be the most straightforward way to handle this atm. Vulkan::Headers is new as of CMake 3.21, so for now we need to rely on the variables set by FindVulkan.cmake as I understand it.
from volk.
I just tested your branch and can confirm that it fixes the warnings on mold 2.0. Thanks for the blazingly fast turnaround! Feel free to close the issue once you merge the PR!
from volk.
Related Issues (20)
- Missing extension name definitions? HOT 3
- volk + GLFW = (identifier glfwCreateWindowSurface not found) HOT 4
- Warnings from Volk with higher warnings enabled HOT 1
- add InstanceTable? HOT 3
- Compile error with MinGW cross-compiler HOT 2
- Access violation in volkInitialize HOT 2
- Device Table Overflow HOT 2
- question on unloading the dll HOT 4
- Should I be calling `volkFinalize()`? HOT 2
- Tagging for versions since 1.3.270 HOT 1
- Question about adding as submodule HOT 1
- dlopen fails to find Vulkan libraries on macOS HOT 6
- Library naming conflict HOT 2
- 1.3.275.0: missing checking VulkanHeaders and volk.c installation HOT 22
- CMake: Should we install volk.c by default? HOT 2
- volkLoadDevice(device) erases some function pointers HOT 3
- Why is volk.c so big? HOT 5
- does volk work with asan? HOT 2
- Tags for versions >1.3.283.0 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from volk.