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

2022.3: build fails #1274

Closed
kloczek opened this issue Oct 23, 2022 · 9 comments
Closed

2022.3: build fails #1274

kloczek opened this issue Oct 23, 2022 · 9 comments

Comments

@kloczek
Copy link

kloczek commented Oct 23, 2022

Consolidate compiler generated dependencies of target shaderc_util
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/shaderc-2022.3/x86_64-redhat-linux-gnu'
make  -f libshaderc_util/CMakeFiles/shaderc_util.dir/build.make libshaderc_util/CMakeFiles/shaderc_util.dir/build
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/shaderc-2022.3/x86_64-redhat-linux-gnu'
[  8%] Building CXX object libshaderc_util/CMakeFiles/shaderc_util.dir/src/resources.cc.o
cd /home/tkloczko/rpmbuild/BUILD/shaderc-2022.3/x86_64-redhat-linux-gnu/libshaderc_util && /usr/bin/g++ -DENABLE_HLSL -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS -I/home/tkloczko/rpmbuild/BUILD/shaderc-2022.3/libshaderc_util/include -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fno-rtti -fno-exceptions  -fno-rtti -fno-exceptions -Wimplicit-fallthrough -DNDEBUG -Wextra-semi -Wall -Werror -fvisibility=hidden -fPIC -std=c++11 -std=gnu++11 -MD -MT libshaderc_util/CMakeFiles/shaderc_util.dir/src/resources.cc.o -MF CMakeFiles/shaderc_util.dir/src/resources.cc.o.d -o CMakeFiles/shaderc_util.dir/src/resources.cc.o -c /home/tkloczko/rpmbuild/BUILD/shaderc-2022.3/libshaderc_util/src/resources.cc
/home/tkloczko/rpmbuild/BUILD/shaderc-2022.3/libshaderc_util/src/resources.cc:151:6: error: too many initializers for ‘const shaderc_util::TBuiltInResource’ {aka ‘const TBuiltInResource’}
  151 |     }};
      |      ^
make[2]: *** [libshaderc_util/CMakeFiles/shaderc_util.dir/build.make:149: libshaderc_util/CMakeFiles/shaderc_util.dir/src/resources.cc.o] Error 1

cmake settings

[tkloczko@devel-g2v x86_64-redhat-linux-gnu]$ cmake -L
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error: The source directory "/home/tkloczko/rpmbuild/BUILD/shaderc-2022.3/x86_64-redhat-linux-gnu" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
-- Cache values
ASCIIDOCTOR_EXE:FILEPATH=/usr/bin/asciidoctor
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=/usr
DISABLE_EXCEPTIONS:BOOL=ON
DISABLE_RTTI:BOOL=ON
ENABLE_CODE_COVERAGE:BOOL=OFF
SHADERC_ENABLE_WERROR_COMPILE:BOOL=ON
SHADERC_ENABLE_WGSL_OUTPUT:BOOL=OFF
SHADERC_SKIP_COPYRIGHT_CHECK:BOOL=OFF
SHADERC_SKIP_EXAMPLES:BOOL=OFF
SHADERC_SKIP_INSTALL:BOOL=OFF
SHADERC_SKIP_TESTS:BOOL=ON
SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS:BOOL=ON
@tgurr
Copy link

tgurr commented Oct 27, 2022

@kloczek I was experiencing the same build failure, it was fixed by updating glslang from 11.9.0 to 11.12.0, compiling shaderc 2022.3 against that version succeeded for me then.

Still sad that we can't have proper version specifications and dependencies specified in and required by the CMake build system like "normal" but the whole Khronos ecosystem suffers from that which makes it a real pain to package that kind of stuff.

@kloczek
Copy link
Author

kloczek commented Oct 27, 2022

Just retested against glslang sdk-1.3.231.1 and glslc linking is failing

[ 96%] Linking CXX executable glslc
cd /home/tkloczko/rpmbuild/BUILD/shaderc-2022.3/x86_64-redhat-linux-gnu/glslc && /usr/bin/cmake -E cmake_link_script CMakeFiles/glslc_exe.dir/link.txt --verbose=1
/usr/bin/g++ -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fno-rtti -fno-exceptions  -fno-rtti -fno-exceptions -Wimplicit-fallthrough -DNDEBUG -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -rdynamic CMakeFiles/glslc_exe.dir/src/main.cc.o -o glslc  libglslc.a ../libshaderc_util/libshaderc_util.a ../libshaderc/libshaderc.a ../libshaderc_util/libshaderc_util.a -lSPIRV-Tools-opt -lSPIRV-Tools -lHLSL -lglslang -lOSDependent -lOGLCompiler -lglslang -lOSDependent -lOGLCompiler -lSPIRV -lMachineIndependent -lGenericCodeGen
In member function ‘__ct ’,
    inlined from ‘ProcessDeferred.constprop’ at /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:878:0:
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/Scan.h:62: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/12/new: In function ‘ProcessDeferred.constprop’:
/usr/include/c++/12/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
In member function ‘__ct ’,
    inlined from ‘ProcessDeferred.constprop.isra’ at /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:878:0:
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/Scan.h:62: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
/usr/include/c++/12/new: In function ‘ProcessDeferred.constprop.isra’:
/usr/include/c++/12/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::GetThreadPoolAllocator()':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::SetThreadPoolAllocator(glslang::TPoolAllocator*)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:55: undefined reference to `glslang::OS_SetTLSValue(void*, void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::InitializePoolIndex()':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:62: undefined reference to `glslang::OS_AllocTLSIndex()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TArraySizes::operator new(unsigned long)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `std::_Rb_tree_iterator<std::pair<int const, glslang::TVector<glslang::TIntermTyped const*> > > std::_Rb_tree<int, std::pair<int const, glslang::TVector<glslang::TIntermTyped const*> >, std::_Select1st<std::pair<int const, glslang::TVector<glslang::TIntermTyped const*> > >, std::less<int>, glslang::pool_allocator<std::pair<int const, glslang::TVector<glslang::TIntermTyped const*> > > >::_M_emplace_hint_unique<std::piecewise_construct_t const&, std::tuple<int const&>, std::tuple<> >(std::_Rb_tree_const_iterator<std::pair<int const, glslang::TVector<glslang::TIntermTyped const*> > >, std::piecewise_construct_t const&, std::tuple<int const&>&&, std::tuple<>&&) [clone .constprop.0] [clone .isra.0]':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `std::_Rb_tree_iterator<std::pair<int const, glslang::TVector<glslang::TIntermConstantUnion const*> > > std::_Rb_tree<int, std::pair<int const, glslang::TVector<glslang::TIntermConstantUnion const*> >, std::_Select1st<std::pair<int const, glslang::TVector<glslang::TIntermConstantUnion const*> > >, std::less<int>, glslang::pool_allocator<std::pair<int const, glslang::TVector<glslang::TIntermConstantUnion const*> > > >::_M_emplace_hint_unique<std::piecewise_construct_t const&, std::tuple<int const&>, std::tuple<> >(std::_Rb_tree_const_iterator<std::pair<int const, glslang::TVector<glslang::TIntermConstantUnion const*> > >, std::piecewise_construct_t const&, std::tuple<int const&>&&, std::tuple<>&&) [clone .constprop.0] [clone .isra.0]':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TSymbol::setExtensions(int, char const* const*)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: more undefined references to `glslang::OS_GetTLSValue(void*)' follow
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `ShInitialize':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1345: undefined reference to `glslang::InitGlobalLock()'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1347: undefined reference to `glslang::InitProcess()'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1350: undefined reference to `glslang::GetGlobalLock()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1361: undefined reference to `glslang::ReleaseGlobalLock()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `ShConstructCompiler':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1372: undefined reference to `glslang::InitThread()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TSymbol::TSymbol(glslang::TSymbol const&)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TSymbolTableLevel::relateToOperator(char const*, glslang::TOperator)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TSymbolTableLevel::setFunctionExtensions(char const*, int, char const* const*)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TVariable::TVariable(glslang::TVariable const&)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: more undefined references to `glslang::OS_GetTLSValue(void*)' follow
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `ShLinkExt':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:55: undefined reference to `glslang::OS_SetTLSValue(void*, void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TSymbolValidater::operator()(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char> > const, glslang::TVarEntryInfo>&)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TGlslIoMapper::doMap(glslang::TIoMapResolver*, TInfoSink&) [clone .part.0]':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: more undefined references to `glslang::OS_GetTLSValue(void*)' follow
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `ShFinalize.part.0':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1465: undefined reference to `glslang::ReleaseGlobalLock()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `ShFinalize':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1420: undefined reference to `glslang::GetGlobalLock()'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1425: undefined reference to `glslang::ReleaseGlobalLock()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::FinalizeProcess()':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1420: undefined reference to `glslang::GetGlobalLock()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1425: undefined reference to `glslang::ReleaseGlobalLock()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TScanContext::identifierOrType()':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TQualifier::getSpirvDecorateQualifierString[abi:cxx11]() const':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TType::getCompleteString(bool, bool, bool, bool, std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char> >) const':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TVariable::dump(TInfoSink&, bool) const':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: more undefined references to `glslang::OS_GetTLSValue(void*)' follow
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TProgram::link(EShMessages)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:55: undefined reference to `glslang::OS_SetTLSValue(void*, void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::HlslParseContext::constructAggregate(TIntermNode*, glslang::TType const&, int, glslang::TSourceLoc const&)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TParseContextBase::growGlobalUniformBlock(glslang::TSourceLoc const&, glslang::TType&, std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char> > const&, glslang::TVector<glslang::TTypeLoc>*)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: more undefined references to `glslang::OS_GetTLSValue(void*)' follow
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `(anonymous namespace)::SetupBuiltinSymbolTable(int, EProfile, glslang::SpvVersion const&, glslang::EShSource)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:440: undefined reference to `glslang::GetGlobalLock()'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:499: undefined reference to `glslang::ReleaseGlobalLock()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `(anonymous namespace)::SetupBuiltinSymbolTable(int, EProfile, glslang::SpvVersion const&, glslang::EShSource)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:55: undefined reference to `glslang::OS_SetTLSValue(void*, void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:55: undefined reference to `glslang::OS_SetTLSValue(void*, void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:55: undefined reference to `glslang::OS_SetTLSValue(void*, void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `bool (anonymous namespace)::ProcessDeferred<(anonymous namespace)::DoPreprocessing>(TCompiler*, char const* const*, int, int const*, char const* const*, char const*, EShOptimizationLevel, TBuiltInResource const*, int, EProfile, bool, int, bool, EShMessages, glslang::TIntermediate&, (anonymous namespace)::DoPreprocessing&, bool, glslang::TShader::Includer&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, glslang::TEnvironment const*) [clone .constprop.0]':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TShader::preprocess(TBuiltInResource const*, int, EProfile, bool, bool, EShMessages, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, glslang::TShader::Includer&)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1943: undefined reference to `glslang::InitThread()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TShader::preprocess(TBuiltInResource const*, int, EProfile, bool, bool, EShMessages, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, glslang::TShader::Includer&)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:55: undefined reference to `glslang::OS_SetTLSValue(void*, void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::PropagateNoContraction(glslang::TIntermediate const&)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TIntermediate::postProcess(TIntermNode*, EShLanguage)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `bool (anonymous namespace)::ProcessDeferred<(anonymous namespace)::DoFullParse>(TCompiler*, char const* const*, int, int const*, char const* const*, char const*, EShOptimizationLevel, TBuiltInResource const*, int, EProfile, bool, int, bool, EShMessages, glslang::TIntermediate&, (anonymous namespace)::DoFullParse&, bool, glslang::TShader::Includer&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, glslang::TEnvironment const*) [clone .constprop.0] [clone .isra.0]':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `ShCompile':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:55: undefined reference to `glslang::OS_SetTLSValue(void*, void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TShader::parse(TBuiltInResource const*, int, EProfile, bool, bool, EShMessages, glslang::TShader::Includer&)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1916: undefined reference to `glslang::InitThread()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::TShader::parse(TBuiltInResource const*, int, EProfile, bool, bool, EShMessages, glslang::TShader::Includer&)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:55: undefined reference to `glslang::OS_SetTLSValue(void*, void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::HlslGrammar::acceptIdentifier(glslang::HlslToken&)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `glslang::HlslGrammar::acceptDefaultLabel(TIntermNode*&)':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: undefined reference to `glslang::OS_GetTLSValue(void*)'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/PoolAlloc.cpp:49: more undefined references to `glslang::OS_GetTLSValue(void*)' follow
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `ShConstructLinker':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1382: undefined reference to `glslang::InitThread()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o: in function `ShConstructUniformMap':
/home/tkloczko/rpmbuild/BUILD/glslang-sdk-1.3.231.1/glslang/MachineIndependent/ShaderLang.cpp:1392: undefined reference to `glslang::InitThread()'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x341b6): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x341d1): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x341de): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x341eb): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x341f0): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x341f5): more undefined references to `GlslangToSpv.cpp.7fe69451' follow
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34398): undefined reference to `ShaderLang.cpp.0524b14c'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x343c8): undefined reference to `ShaderLang.cpp.0524b14c'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x343fc): undefined reference to `ShaderLang.cpp.0524b14c'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34430): undefined reference to `ShaderLang.cpp.0524b14c'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34461): undefined reference to `ShaderLang.cpp.0524b14c'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34493): more undefined references to `ShaderLang.cpp.0524b14c' follow
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34553): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x3456e): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x3457b): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34588): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x345af): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x345bd): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x345d8): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x345e6): undefined reference to `ShaderLang.cpp.0524b14c'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34601): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x3460e): undefined reference to `ShaderLang.cpp.0524b14c'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34629): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34637): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x3465a): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34669): undefined reference to `ShaderLang.cpp.0524b14c'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34684): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34691): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x3469e): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x346ab): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x346c1): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x346ce): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x346dd): undefined reference to `ShaderLang.cpp.0524b14c'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x346f8): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34706): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x3472d): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x3473b): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x34762): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x3476f): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x3477d): undefined reference to `GlslangToSpv.cpp.7fe69451'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x347a4): undefined reference to `SymbolTable.cpp.633f5462'
/usr/bin/ld: /tmp/ccYXMBj5.lto.o:(.debug_info+0x347b1): undefined reference to `SymbolTable.cpp.633f5462'

[..and so on ..]

@tgurr
Copy link

tgurr commented Oct 27, 2022

@kloczek worked here as well as for our CI, maybe the link to our CI run can be of any use for you: https://gitlab.exherbo.org/exherbo/desktop/-/jobs/51185 - and the full log. Note: Our spriv-headers-1.5.5-r5 is actually sdk-1.3.231.0 because the pkg-config SPIRV-Headers.pc file still reads 1.5.5 we kept that versioning and just raise the revision.

@kloczek
Copy link
Author

kloczek commented Oct 27, 2022

Please try to reporosuce that with LTO options.

@tgurr
Copy link

tgurr commented Oct 28, 2022

Please try to reporosuce that with LTO options.

I'm sorry I'm not really sure if I can properly test that as I've no experience in using LTO, for a quick test I've switched the linker from bfd to gold and added -flto to CFLAGS/CXXFLAGS and recompiled just shaderc which still worked for me, but I'm not sure if that's enough. Note: I'm just a package maintainer on Exherbo who stumbled across your post as I've initially ran into the same error before upgrading glslang as well. So I'm not sure if I can be of any more use here.

@kloczek
Copy link
Author

kloczek commented Oct 28, 2022

In the ticket you have exact command with set of params which is failing.
Did you try to reporoduce that?
FYI: I'm unig as well gcc 12.x from Fedora rawhide.

@robindegen
Copy link

@kloczek I was experiencing the same build failure, it was fixed by updating glslang from 11.9.0 to 11.12.0, compiling shaderc 2022.3 against that version succeeded for me then.

I can confirm that this fixed the problem for me too. I did not experience any linker errors after that.

@dneto0
Copy link
Collaborator

dneto0 commented Nov 30, 2022

Shaderc tracks changes in Glslang, loosely.
The tested versions are listed in the DEPS files, and also in the known_good branch. Both are updated somewhat regularly. The known_good branch is updated every 6 weeks or so, corresponding to builds of the LunarG Vulkan SDK.

@dneto0 dneto0 closed this as completed Nov 30, 2022
@kloczek
Copy link
Author

kloczek commented Nov 30, 2022

IIRC all Vulkan components provides npw pkgconfig files so using this is possible precisely (not loosely) control dependencies.

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