Open Makogan opened 2 years ago
spirv-cross recipe doesn't modify SPIRV-Cross source code and is not doing something weird at build time. Can you reproduce this issue if you build SPIRV-Cross yourself? Did you try with the last version (1.3.204.0)?
I did try the 1.3.204 version as well and I get the same issue. I have not built spirv-cross outside of the conan centre, however the devs of spirv-cross are unable to reproduce on their end.
Well I don't know, I can't test on Linux currently. It works fine for me with AppleClang 13.0/libc++ on macOS. I've tried with your raw vert.spv, and I've also compiled your .vert with glslangValidator and use it in your program, both work fine.
Thank you for your time, I will keep investigating then.
It seems this is a convoluted problem, it happens only with specific permutations of clang and and gcc: https://github.com/KhronosGroup/SPIRV-Cross/issues/1891
I see the recipes in the online center list gcc10 as one of the possible compilers that generated the binaries. How can I select the compiler version that generated the binaries?
I do think the binaries on the conan centre have an issue however.
To give you an example, I use meson as my build system. If I try to compile using the package isntalled by coanan through:
# spirv_cross_glsl = dependency('spirv-cross-glsl')
I get a segmentation fault.
No such error happens if I compile under the hood with cmake:
cmake = import('cmake')
cmake_opts = cmake.subproject_options()
cmake_opts.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE': true})
sub_proj = cmake.subproject('SPIRV-Cross', options: cmake_opts)
spirv_cross_glsl = sub_proj.dependency('spirv-cross-glsl')
spirv_cross_core = sub_proj.dependency('spirv_cross_core')
i.e. when I build the library myself there is no segfault. likely because I am no longer using gcc 10 which seems to be wha's creating the malformed binaries.
As an update, i have tested this behaviour in 3 different machines, in all cases compiling from scratch (spirv-cross) works but trying to use the conan binaries does not. There is something broken with this package's binaries.
Hi there, I was reviewing old issues and I have come across this one.
Is this still an issue nowadays? I can't reproduce this problem on Mac
Package and Environment Details (include every applicable attribute)
Conan profile (output of
conan profile show default
orconan profile show <profile>
if custom profile is in use)Steps to reproduce (Include if Applicable)
Install spirv-cross with conan, attempt to compile this file:
And feed it this data: shader.zip
Compile manually with clang, for example in my system:
Replace the paths as necessary.
A segmentation fault occurs. However if you compile with gcc no such error occurs. According to the devs of the package the given code should be well behaved:
https://github.com/KhronosGroup/SPIRV-Cross/issues/1891
It is possible that the current binaries in the conan center are malformed which is why I am reporting it here, it seems the spirv-cross devs are unable to reproduce on their end, which is why I suspect this might be an issue with the conan binaries.
Logs (Include/Attach if Applicable)
Click to expand log
``` Put your log output here ```