glslang icon indicating copy to clipboard operation
glslang copied to clipboard

CMake: Allow linking against system-installed SPIRV-Tools

Open akien-mga opened this issue 6 years ago • 9 comments

Fixes #1585.

@kyrios123 Can you confirm that it works for your use case too?

Output on my system:

+ CFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables'
+ export FFLAGS
+ LDFLAGS=' -Wl,--as-needed -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags'
+ export LDFLAGS
+ mkdir -p build
+ cd build
+ /usr/bin/cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 -DCMAKE_INSTALL_LIBEXECDIR:PATH=/usr/libexec -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-DNDEBUG -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-DNDEBUG -DLIB_SUFFIX=64 -DCMAKE_SKIP_RPATH:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON '-DCMAKE_MODULE_LINKER_FLAGS=-Wl,--as-needed -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags' -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF
-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is GNU 8.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Google Mock was not found - tests based on that will not build
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.4.2") 
-- Checking for module 'SPIRV-Tools'
--   Found SPIRV-Tools, version 2018.6.1
-- optimizer enabled
-- Configuring done
-- Generating done

And tests:

+ pushd Test
~/Mageia/Sandbox/_rpm/BUILD/glslang-7.10.2984/Test ~/Mageia/Sandbox/_rpm/BUILD/glslang-7.10.2984
+ LD_LIBRARY_PATH=/home/akien/Mageia/Sandbox/_rpm/BUILDROOT/glslang-7.10.2984-1.mga7.x86_64/usr/lib64
+ ./runtests
Running reflection...
Comparing single thread to multithread for all tests in current directory...
Running entry-point renaming tests
Running ill-defined uncalled function
Tests Succeeded.
Running explicit stage test and compound suffix tests
Running hlsl offsets
Running hlsl offsets
Configuring HLSL descriptor set and binding number manually
Testing per-descriptor-set IO map shift
Testing SPV no location
Testing SPV Debug Information
Testing Includer
Testing -D and -U
Testing --client and --target-env
spv.targetVulkan.vert
spv.targetOpenGL.vert
spv.targetVulkan.vert
spv.targetVulkan.vert
spv.targetOpenGL.vert
spv.targetVulkan.vert
spv.targetOpenGL.vert
spv.targetVulkan.vert
Testing GLSL entry point rename
Testing remapper error handling
Testing position Y inversion
Testing hlsl_functionality1
Testing HLSL-specific PP feature expansion
Tests Succeeded.

akien-mga avatar Dec 10 '18 12:12 akien-mga

Hold off for a bit, some edits are needed to avoid underlinking for SPIRV-Tools.

akien-mga avatar Dec 10 '18 13:12 akien-mga

Alright, should now be good to go once the CI is happy.

akien-mga avatar Dec 10 '18 14:12 akien-mga

Hello,

Sorry for the late answer. I gave a try to the patch but it causes the build to fail

+ cd /home/build/YPKG/root/glslang/build/glslang.git
+ export 'CFLAGS=-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ CFLAGS='-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ export 'CXXFLAGS=-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ CXXFLAGS='-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ export 'LDFLAGS=-Wl,--copy-dt-needed-entries -Wl,-O1 -Wl,-z,relro -Wl,-z,now -Wl,-z,max-page-size=0x1000 -Wl,-Bsymbolic-functions'
+ LDFLAGS='-Wl,--copy-dt-needed-entries -Wl,-O1 -Wl,-z,relro -Wl,-z,now -Wl,-z,max-page-size=0x1000 -Wl,-Bsymbolic-functions'
+ export 'FFLAGS=-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ FFLAGS='-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ export 'FCFLAGS=-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ FCFLAGS='-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ export PATH=/usr/lib64/ccache/bin:/usr/bin:/bin:/usr/sbin:/sbin
+ PATH=/usr/lib64/ccache/bin:/usr/bin:/bin:/usr/sbin:/sbin
+ export workdir=/home/build/YPKG/root/glslang/build/glslang.git
+ workdir=/home/build/YPKG/root/glslang/build/glslang.git
+ export package=glslang
+ package=glslang
+ export release=10
+ release=10
+ export version=7.10.2984
+ version=7.10.2984
+ export sources=/home/build/YPKG/sources
+ sources=/home/build/YPKG/sources
+ export pkgfiles=/home/build/work/files
+ pkgfiles=/home/build/work/files
+ export installdir=/home/build/YPKG/root/glslang/install
+ installdir=/home/build/YPKG/root/glslang/install
+ export PKG_ROOT_DIR=/home/build/YPKG/root/glslang
+ PKG_ROOT_DIR=/home/build/YPKG/root/glslang
+ export PKG_BUILD_DIR=/home/build/YPKG/root/glslang/build
+ PKG_BUILD_DIR=/home/build/YPKG/root/glslang/build
+ export LT_SYS_LIBRARY_PATH=/usr/lib64
+ LT_SYS_LIBRARY_PATH=/usr/lib64
+ export CC=x86_64-solus-linux-gcc
+ CC=x86_64-solus-linux-gcc
+ export CXX=x86_64-solus-linux-g++
+ CXX=x86_64-solus-linux-g++
+ export LD_AS_NEEDED=1
+ LD_AS_NEEDED=1
+ export SOURCE_DATA_EPOCH=1543495900
+ SOURCE_DATA_EPOCH=1543495900
+ unset DISPLAY SUDO_USER SUDO_GID SUDO_UID SUDO_COMMAND CDPATH
+ ninja -j4 -C solusBuildDir
ninja: Entering directory `solusBuildDir'
[18/60] Building CXX object glslang/CMakeFiles/glslang.dir/MachineIndependent/intermOut.cpp.o
../glslang/MachineIndependent/intermOut.cpp: In function ‘void glslang::OutputDouble(TInfoSink&, double, glslang::TOutputTraverser::EExtraOutput)’:
../glslang/MachineIndependent/intermOut.cpp:1152:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
             long long b = *reinterpret_cast<long long*>(&value);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[60/60] Linking CXX executable StandAlone/glslangValidator
FAILED: StandAlone/glslangValidator 
: && /usr/lib64/ccache/bin/x86_64-solus-linux-g++  -mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT -O2 -g -DNDEBUG  -Wl,--copy-dt-needed-entries -Wl,-O1 -Wl,-z,relro -Wl,-z,now -Wl,-z,max-page-size=0x1000 -Wl,-Bsymbolic-functions   -rdynamic StandAlone/CMakeFiles/glslangValidator.dir/StandAlone.cpp.o  -o StandAlone/glslangValidator  glslang/libglslang.a SPIRV/libSPIRV.a SPIRV/libSPVRemapper.a StandAlone/libglslang-default-resource-limits.a -lpthread glslang/libglslang.a OGLCompilersDLL/libOGLCompiler.a glslang/OSDependent/Unix/libOSDependent.a hlsl/libHLSL.a -lSPIRV-Tools-opt && :
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(scalar_replacement_pass.cpp.o): in function `spvtools::opt::ScalarReplacementPass::IsSpecConstant(unsigned int) const':
(.text+0xa7b): undefined reference to `spvOpcodeIsSpecConstant(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(basic_block.cpp.o): in function `spvtools::opt::BasicBlock::ForEachSuccessorLabel(std::function<void (unsigned int)> const&) const':
(.text+0xa9c): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(basic_block.cpp.o): in function `spvtools::opt::BasicBlock::ForEachSuccessorLabel(std::function<void (unsigned int*)> const&)':
(.text+0xc6c): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(basic_block.cpp.o): in function `spvtools::opt::BasicBlock::ForMergeAndContinueLabel(std::function<void (unsigned int)> const&)':
(.text+0x10a4): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(ccp_pass.cpp.o): in function `spvtools::opt::CCPPass::VisitAssignment(spvtools::opt::Instruction*)':
(.text+0x1b49): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: (.text+0x1cc6): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(ccp_pass.cpp.o): in function `spvtools::opt::CCPPass::VisitInstruction(spvtools::opt::Instruction*, spvtools::opt::BasicBlock**)':
(.text+0x1d91): undefined reference to `spvOpcodeIsBranch(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(common_uniform_elim_pass.cpp.o): in function `spvtools::opt::CommonUniformElimPass::IsSamplerOrImageType(spvtools::opt::Instruction const*) const':
(.text+0x394): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(common_uniform_elim_pass.cpp.o): in function `spvtools::opt::CommonUniformElimPass::IsConstantIndexAccessChain(spvtools::opt::Instruction*)':
(.text+0x4b8): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(common_uniform_elim_pass.cpp.o): in function `spvtools::opt::CommonUniformElimPass::GenACLoadRepl(spvtools::opt::Instruction const*, std::vector<std::unique_ptr<spvtools::opt::Instruction, std::default_delete<spvtools::opt::Instruction> >, std::allocator<std::unique_ptr<spvtools::opt::Instruction, std::default_delete<spvtools::opt::Instruction> > > >*, unsigned int*)':
(.text+0x35db): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(copy_prop_arrays.cpp.o): in function `std::_Function_handler<bool (spvtools::opt::Instruction*), spvtools::opt::CopyPropagateArrays::HasNoStores(spvtools::opt::Instruction*)::{lambda(spvtools::opt::Instruction*)#1}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&)':
(.text+0x7d4): undefined reference to `spvOpcodeIsDecoration(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(copy_prop_arrays.cpp.o): in function `std::_Function_handler<bool (spvtools::opt::Instruction*), spvtools::opt::CopyPropagateArrays::HasValidReferencesOnly(spvtools::opt::Instruction*, spvtools::opt::Instruction*)::{lambda(spvtools::opt::Instruction*)#1}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&)':
(.text+0x10dd): undefined reference to `spvOpcodeIsDecoration(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(copy_prop_arrays.cpp.o): in function `std::_Function_handler<bool (spvtools::opt::Instruction*, unsigned int), spvtools::opt::CopyPropagateArrays::CanUpdateUses(spvtools::opt::Instruction*, unsigned int)::{lambda(spvtools::opt::Instruction*, unsigned int)#1}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&, unsigned int&&)':
(.text+0x21b2): undefined reference to `spvOpcodeIsDecoration(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(if_conversion.cpp.o): in function `spvtools::opt::IfConversion::CheckType(unsigned int)':
(.text+0xadd): undefined reference to `spvOpcodeIsScalarType(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(if_conversion.cpp.o): in function `spvtools::opt::IfConversion::CanHoistInstruction(spvtools::opt::Instruction*, spvtools::opt::BasicBlock*, spvtools::opt::DominatorAnalysis*)':
(.text+0x1375): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(if_conversion.cpp.o): in function `spvtools::opt::IfConversion::HoistInstruction(spvtools::opt::Instruction*, spvtools::opt::BasicBlock*, spvtools::opt::DominatorAnalysis*)':
(.text+0x39d5): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(local_single_store_elim_pass.cpp.o): in function `spvtools::opt::LocalSingleStoreElimPass::FindSingleStoreAndCheckUses(spvtools::opt::Instruction*, std::vector<spvtools::opt::Instruction*, std::allocator<spvtools::opt::Instruction*> > const&) const':
(.text+0x883): undefined reference to `spvOpcodeIsDecoration(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(local_single_store_elim_pass.cpp.o): in function `std::_Function_handler<bool (spvtools::opt::Instruction*), spvtools::opt::LocalSingleStoreElimPass::FeedsAStore(spvtools::opt::Instruction*) const::{lambda(spvtools::opt::Instruction*)#1}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&)':
(.text+0x90b): undefined reference to `spvOpcodeIsDecoration(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_descriptor.cpp.o): in function `spvtools::opt::Loop::AreAllOperandsOutsideLoop(spvtools::opt::IRContext*, spvtools::opt::Instruction*)':
(.text+0x55bc): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_descriptor.cpp.o): in function `spvtools::opt::Loop::IsSafeToClone() const':
(.text+0xc7f1): undefined reference to `spvOpcodeIsBranch(SpvOp_)'
/usr/bin/ld: (.text+0xcb09): undefined reference to `spvOpcodeIsBranch(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_fission.cpp.o): in function `spvtools::opt::LoopFissionImpl::GroupInstructionsByUseDef()':
(.text+0x2515): undefined reference to `spvOpcodeIsBranch(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_utils.cpp.o): in function `spvtools::opt::LoopUtils::CloneLoop(spvtools::opt::LoopUtils::LoopCloningResult*, std::vector<spvtools::opt::BasicBlock*, std::allocator<spvtools::opt::BasicBlock*> > const&) const':
(.text+0x32a5): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_unswitch_pass.cpp.o): in function `std::_Function_handler<void (spvtools::opt::Instruction*), spvtools::opt::(anonymous namespace)::LoopUnswitch::PerformUnswitch()::{lambda(spvtools::opt::Instruction*)#3}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&)':
(.text+0x554): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_unswitch_pass.cpp.o): in function `spvtools::opt::(anonymous namespace)::LoopUnswitch::IsDynamicallyUniform(spvtools::opt::Instruction*, spvtools::opt::BasicBlock const*, spvtools::opt::DominatorTree const&)':
(.text+0x1b4a): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_unswitch_pass.cpp.o): in function `spvtools::opt::(anonymous namespace)::LoopUnswitch::SimplifyLoop(spvtools::opt::IteratorRange<spvtools::opt::UptrVectorIterator<spvtools::opt::BasicBlock, false> >, spvtools::opt::Loop*, spvtools::opt::Instruction*, spvtools::opt::Instruction*, std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int> >*) [clone .constprop.979]':
(.text+0x38d0): undefined reference to `spvOpcodeIsBranch(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_unswitch_pass.cpp.o): in function `spvtools::opt::LoopUnswitchPass::ProcessFunction(spvtools::opt::Function*)':
(.text+0x6705): undefined reference to `spvOpcodeIsBranch(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(propagator.cpp.o): in function `spvtools::opt::SSAPropagator::Initialize(spvtools::opt::Function*)':
(.text+0x2572): undefined reference to `spvOpcodeIsReturnOrAbort(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(propagator.cpp.o): in function `spvtools::opt::SSAPropagator::Simulate(spvtools::opt::Instruction*)':
(.text+0x6549): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: (.text+0x6943): undefined reference to `spvOpcodeIsBlockTerminator(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(register_pressure.cpp.o): in function `spvtools::opt::RegisterLiveness::SimulateFission(spvtools::opt::Loop const&, std::unordered_set<spvtools::opt::Instruction*, std::hash<spvtools::opt::Instruction*>, std::equal_to<spvtools::opt::Instruction*>, std::allocator<spvtools::opt::Instruction*> > const&, std::unordered_set<spvtools::opt::Instruction*, std::hash<spvtools::opt::Instruction*>, std::equal_to<spvtools::opt::Instruction*>, std::allocator<spvtools::opt::Instruction*> > const&, spvtools::opt::RegisterLiveness::RegionRegisterLiveness*, spvtools::opt::RegisterLiveness::RegionRegisterLiveness*) const':
(.text+0x36f0): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(register_pressure.cpp.o): in function `spvtools::opt::RegisterLiveness::Analyze(spvtools::opt::Function*)':
(.text+0x5027): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(register_pressure.cpp.o): in function `std::_Function_handler<void (spvtools::opt::BasicBlock*), spvtools::opt::(anonymous namespace)::ComputeRegisterLiveness::Compute()::{lambda(spvtools::opt::BasicBlock*)#1}>::_M_invoke(std::_Any_data const&, spvtools::opt::BasicBlock*&&)':
(.text+0x8474): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: SPIRV/libSPIRV.a(SpvTools.cpp.o): in function `glslang::SpirvToolsDisassemble(std::ostream&, std::vector<unsigned int, std::allocator<unsigned int> > const&)':
/home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:73: undefined reference to `spvContextCreate'
/usr/bin/ld: /home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:76: undefined reference to `spvBinaryToText'
/usr/bin/ld: /home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:84: undefined reference to `spvDiagnosticPrint'
/usr/bin/ld: /home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:87: undefined reference to `spvDiagnosticDestroy'
/usr/bin/ld: /home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:88: undefined reference to `spvContextDestroy'
/usr/bin/ld: SPIRV/libSPIRV.a(SpvTools.cpp.o): in function `glslang::SpirvToolsLegalize(glslang::TIntermediate const&, std::vector<unsigned int, std::allocator<unsigned int> >&, spv::SpvBuildLogger*, glslang::SpvOptions const*)':
/usr/include/spirv-tools/libspirv.hpp:70: undefined reference to `spvValidatorOptionsCreate'
/usr/bin/ld: /usr/include/spirv-tools/libspirv.hpp:71: undefined reference to `spvValidatorOptionsDestroy'
/usr/bin/ld: SPIRV/libSPIRV.a(SpvTools.cpp.o): in function `glslang::SpirvToolsValidate(glslang::TIntermediate const&, std::vector<unsigned int, std::allocator<unsigned int> >&, spv::SpvBuildLogger*)':
/home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:96: undefined reference to `spvContextCreate'
/usr/bin/ld: /home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:99: undefined reference to `spvValidatorOptionsCreate'
/usr/bin/ld: /home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:100: undefined reference to `spvValidatorOptionsSetRelaxBlockLayout'
/usr/bin/ld: /home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:101: undefined reference to `spvValidateWithOptions'
/usr/bin/ld: /home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:110: undefined reference to `spvValidatorOptionsDestroy'
/usr/bin/ld: /home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:111: undefined reference to `spvDiagnosticDestroy'
/usr/bin/ld: /home/build/YPKG/root/glslang/build/glslang.git/solusBuildDir/../SPIRV/SpvTools.cpp:112: undefined reference to `spvContextDestroy'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(optimizer.cpp.o): in function `spvtools::Optimizer::Run(unsigned int const*, unsigned long, std::vector<unsigned int, std::allocator<unsigned int> >*, spv_optimizer_options_t*) const':
(.text+0x3ee1): undefined reference to `spvtools::SpirvTools::SpirvTools(spv_target_env)'
/usr/bin/ld: (.text+0x3f29): undefined reference to `spvtools::SpirvTools::SetMessageConsumer(std::function<void (spv_message_level_t, char const*, spv_position_t const&, char const*)>)'
/usr/bin/ld: (.text+0x3f59): undefined reference to `spvtools::SpirvTools::Validate(unsigned int const*, unsigned long, spv_validator_options_t*) const'
/usr/bin/ld: (.text+0x4033): undefined reference to `spvtools::SpirvTools::~SpirvTools()'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(optimizer.cpp.o): in function `spvtools::Optimizer::Run(unsigned int const*, unsigned long, std::vector<unsigned int, std::allocator<unsigned int> >*) const':
(.text+0x40e5): undefined reference to `spvOptimizerOptionsCreate'
/usr/bin/ld: (.text+0x4106): undefined reference to `spvOptimizerOptionsDestroy'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(optimizer.cpp.o): in function `spvtools::Optimizer::Run(unsigned int const*, unsigned long, std::vector<unsigned int, std::allocator<unsigned int> >*, spvtools::ValidatorOptions const&, bool) const':
(.text+0x4146): undefined reference to `spvOptimizerOptionsCreate'
/usr/bin/ld: (.text+0x4154): undefined reference to `spvOptimizerOptionsSetRunValidator'
/usr/bin/ld: (.text+0x4164): undefined reference to `spvOptimizerOptionsSetValidatorOptions'
/usr/bin/ld: (.text+0x4182): undefined reference to `spvOptimizerOptionsDestroy'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(optimizer.cpp.o): in function `spvtools::Optimizer::RegisterPassFromFlag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [clone .part.871]':
(.text+0x43eb): undefined reference to `spvtools::utils::SplitFlagArgs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(optimizer.cpp.o): in function `spvtools::opt::IRContext::~IRContext()':
(.text._ZN8spvtools3opt9IRContextD2Ev[_ZN8spvtools3opt9IRContextD5Ev]+0x15): undefined reference to `spvContextDestroy'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(pass_manager.cpp.o): in function `spvtools::opt::PassManager::Run(spvtools::opt::IRContext*)':
(.text+0x3a): undefined reference to `spvtools::utils::PrintTimerDescription(std::ostream*, bool)'
/usr/bin/ld: (.text+0xae): undefined reference to `spvtools::SpirvTools::~SpirvTools()'
/usr/bin/ld: (.text+0xfa): undefined reference to `vtable for spvtools::utils::Timer'
/usr/bin/ld: (.text+0x11d): undefined reference to `spvtools::utils::Timer::Start()'
/usr/bin/ld: (.text+0x169): undefined reference to `spvtools::utils::Timer::Report(char const*)'
/usr/bin/ld: (.text+0x1c7): undefined reference to `spvtools::SpirvTools::SpirvTools(spv_target_env)'
/usr/bin/ld: (.text+0x1fa): undefined reference to `spvtools::SpirvTools::Disassemble(std::vector<unsigned int, std::allocator<unsigned int> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, unsigned int) const'
/usr/bin/ld: (.text+0x366): undefined reference to `spvtools::SpirvTools::SpirvTools(spv_target_env)'
/usr/bin/ld: (.text+0x396): undefined reference to `spvtools::SpirvTools::Disassemble(std::vector<unsigned int, std::allocator<unsigned int> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, unsigned int) const'
/usr/bin/ld: (.text+0x444): undefined reference to `spvtools::SpirvTools::~SpirvTools()'
/usr/bin/ld: (.text+0x4d3): undefined reference to `spvtools::utils::Timer::Report(char const*)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(pass_manager.cpp.o): in function `spvtools::utils::ScopedTimer<spvtools::utils::Timer>::~ScopedTimer()':
(.text._ZN8spvtools5utils11ScopedTimerINS0_5TimerEED2Ev[_ZN8spvtools5utils11ScopedTimerINS0_5TimerEED5Ev]+0x25): undefined reference to `spvtools::utils::Timer::Report(char const*)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(pass_manager.cpp.o): in function `spvtools::utils::ScopedTimer<spvtools::utils::Timer>::~ScopedTimer()':
(.text._ZN8spvtools5utils11ScopedTimerINS0_5TimerEED0Ev[_ZN8spvtools5utils11ScopedTimerINS0_5TimerEED5Ev]+0x25): undefined reference to `spvtools::utils::Timer::Report(char const*)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(private_to_local_pass.cpp.o): in function `spvtools::opt::PrivateToLocalPass::IsValidUse(spvtools::opt::Instruction const*) const':
(.text+0x1b8): undefined reference to `spvOpcodeIsDecoration(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(remove_duplicates_pass.cpp.o): in function `spvtools::opt::RemoveDuplicatesPass::RemoveDuplicateTypes() const':
(.text+0x679): undefined reference to `spvOpcodeGeneratesType(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(replace_invalid_opc.cpp.o): in function `spvtools::opt::ReplaceInvalidOpcodePass::BuildWarningMessage[abi:cxx11](SpvOp_)':
(.text+0x299): undefined reference to `spvtools::AssemblyGrammar::lookupOpcode(SpvOp_, spv_opcode_desc_t const**) const'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(set_spec_constant_default_value_pass.cpp.o): in function `spvtools::opt::SetSpecConstantDefaultValuePass::Process()':
(.text+0x75f): undefined reference to `spvtools::utils::ParseAndEncodeNumber(char const*, spvtools::utils::NumberType const&, std::function<void (unsigned int)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(simplification_pass.cpp.o): in function `std::_Function_handler<void (spvtools::opt::Instruction*), spvtools::opt::SimplificationPass::SimplifyFunction(spvtools::opt::Function*)::{lambda(spvtools::opt::Instruction*)#2}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&)':
(.text+0xa75): undefined reference to `spvOpcodeIsDecoration(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(value_number_table.cpp.o): in function `spvtools::opt::ValueNumberTable::AssignValueNumber(spvtools::opt::Instruction*) [clone .part.257]':
(.text+0x9fa): undefined reference to `spvOpcodeIsLoad(SpvOp_)'
/usr/bin/ld: (.text+0xb6e): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(vector_dce.cpp.o): in function `spvtools::opt::VectorDCE::MarkUsesAsLive(spvtools::opt::Instruction*, spvtools::utils::BitVector const&, std::unordered_map<unsigned int, spvtools::utils::BitVector, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, spvtools::utils::BitVector> > >*, std::vector<spvtools::opt::VectorDCE::WorkListItem, std::allocator<spvtools::opt::VectorDCE::WorkListItem> >*)':
(.text+0x64c): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(vector_dce.cpp.o): in function `spvtools::opt::VectorDCE::AddItemToWorkListIfNeeded(spvtools::opt::VectorDCE::WorkListItem, std::unordered_map<unsigned int, spvtools::utils::BitVector, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, spvtools::utils::BitVector> > >*, std::vector<spvtools::opt::VectorDCE::WorkListItem, std::allocator<spvtools::opt::VectorDCE::WorkListItem> >*)':
(.text+0x16a5): undefined reference to `spvtools::utils::BitVector::Or(spvtools::utils::BitVector const&)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(aggressive_dead_code_elim_pass.cpp.o): in function `spvtools::opt::AggressiveDCEPass::IsDead(spvtools::opt::Instruction*)':
(.text+0x128a): undefined reference to `spvOpcodeIsBranch(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(aggressive_dead_code_elim_pass.cpp.o): in function `std::_Function_handler<void (unsigned int*), spvtools::opt::AggressiveDCEPass::AggressiveDCE(spvtools::opt::Function*)::{lambda(unsigned int const*)#2}>::_M_invoke(std::_Any_data const&, unsigned int*&&)':
(.text+0x583b): undefined reference to `spvOpcodeIsBranch(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(aggressive_dead_code_elim_pass.cpp.o): in function `std::_Function_handler<void (spvtools::opt::Instruction*), spvtools::opt::AggressiveDCEPass::AddBreaksAndContinuesToWorklist(spvtools::opt::Instruction*)::{lambda(spvtools::opt::Instruction*)#1}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&)':
(.text+0x5c73): undefined reference to `spvOpcodeIsBranch(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(aggressive_dead_code_elim_pass.cpp.o): in function `spvtools::opt::AggressiveDCEPass::AggressiveDCE(spvtools::opt::Function*)':
(.text+0x8256): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: (.text+0x8633): undefined reference to `spvOpcodeIsAtomicWithLoad(SpvOp_)'
/usr/bin/ld: (.text+0x9d6d): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(build_module.cpp.o): in function `spvtools::BuildModule(spv_target_env, std::function<void (spv_message_level_t, char const*, spv_position_t const&, char const*)>, unsigned int const*, unsigned long)':
(.text+0xa9): undefined reference to `spvContextCreate'
/usr/bin/ld: (.text+0xf9): undefined reference to `spvtools::SetContextMessageConsumer(spv_context_t*, std::function<void (spv_message_level_t, char const*, spv_position_t const&, char const*)>)'
/usr/bin/ld: (.text+0x163): undefined reference to `spvBinaryParse'
/usr/bin/ld: (.text+0x175): undefined reference to `spvContextDestroy'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(build_module.cpp.o): in function `spvtools::BuildModule(spv_target_env, std::function<void (spv_message_level_t, char const*, spv_position_t const&, char const*)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)':
(.text+0xf6d): undefined reference to `spvtools::SpirvTools::SpirvTools(spv_target_env)'
/usr/bin/ld: (.text+0xfa4): undefined reference to `spvtools::SpirvTools::SetMessageConsumer(std::function<void (spv_message_level_t, char const*, spv_position_t const&, char const*)>)'
/usr/bin/ld: (.text+0xfe2): undefined reference to `spvtools::SpirvTools::Assemble(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<unsigned int, std::allocator<unsigned int> >*, unsigned int) const'
/usr/bin/ld: (.text+0x1005): undefined reference to `spvtools::SpirvTools::~SpirvTools()'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(build_module.cpp.o): in function `std::unique_ptr<spvtools::opt::IRContext, std::default_delete<spvtools::opt::IRContext> > spvtools::MakeUnique<spvtools::opt::IRContext, spv_target_env&, std::function<void (spv_message_level_t, char const*, spv_position_t const&, char const*)>&>(spv_target_env&, std::function<void (spv_message_level_t, char const*, spv_position_t const&, char const*)>&)':
(.text._ZN8spvtools10MakeUniqueINS_3opt9IRContextEJR14spv_target_envRSt8functionIFv19spv_message_level_tPKcRK14spv_position_tS8_EEEEESt10unique_ptrIT_St14default_deleteISG_EEDpOT0_[_ZN8spvtools10MakeUniqueINS_3opt9IRContextEJR14spv_target_envRSt8functionIFv19spv_message_level_tPKcRK14spv_position_tS8_EEEEESt10unique_ptrIT_St14default_deleteISG_EEDpOT0_]+0x60): undefined reference to `spvContextCreate'
/usr/bin/ld: (.text._ZN8spvtools10MakeUniqueINS_3opt9IRContextEJR14spv_target_envRSt8functionIFv19spv_message_level_tPKcRK14spv_position_tS8_EEEEESt10unique_ptrIT_St14default_deleteISG_EEDpOT0_[_ZN8spvtools10MakeUniqueINS_3opt9IRContextEJR14spv_target_envRSt8functionIFv19spv_message_level_tPKcRK14spv_position_tS8_EEEEESt10unique_ptrIT_St14default_deleteISG_EEDpOT0_]+0x97a): undefined reference to `spvtools::SetContextMessageConsumer(spv_context_t*, std::function<void (spv_message_level_t, char const*, spv_position_t const&, char const*)>)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(compact_ids_pass.cpp.o): in function `std::_Function_handler<void (spvtools::opt::Instruction*), spvtools::opt::CompactIdsPass::Process()::{lambda(spvtools::opt::Instruction*)#1}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&)':
(.text+0x1ff): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(dead_insert_elim_pass.cpp.o): in function `spvtools::opt::DeadInsertElimPass::EliminateDeadInsertsOnePass(spvtools::opt::Function*)':
(.text+0xb8c): undefined reference to `spvOpcodeIsComposite(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(def_use_manager.cpp.o): in function `spvtools::opt::analysis::DefUseManager::WhileEachUse(spvtools::opt::Instruction const*, std::function<bool (spvtools::opt::Instruction*, unsigned int)> const&) const':
(.text+0x623): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(dominator_tree.cpp.o): in function `spvtools::opt::DominatorTree::GetDominatorEdges(spvtools::opt::Function const*, spvtools::opt::BasicBlock const*, std::vector<std::pair<spvtools::opt::BasicBlock*, spvtools::opt::BasicBlock*>, std::allocator<std::pair<spvtools::opt::BasicBlock*, spvtools::opt::BasicBlock*> > >*)':
(.text+0x12d9): undefined reference to `spvOpcodeIsBranch(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(feature_manager.cpp.o): in function `spvtools::opt::FeatureManager::AddExtensions(spvtools::opt::Module*)':
(.text+0x3ca): undefined reference to `spvtools::GetExtensionFromString(char const*, spvtools::Extension*)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(feature_manager.cpp.o): in function `spvtools::opt::FeatureManager::AddCapability(SpvCapability_)':
(.text+0x78b): undefined reference to `spvtools::AssemblyGrammar::lookupOperand(spv_operand_type_t, unsigned int, spv_operand_desc_t const**) const'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(fold.cpp.o): in function `spvtools::opt::InstructionFolder::FoldInstructionToConstant(spvtools::opt::Instruction*, std::function<unsigned int (unsigned int)>) const':
(.text+0x19d1): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(inline_opaque_pass.cpp.o): in function `spvtools::opt::InlineOpaquePass::IsOpaqueType(unsigned int) [clone .localalias.145]':
(.text+0x270): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(inline_opaque_pass.cpp.o): in function `spvtools::opt::InlineOpaquePass::HasOpaqueArgsOrReturn(spvtools::opt::Instruction const*)':
(.text+0x5f4): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(inline_pass.cpp.o): in function `std::_Function_handler<void (spvtools::opt::Instruction*), spvtools::opt::InlinePass::UpdateSucceedingPhis(std::vector<std::unique_ptr<spvtools::opt::BasicBlock, std::default_delete<spvtools::opt::BasicBlock> >, std::allocator<std::unique_ptr<spvtools::opt::BasicBlock, std::default_delete<spvtools::opt::BasicBlock> > > >&)::{lambda(unsigned int)#1}::operator()(unsigned int) const::{lambda(spvtools::opt::Instruction*)#1}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&)':
(.text+0x474): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(inline_pass.cpp.o): in function `spvtools::opt::InlinePass::CloneSameBlockOps(std::unique_ptr<spvtools::opt::Instruction, std::default_delete<spvtools::opt::Instruction> >*, std::unordered_map<unsigned int, unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > >*, std::unordered_map<unsigned int, spvtools::opt::Instruction*, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, spvtools::opt::Instruction*> > >*, std::unique_ptr<spvtools::opt::BasicBlock, std::default_delete<spvtools::opt::BasicBlock> >*)':
(.text+0x8ac): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(inline_pass.cpp.o): in function `spvtools::opt::InlinePass::HasNoReturnInLoop(spvtools::opt::Function*)':
(.text+0x1003): undefined reference to `spvOpcodeIsReturn(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(inline_pass.cpp.o): in function `spvtools::opt::InlinePass::HasNoReturnInStructuredConstruct(spvtools::opt::Function*)':
(.text+0x12a3): undefined reference to `spvOpcodeIsReturn(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(inline_pass.cpp.o): in function `std::_Function_handler<void (spvtools::opt::Instruction*), spvtools::opt::InlinePass::GenInlineCode(std::vector<std::unique_ptr<spvtools::opt::BasicBlock, std::default_delete<spvtools::opt::BasicBlock> >, std::allocator<std::unique_ptr<spvtools::opt::BasicBlock, std::default_delete<spvtools::opt::BasicBlock> > > >*, std::vector<std::unique_ptr<spvtools::opt::Instruction, std::default_delete<spvtools::opt::Instruction> >, std::allocator<std::unique_ptr<spvtools::opt::Instruction, std::default_delete<spvtools::opt::Instruction> > > >*, spvtools::opt::InstructionList::iterator, spvtools::opt::UptrVectorIterator<spvtools::opt::BasicBlock, false>)::{lambda(spvtools::opt::Instruction const*)#2}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&)':
(.text+0x627c): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(instruction.cpp.o): in function `spvtools::opt::Instruction::IsOpaqueType() const [clone .localalias.343]':
(.text+0x22a1): undefined reference to `spvOpcodeIsBaseOpaqueType(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(instruction.cpp.o): in function `spvtools::opt::Instruction::PrettyPrint[abi:cxx11](unsigned int) const':
(.text+0x3958): undefined reference to `spvtools::spvInstructionBinaryToText[abi:cxx11](spv_target_env, unsigned int const*, unsigned long, unsigned int const*, unsigned long, unsigned int)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(instruction.cpp.o): in function `spvtools::opt::Instruction::IsReadOnlyLoad() const':
(.text+0x41e8): undefined reference to `spvOpcodeIsLoad(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(instruction.cpp.o): in function `spvtools::opt::Instruction::IsScalarizable() const':
(.text+0x445f): undefined reference to `spvOpcodeIsScalarizable(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(instrument_pass.cpp.o): in function `spvtools::opt::InstrumentPass::CloneSameBlockOps(std::unique_ptr<spvtools::opt::Instruction, std::default_delete<spvtools::opt::Instruction> >*, std::unordered_map<unsigned int, unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > >*, std::unordered_map<unsigned int, spvtools::opt::Instruction*, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, spvtools::opt::Instruction*> > >*, std::unique_ptr<spvtools::opt::BasicBlock, std::default_delete<spvtools::opt::BasicBlock> >*)':
(.text+0x3cc): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(instrument_pass.cpp.o): in function `std::_Function_handler<void (spvtools::opt::Instruction*), spvtools::opt::InstrumentPass::UpdateSucceedingPhis(std::vector<std::unique_ptr<spvtools::opt::BasicBlock, std::default_delete<spvtools::opt::BasicBlock> >, std::allocator<std::unique_ptr<spvtools::opt::BasicBlock, std::default_delete<spvtools::opt::BasicBlock> > > >&)::{lambda(unsigned int)#1}::operator()(unsigned int) const::{lambda(spvtools::opt::Instruction*)#1}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&)':
(.text+0xb3d): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(ir_context.cpp.o): in function `spvtools::opt::IRContext::AnalyzeUses(spvtools::opt::Instruction*)':
(.text+0x76c): undefined reference to `spvOpcodeIsDecoration(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(ir_context.cpp.o): in function `spvtools::opt::IRContext::ForgetUses(spvtools::opt::Instruction*)':
(.text+0x97f): undefined reference to `spvOpcodeIsDecoration(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(ir_context.cpp.o): in function `spvtools::opt::IRContext::KillInst(spvtools::opt::Instruction*)':
(.text+0x3924): undefined reference to `spvOpcodeIsDecoration(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(local_access_chain_convert_pass.cpp.o): in function `spvtools::opt::LocalAccessChainConvertPass::AppendConstantOperands(spvtools::opt::Instruction const*, std::vector<spvtools::opt::Operand, std::allocator<spvtools::opt::Operand> >*)':
(.text+0x37c): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(local_access_chain_convert_pass.cpp.o): in function `spvtools::opt::LocalAccessChainConvertPass::IsConstantIndexAccessChain(spvtools::opt::Instruction const*) const':
(.text+0x4c8): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_peeling.cpp.o): in function `std::_Function_handler<bool (spvtools::opt::Instruction*), spvtools::opt::LoopPeeling::IsConditionCheckSideEffectFree() const::{lambda(spvtools::opt::Instruction*)#1}>::_M_invoke(std::_Any_data const&, spvtools::opt::Instruction*&&)':
(.text+0x35c6): undefined reference to `spvOpcodeIsBranch(SpvOp_)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_peeling.cpp.o): in function `spvtools::opt::LoopPeeling::CreateBlockBefore(spvtools::opt::BasicBlock*)':
(.text+0x42de): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_peeling.cpp.o): in function `spvtools::opt::LoopPeeling::GetIteratorUpdateOperations(spvtools::opt::Loop const*, spvtools::opt::Instruction*, std::unordered_set<spvtools::opt::Instruction*, std::hash<spvtools::opt::Instruction*>, std::equal_to<spvtools::opt::Instruction*>, std::allocator<spvtools::opt::Instruction*> >*)':
(.text+0x7ff4): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(loop_unroller.cpp.o): in function `spvtools::opt::(anonymous namespace)::LoopUnrollerUtilsImpl::RemapOperands(spvtools::opt::Instruction*)':
(.text+0x18d): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(mem_pass.cpp.o): in function `spvtools::opt::MemPass::IsTargetType(spvtools::opt::Instruction const*) const [clone .localalias.502]':
(.text+0x1e98): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(mem_pass.cpp.o): in function `spvtools::opt::MemPass::DCEInst(spvtools::opt::Instruction*, std::function<void (spvtools::opt::Instruction*)> const&)':
(.text+0x311e): undefined reference to `spvIsIdType(spv_operand_type_t)'
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/8.2.0/../../../../lib64/libSPIRV-Tools-opt.a(merge_return_pass.cpp.o):(.text+0x22ad): more undefined references to `spvIsIdType(spv_operand_type_t)' follow
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

kyrios123 avatar Dec 16 '18 16:12 kyrios123

ping what's blocking now?

clouds56 avatar Apr 25 '19 08:04 clouds56

@kyrios123 I'll have a look, I had to disable -Wl,--as-needed myself due to #1484, regardless of this patch.

akien-mga avatar Apr 25 '19 11:04 akien-mga

@kyrios123 What's the spirv-tools version you're linking against? Does it match the known_good.json requirements for glslang? Does Solus always link against static libraries, or do you also have libSPIRV-Tools-opt.so available?

Can you try this (additional) patch?

diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt
index 5cea53d9..1dc57a95 100644
--- a/StandAlone/CMakeLists.txt
+++ b/StandAlone/CMakeLists.txt
@@ -31,7 +31,7 @@ elseif(UNIX)
     endif()
 endif(WIN32)
 
-target_link_libraries(glslangValidator ${LIBRARIES})
+target_link_libraries(glslangValidator ${LIBRARIES} ${SPIRV-Tools_LIBRARIES})
 target_link_libraries(spirv-remap ${LIBRARIES})
 target_include_directories(glslangValidator PUBLIC ../External)

Alternatively, did you have to do anything specific to solve #1484? I can't link libHLSL.so with -Wl,--as-needed, so I can't proceed to see what are the underlinking issues for standalone tools.

akien-mga avatar Apr 25 '19 11:04 akien-mga

@akien-mga I just updated to

  • spirv-headers: 2434b89345a50c018c84f42a310b0fad4f3fd94f
  • siprv-tools: 26c1b8878315a7a5c188df45e0bc236bb222b698
  • glslang: 2d0095f2fd23120b32c2ad73e3a0b6cac776f257

Previously I used:

  • spirv-headers: a2c529b5dda18838ab4b52f816acfebd774eaab3
  • spirv-tools: a29a9947ac96d811b310f481b24e293f67fedf32
  • glslang: 7.10.2984

kyrios123 avatar Apr 29 '19 15:04 kyrios123

https://github.com/KhronosGroup/glslang/pull/1722 seems to be another attempt. Maybe you could merge effort.

eclipseo avatar Jun 10 '19 12:06 eclipseo

This now works well for my use case (packaging glslang for the Mageia Linux distribution), but I haven't done any testing on other platforms supported by glslang.

#1722 seems to be another attempt. Maybe you could merge effort.

Yes it could be worth looking into. I don't know why #1722 was closed right after being created though.

@tjaalton (Debian packager) and @airlied (Fedora packager) seem to use a rebased version of #1722: https://salsa.debian.org/xorg-team/vulkan/glslang/-/blob/debian-unstable/debian/patches/0001-pkg-config-compatibility.patch https://src.fedoraproject.org/rpms/glslang/blob/master/f/0001-pkg-config-compatibility.patch

Maybe you could work with me towards upstreaming what we need for proper Linux distro packaging? I'll admit that with time, I've grown less willing to do lots of CMake shenanigans, so I'd welcome any help ;)

akien-mga avatar Oct 12 '20 09:10 akien-mga

A version of this was implemented by #3152. Closing.

arcady-lunarg avatar Aug 17 '23 17:08 arcady-lunarg