Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: Package luminance-hdr fails to build from source in Fedora Rawhide. Version-Release number of selected component (if applicable): 2.6.1.1-40.fc36 Steps to Reproduce: koji build --scratch f37 luminance-hdr-2.6.1.1-40.fc36.src.rpm Additional info: This package is tracked by Koschei. See: https://koschei.fedoraproject.org/package/luminance-hdr The build fails on aarch64 and x86_64 and succeeds on ppc64le: /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char, unsigned long) const.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned long) const.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long)@GLIBCXX_3.4.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned long) const.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned long, unsigned long) const.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned long, unsigned long) const.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned long)@GLIBCXX_3.4.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(unsigned long, unsigned long, char const*) const.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_of(char const*, unsigned long, unsigned long) const.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_of(char const*, unsigned long, unsigned long) const.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::swap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@GLIBCXX_3.4.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const.21' /usr/bin/ld: /usr/lib64/libQt5WebEngineCore.so.5.15.8: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21' This seems to be associated with the update of qt5-qtwebengine from 5.15.8-3 to 5.15.8-5.
I’m not sure what the root cause is here.
I see that the package builds using -std=gnu++11, maybe it should be using a newer standard revision? (Definitely not an older one, Qt no longer supports C++98.)
I just tried patching it to gnu++14 (the CMake scripts for luminance-hdr override -DCMAKE_CXX_STANDARD, so I can’t just set it), and saw the same thing. It makes sense, since according to the linker it’s libQt5WebEngineCore.so.5.15.8 that has the undefined references, not anything in luminance-hdr. In theory I could try patching it to gnu++17, but that would require some source changes. (It defines its own clamp function that gets confused with C++17’s std::clamp). I thought that maybe since qt5-qtwebengine used libstdc++-static, qt5-webenengine might just need a rebuild, but I tried that locally and that didn’t seem to help either.
QtWebEngine itself does not statically link libstdc++, only some bundled build tools (at least gn) get statically linked for some stupid reason I cannot fathom. (The Chromium build system does all sorts of strange things.)
(In reply to Kevin Kofler from comment #4) > QtWebEngine itself does not statically link libstdc++, only some bundled > build tools (at least gn) get statically linked for some stupid reason I > cannot fathom. (The Chromium build system does all sorts of strange things.) That makes sense, thanks.
Would you believe that disabling LTO in luminance-hdr fixes the linker error? There’s a bug there somewhere, but I don’t think I’m going to be able to figure out what or where it is.
FEDORA-2022-fc75a7adfb has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-fc75a7adfb
FEDORA-2022-fc75a7adfb has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.
Reopening since there seems to be a chance of figuring out the root cause via bug 2068343.
The root cause was fixed in binutils-2.38-7.fc37[1], so I have restored LTO in luminance-hdr. I’ll do a build once the binutils update actually hits the koji buildroot. [1] https://bugzilla.redhat.com/show_bug.cgi?id=2068343#c3