Bug 2065272 - luminance-hdr: FTBFS in Fedora Rawhide
Summary: luminance-hdr: FTBFS in Fedora Rawhide
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: luminance-hdr
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On: 2065758
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-17 14:40 UTC by Ben Beasley
Modified: 2022-03-30 13:57 UTC (History)
4 users (show)

Fixed In Version: luminance-hdr-2.6.1.1-41.fc37
Clone Of:
Environment:
Last Closed: 2022-03-30 13:57:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ben Beasley 2022-03-17 14:40:00 UTC
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.

Comment 1 Ben Beasley 2022-03-17 19:44:38 UTC
I’m not sure what the root cause is here.

Comment 2 Kevin Kofler 2022-03-18 17:27:00 UTC
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.)

Comment 3 Ben Beasley 2022-03-18 18:50:38 UTC
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.

Comment 4 Kevin Kofler 2022-03-18 18:55:32 UTC
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.)

Comment 5 Ben Beasley 2022-03-18 18:56:44 UTC
(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.

Comment 6 Ben Beasley 2022-03-18 19:00:12 UTC
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.

Comment 7 Fedora Update System 2022-03-19 12:51:15 UTC
FEDORA-2022-fc75a7adfb has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-fc75a7adfb

Comment 8 Fedora Update System 2022-03-19 12:54:00 UTC
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.

Comment 9 Ben Beasley 2022-03-25 12:45:37 UTC
Reopening since there seems to be a chance of figuring out the root cause via bug 2068343.

Comment 10 Ben Beasley 2022-03-30 13:57:32 UTC
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


Note You need to log in before you can comment on or make changes to this bug.