Bug 1729455

Summary: Sometimes fails to build
Product: [Fedora] Fedora Reporter: Milan Crha <mcrha>
Component: highlightAssignee: Kevin Fenzi <kevin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: jochen, kevin, lxtnow, rosset.filipe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: highlight-3.52-2.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-29 01:08:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milan Crha 2019-07-12 10:48:16 UTC
I do not know why, but my local build of highlight (using rpm2flatpak and flatpak-module local-build --install) sometimes fails to build with the below error message. I re-run the build and it succeeds, which makes me wonder what can be the problem there.

This is not meant as a real bug report, it's rather a question whether you'd not think of anything what would help to resolve this and make the build of the highlight package consistent.

I can share with you my build script. Note the rpm2flatpak requires changes in the spec file recorded in bug #1728753.

The error:

DEBUG: make[1]: Entering directory '/builddir/build/BUILD/highlight-3.52/src'
DEBUG: g++ -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/app/lib64 -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/app/lib64 -o highlight arg_parser.o cmdlineoptions.o main.o help.o -L. -lhighlight -llua -lm -ldl 
DEBUG: make[1]: Leaving directory '/builddir/build/BUILD/highlight-3.52/src'
DEBUG: BUILDSTDERR: /usr/bin/ld: main.o: in function `HLCmdLineApp::printBadInstallationInfo()':
DEBUG: BUILDSTDERR: /usr/include/c++/9/bits/basic_string.h:6421: undefined reference to `DataDir::LSB_DATA_DIR[abi:cxx11]'
DEBUG: BUILDSTDERR: /usr/bin/ld: main.o: in function `HLCmdLineApp::collectPluginPaths(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)':
DEBUG: BUILDSTDERR: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:320: undefined reference to `DataDir::getPluginPath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
DEBUG: BUILDSTDERR: /usr/bin/ld: main.o: in function `HLCmdLineApp::printConfigInfo()':
DEBUG: BUILDSTDERR: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:244: undefined reference to `DataDir::printConfigPaths()'
DEBUG: BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:245: undefined reference to `DataDir::getFiletypesConfPath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
DEBUG: BUILDSTDERR: /usr/bin/ld: main.o: in function `HLCmdLineApp::run(int, char const**)':
DEBUG: BUILDSTDERR: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:338: undefined reference to `DataDir::initSearchDirectories(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
DEBUG: BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:351: undefined reference to `DataDir::loadFileTypeConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
DEBUG: BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:356: undefined reference to `DataDir::getThemePath[abi:cxx11]()'
DEBUG: BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:375: undefined reference to `DataDir::getThemePath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
DEBUG: BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:362: undefined reference to `DataDir::getLangPath[abi:cxx11]()'
DEBUG: BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:359: undefined reference to `DataDir::getPluginPath[abi:cxx11]()'
DEBUG: BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:510: undefined reference to `DataDir::guessFileType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool)'
DEBUG: BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:533: undefined reference to `DataDir::getLangPath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
DEBUG: BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:518: undefined reference to `DataDir::getFileSuffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
DEBUG: BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:518: undefined reference to `DataDir::guessFileType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool)'
DEBUG: BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/highlight-3.52/src/./cli/main.cpp:509: undefined reference to `DataDir::getFileSuffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
DEBUG: BUILDSTDERR: collect2: error: ld returned 1 exit status
DEBUG: BUILDSTDERR: make[1]: *** [makefile:106: cli] Error 1
DEBUG: BUILDSTDERR: make: *** [makefile:43: all] Error 2

Comment 1 Milan Crha 2019-07-12 11:31:32 UTC
For the record, the relevant part of the build log from the successful build looks like this:

DEBUG: g++ -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/app/lib64 -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/app/lib64 -o highlight arg_parser.o cmdlineoptions.o main.o help.o -L. -lhighlight -llua -lm -ldl 
DEBUG: make[1]: Leaving directory '/builddir/build/BUILD/highlight-3.52/src'
DEBUG: make[2]: Entering directory '/builddir/build/BUILD/highlight-3.52/src/gui-qt'
DEBUG: g++ -c -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I. -I. -I../include -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o qrc_highlight-gui.o qrc_highlight-gui.cpp
DEBUG: make[2]: Leaving directory '/builddir/build/BUILD/highlight-3.52/src/gui-qt'

Comment 2 Filipe Rosset 2019-07-12 13:18:52 UTC
I was talking with upstream about this failure that came back to 3.52 release.
Can you please try to disable paralell builds? (we had to disable it in the past).

https://gitlab.com/saalen/highlight/issues/128

Comment 4 Fedora Update System 2019-07-13 23:44:38 UTC
FEDORA-2019-3bff004fa1 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-3bff004fa1

Comment 5 Fedora Update System 2019-07-14 03:07:45 UTC
highlight-3.52-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-3bff004fa1

Comment 6 Milan Crha 2019-07-15 10:46:37 UTC
Thanks, it looks promising, I ran 4 builds and all of them succeeded, while before the change "every second" build failed.

For the change itself, I'm wondering whether you could still use the %make_build macro, only pass to it -j1 argument as an override for the -jNNN provided by the macro itself. I'm not used to these things, thus I can be completely wrong about it.

Comment 7 Fedora Update System 2019-07-29 01:08:16 UTC
highlight-3.52-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.