Bug 1234405 - FTBFS: mkvtoolnix-8.0.0 fails to compile due to undefined reference in /usr/include/gtest/gtest-printers.h
Summary: FTBFS: mkvtoolnix-8.0.0 fails to compile due to undefined reference in /usr/...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mkvtoolnix
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dominik 'Rathann' Mierzejewski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-22 13:35 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2015-08-03 11:52 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-08-03 11:52:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2015-06-22 13:35:10 UTC
Description of problem:
mkvtoolnix-8.0.0 fails to compile.

Version-Release number of selected component (if applicable):
8.0.0-1.fc23

How reproducible:
Always.

Actual results:
g++ -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/lib64 -Llib/avilib-0.6.10 -Llib/librmff -Lsrc/common -o tests/unit/common/common tests/unit/common/basic_timecode_c.o tests/unit/common/ebml_segmentinfo_converter.o tests/unit/common/option_with_source.o tests/unit/common/ebml_tags_converter.o tests/unit/common/common.o tests/unit/common/fourcc.o tests/unit/common/list_utils.o tests/unit/common/mm_io.o tests/unit/common/construct_equality.o tests/unit/common/ebml_chapters_converter.o tests/unit/common/strings_formatting.o tests/unit/common/endian.o tests/unit/common/math.o tests/unit/common/checksums.o tests/unit/common/codec.o tests/unit/common/bit_cursor.o -Ltests/unit -lmtxunittest -lmtxcommon -lmagic -lz -lmatroska -lebml -lz -lpugixml -lboost_regex -lboost_filesystem -lboost_system -lgtest -lpthread
tests/unit/common/list_utils.o: In function `void testing_internal::DefaultPrintNonContainerTo<boost::optional<void*> >(boost::optional<void*> const&, std::ostream*)':
/usr/include/gtest/gtest-printers.h:245: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& boost::operator<< <char, std::char_traits<char>, void*>(std::basic_ostream<char, std::char_traits<char> >&, boost::optional<void*> const&)'
tests/unit/common/list_utils.o: In function `void testing_internal::DefaultPrintNonContainerTo<boost::optional<int> >(boost::optional<int> const&, std::ostream*)':
/usr/include/gtest/gtest-printers.h:245: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& boost::operator<< <char, std::char_traits<char>, int>(std::basic_ostream<char, std::char_traits<char> >&, boost::optional<int> const&)'
collect2: error: ld returned 1 exit status

Comment 1 Dominik 'Rathann' Mierzejewski 2015-06-22 19:21:27 UTC
Filed bug upstream: https://github.com/mbunkus/mkvtoolnix/issues/1284 .

Comment 2 Dominik 'Rathann' Mierzejewski 2015-06-23 08:06:20 UTC
Looks like upstream cannot reproduce it with gcc-5.1.0.

Jakub, could you take a look and tell us if this is a gcc bug or not?

Comment 3 Dominik 'Rathann' Mierzejewski 2015-06-23 08:15:00 UTC
Cc'ing gtest maintainers as well.

Comment 4 Marek Polacek 2015-06-23 08:23:16 UTC
It's not clear to me which exact version of gcc "fails".  In any case, without a preprocessed source file there's not much we can do.

Comment 5 Dominik 'Rathann' Mierzejewski 2015-06-23 12:06:33 UTC
This is not happening when built in F21 mock, only in F22+, so I'm leaning towards a gcc-5.1.1 bug, reassigning accordingly.

Steps to reproduce:
1. fedpkg clone mkvtoolnix (git commit e5d1ca5af3ff135d9aee16d1857226c3a2e095c9)
2. comment out %patch1 so that it doesn't get applied
3. fedpkg mockbuild

I'll try to get the preprocessed source in the meantime.

Comment 6 Jonathan Wakely 2015-06-26 12:16:17 UTC
Does the code include the right header for the definition of that operator?

In addition to <boost/optional/optional.hpp> you need:

#include <boost/optional/optional_io.hpp>

Comment 7 Jonathan Wakely 2015-06-26 12:24:43 UTC
Grepping the sources shows that header is not included anywhere, so this is not a gcc bug, but an upstream bug. Probably revealed by using a newer Boost version that includes this change:
https://svn.boost.org/trac/boost/ticket/2103

Previously the code was probably doing the wrong thing and just printing a boolean value to the stream.

https://svn.boost.org/trac/boost/ticket/10825 is another upstream change to make the link error into a compile-time error, but mkvtoolnix still needs to be fixed either way.

Comment 8 Dominik 'Rathann' Mierzejewski 2015-06-28 20:49:14 UTC
Thank you very much for detailed analysis. You're right, adding the #include from ticket 10825 does fix the issue and I mentioned it in upstream bug report. Thanks again.

Comment 9 Jan Kurik 2015-07-15 13:57:43 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 10 Nicolas Chauvet (kwizart) 2015-08-03 11:52:19 UTC
fixed upstream as
https://github.com/mbunkus/mkvtoolnix/issues/1284
Closing.


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