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
Filed bug upstream: https://github.com/mbunkus/mkvtoolnix/issues/1284 .
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?
Cc'ing gtest maintainers as well.
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.
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.
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>
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.
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.
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
fixed upstream as https://github.com/mbunkus/mkvtoolnix/issues/1284 Closing.