Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916312 - media-libs/shaderc-2023.6 fails to compile ld.lld: error: undefined symbol: glslang::TShader::preprocess(TBuiltInResource const*, int, EProfile, bool, bool, EShMessages, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*
Summary: media-libs/shaderc-2023.6 fails to compile ld.lld: error: undefined symbol: g...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Nick Sarnie
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2023-10-26 22:57 UTC by Denis Strizhkin
Modified: 2024-01-19 05:28 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
default LDFLAGS and -flto=thin (build_lto_thin.log,24.19 KB, text/x-log)
2023-10-26 22:57 UTC, Denis Strizhkin
Details
emerge --info (emerge-info.txt,17.75 KB, text/plain)
2023-10-26 22:57 UTC, Denis Strizhkin
Details
Wl,--undefined-version and -flto=thin (build_lto_thin_Wl_undefined.log,24.34 KB, text/x-log)
2023-10-26 22:59 UTC, Denis Strizhkin
Details
Wl,--undefined-version and no flto (build_no_lto_Wl_undefined.log,24.00 KB, text/x-log)
2023-10-26 23:00 UTC, Denis Strizhkin
Details
gcc fallback also fails (build_gcc.log,22.73 KB, text/x-log)
2023-10-26 23:01 UTC, Denis Strizhkin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Strizhkin 2023-10-26 22:57:06 UTC
Created attachment 873502 [details]
default LDFLAGS and -flto=thin

media-libs/shaderc fails to build on llvm system

FAILED: glslc/glslc 
: && /usr/lib/llvm/17/bin/clang++ -O3 -pipe -flto=thin -Wimplicit-fallthrough -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed glslc/CMakeFiles/glslc_exe.dir/src/main.cc.o -o glslc/glslc  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 && :
ld.lld: error: undefined symbol: glslang::TShader::preprocess(TBuiltInResource const*, int, EProfile, bool, bool, EShMessages, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, glslang::TShader::Includer&)
>>> referenced by compiler.cc
>>>               lto.tmp:(shaderc_util::Compiler::Compile(shaderc_util::string_piece const&, EShLanguage, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, char const*, std::__1::function<EShLanguage (std::__1::basic_ostream<char, std::__1::char_traits<char>>*, shaderc_util::string_piece const&)> const&, shaderc_util::CountingIncluder&, shaderc_util::Compiler::OutputType, std::__1::basic_ostream<char, std::__1::char_traits<char>>*, unsigned long*, unsigned long*) const)

ld.lld: error: undefined symbol: glslang::TShader::setResourceSetBinding(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)
>>> referenced by compiler.cc
>>>               lto.tmp:(shaderc_util::Compiler::Compile(shaderc_util::string_piece const&, EShLanguage, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, char const*, std::__1::function<EShLanguage (std::__1::basic_ostream<char, std::__1::char_traits<char>>*, shaderc_util::string_piece const&)> const&, shaderc_util::CountingIncluder&, shaderc_util::Compiler::OutputType, std::__1::basic_ostream<char, std::__1::char_traits<char>>*, unsigned long*, unsigned long*) const)

ld.lld: error: undefined symbol: glslang::GlslangToSpv(glslang::TIntermediate const&, std::__1::vector<unsigned int, std::__1::allocator<unsigned int>>&, glslang::SpvOptions*)
>>> referenced by compiler.cc
>>>               lto.tmp:(shaderc_util::Compiler::Compile(shaderc_util::string_piece const&, EShLanguage, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, char const*, std::__1::function<EShLanguage (std::__1::basic_ostream<char, std::__1::char_traits<char>>*, shaderc_util::string_piece const&)> const&, shaderc_util::CountingIncluder&, shaderc_util::Compiler::OutputType, std::__1::basic_ostream<char, std::__1::char_traits<char>>*, unsigned long*, unsigned long*) const)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 Denis Strizhkin 2023-10-26 22:57:35 UTC
Created attachment 873503 [details]
emerge --info
Comment 2 Denis Strizhkin 2023-10-26 22:59:05 UTC
Created attachment 873504 [details]
Wl,--undefined-version and -flto=thin
Comment 3 Denis Strizhkin 2023-10-26 23:00:03 UTC
Created attachment 873505 [details]
Wl,--undefined-version and no flto
Comment 4 Denis Strizhkin 2023-10-26 23:01:00 UTC
Created attachment 873506 [details]
gcc fallback also fails
Comment 5 Denis Strizhkin 2023-10-27 00:24:42 UTC
Was able to compile by compiling both dev-util/spriv-tools and dev-util/glslang without lto
Comment 6 Nick Sarnie gentoo-dev 2023-10-30 01:16:11 UTC
If it's an LTO issue, can you please report this upstream? Thanks
Comment 7 Nick Sarnie gentoo-dev 2024-01-19 03:09:33 UTC
Is this still reproducible?
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-19 05:28:07 UTC
IIRC from discussion on irc, i got the impression that libstdc++/libc++ had been mixed, but this was a while ago