Open ghost opened 4 years ago
Are you following the instructions for building spirv-fuzz in the top-level README.md? Could you give the exact sequence of commands that you're using to build?
Yes, I did. But when I enable spirv-fuzz, error always be occured when it is linking excusable test_fuzz because ld can't find this function. So I searched this function in visual studio code. And then I found the object which is built from cli_consumer.cpp.
I usually config cmake project with cmake gui but not commandline excutable. And then I would like to use gnu make
Can you try going carefully through the instructions in:
kokoro/scripts/linux/build.sh
?
If you could provide a log of the commands and their output that would be good - the specific command that is failing and the reason why should become apparent then.
I tried and build is successful. When i build it as a sub project in vulkan-hpp, this problem still exists. and I will view config of spirv-tools build directory and test it
When I enabled BUILD_SHARED_LIBS, ld will failed to link excutable test_fuzz
When ld is linking c++ excutable test_fuzz, linker command would be command failed just like:
So,I copyed c++ object cli_consumer.cpp.o which contains function
CLIMessageConsumer(spv_message_level_t level, const char*,const spv_position_t& position, const char* message)
from/SPIRV-Tools/$build_directory/External/spirv-tools/tools/CMakeFiles/spirv-fuzz.dir/
to/SPIRV-Tools/$build_directory/test/fuzz/CMakeFiles/test_fuzz.dir/
and changed/SPIRV-Tools/$build_directory/test/fuzz/CMakeFiles/test_fuzz.dir/link.txt
to insert path of cli_consumer.cpp.o into linking command just like:So ld can reference function and link test _fuzz successfully.