Skip to content
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

Spirv-headers are not in correct locations with latest LunarG on linux #17

Closed
Steve132 opened this issue Oct 26, 2019 · 13 comments
Closed

Comments

@Steve132
Copy link

Steps to reproduce: install latest linux LunarG packages

wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.1.121-bionic.list http://packages.lunarg.com/vulkan/1.1.121/lunarg-vulkan-1.1.121-bionic.list
sudo apt update
sudo apt install vulkan-sdk

Then try to compile the examples:

cmake ../examples/ && make

/home/steven/Software/Vookoo/examples/../include/vku/vku.hpp:31:10: fatal error: vulkan/spirv.hpp11: No such file or directory
#include <vulkan/spirv.hpp11>

This is because in the new lunarg SDK splits the spirv headers into a new project https://github.com/KhronosGroup/SPIRV-Headers

The new location for the headers in the lunarg sdk is spirv/<version>

find /usr/include -name spirv.hpp11
/usr/include/spirv/unified1/spirv.hpp11
/usr/include/spirv/1.2/spirv.hpp11
/usr/include/spirv/1.0/spirv.hpp11
/usr/include/spirv/1.1/spirv.hpp11

@FunMiles
Copy link
Contributor

I have hit the same issue. I simply changed the include to:

#include <spirv/unified1/spirv.hpp11>

Is this project still alive? A pull request could be warranted if this work on every machine.
However there's also the issue that on Mac OS X, I am not finding this spirv.hpp11 file.
Can it be simply copied from Linux (I will have to try when I have a bit more time)

@lhog
Copy link
Collaborator

lhog commented Mar 27, 2020

Looks like vookoo is becoming a bit bitrotten, which is sad. I really liked the capabilities and code. @andy-thomason what's your plan for this repo?

@andy-thomason
Copy link
Owner

If you want to make PRs, I'll be happy to accept them.

@andy-thomason
Copy link
Owner

The motivation for Vookoo came from the need to make high framerate molecular simulators like https://github.com/andy-thomason/moovoo

@andy-thomason
Copy link
Owner

I'm no longer working in the structural biology space but in statistical genetics and almost entirely in Rust, but I hope to return to Vulkan when the opportunity arises.

@lhog
Copy link
Collaborator

lhog commented Mar 28, 2020

@FunMiles @Steve132 cannot reproduce your issue.
I'm on Vulkan 1.2.131.2, which is latest at the time I write this. spirv.hpp11 is still where it was before:
image

@Steve132
Copy link
Author

@lhog
Copy link
Collaborator

lhog commented Mar 29, 2020

For me spirv.hpp11 in include/vulkan and blabla/spirv/unified1 is exactly same.
image
I see it might be not the case for your OS/distribution.

I haven't been able to find any CMake file examples how to deal with finding relative path to spir-v/unified1 in a cross-platform way. For you it's just /usr/include, but I'm not sure it's uniform for other Linux distributions.

@andy-thomason
Copy link
Owner

I've made the spirv headers optional for now but did observe that the package glslang-dev on debian contains a SPIRV directory.

@andy-thomason
Copy link
Owner

andy-thomason commented Mar 31, 2020

I would be remiss if I didn't mention the excellent Vulkano crate in the Rust ecosystem.
https://github.com/vulkano-rs/vulkano

@FunMiles
Copy link
Contributor

FunMiles commented Apr 5, 2020

For me spirv.hpp11 in include/vulkan and blabla/spirv/unified1 is exactly same.
image
I see it might be not the case for your OS/distribution.

I haven't been able to find any CMake file examples how to deal with finding relative path to spir-v/unified1 in a cross-platform way. For you it's just /usr/include, but I'm not sure it's uniform for other Linux distributions.

The MacOS X distribution of Vulkan/MoltenVK does not include the spirv includes. So Andy's work to make them optional have made it possible for me to easily port Vookoo to Mac OS. The README.md of Khronos SPIR-V headers says:

Headers are provided in the include directory, with up-to-date headers in the unified1 subdirectory. Older headers are provided according to their version.

So it seems that the path spirv/unified path is the intended standard path.

@andy-thomason
Copy link
Owner

While making the spirv headers optional has made this less of a problem, we should investigate restoring them once we have a definitive location and package list.

I'm going to close this for now.

@FunMiles
Copy link
Contributor

FunMiles commented Apr 6, 2020

I will look at this and try to address @lhog comment on how to find it. Perhaps trying to find the include from a series of possible paths and turning on/off a flag to indicate whether they were found would do the job. Then any example that require them should be removed from the build list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants