# Build of multimedia/mkvtoolnix failed



## YuryG (Oct 14, 2019)

Tried to upgrade multimedia/mkvtoolnix from 37.0.0 to 38.0.0. And it failed for me (`make` from ports' tree), although I rebuilt all dependencies (flac, libvorbis, libogg, libebml, pugixml, libmatroska, boost-libs).
The error is on its link stage.

```
LINK tests/unit/common/common
c++ -fstack-protector-strong -Llib/fmt/src -fstack-protector-strong -L/usr/local/lib -Llib/avilib-0.6.10 -Llib/librmff -Lsrc/common -o tests/unit/common/common tests/unit/common/basic_timecode_c.o tests/unit/common/bit_reader.o tests/unit/common/bit_writer.o tests/unit/common/byte_buffer.o tests/unit/common/checksums.o tests/unit/common/codec.o tests/unit/common/common.o tests/unit/common/construct_equality.o tests/unit/common/ebml_chapters_converter.o tests/unit/common/ebml_segmentinfo_converter.o tests/unit/common/ebml_tags_converter.o tests/unit/common/endian.o tests/unit/common/fourcc.o tests/unit/common/list_utils.o tests/unit/common/math.o tests/unit/common/memory.o tests/unit/common/mm_io.o tests/unit/common/mm_text_io.o tests/unit/common/option_with_source.o tests/unit/common/strings_editing.o tests/unit/common/strings_formatting.o tests/unit/common/strings_parsing.o tests/unit/common/version.o -Ltests/unit -lmtxunittest -lmtxcommon -lboost_filesystem -lboost_regex -lboost_system -lmagic -lz -lFLAC -logg -lm -lz -L/usr/local/lib -lpugixml -lfmt -L/usr/local/lib -lcmark -L/usr/local/lib -lmatroska -L/usr/local/lib -lebml -lgtest -lpthread
          LINK tests/unit/merge/merge
c++ -fstack-protector-strong -Llib/fmt/src -fstack-protector-strong -L/usr/local/lib -Llib/avilib-0.6.10 -Llib/librmff -Lsrc/common -o tests/unit/merge/merge tests/unit/merge/item_selector.o tests/unit/merge/merge.o tests/unit/merge/timestamp_calculator.o -Lsrc/merge -lmtxmerge -Ltests/unit -lmtxunittest -lmtxcommon -lboost_filesystem -lboost_regex -lboost_system -lmagic -lz -lFLAC -logg -lm -lz -L/usr/local/lib -lpugixml -lfmt -L/usr/local/lib -lcmark -L/usr/local/lib -lmatroska -L/usr/local/lib -lebml -lgtest -lpthread
tests/unit/merge/item_selector.o: In function `(anonymous namespace)::ItemSelector_NoneEmpty_Test::TestBody()':
item_selector.cpp:(.text+0x14d): undefined reference to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)'
item_selector.cpp:(.text+0x294): undefined reference to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)'
tests/unit/merge/item_selector.o: In function `(anonymous namespace)::ItemSelector_NoneIDsOnly_Test::TestBody()':
item_selector.cpp:(.text+0x6f7): undefined reference to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)'
item_selector.cpp:(.text+0x83e): undefined reference to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)'
tests/unit/merge/item_selector.o: In function `(anonymous namespace)::ItemSelector_NoneLanguagesOnly_Test::TestBody()':
item_selector.cpp:(.text+0xcc8): undefined reference to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)'
tests/unit/merge/item_selector.o:item_selector.cpp:(.text+0xdfd): more undefined references to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)' follow
tests/unit/merge/timestamp_calculator.o: In function `testing::AssertionResult testing::internal::CmpHelperEQFailure<basic_timestamp_c<long>, basic_timestamp_c<long> >(char const*, char const*, basic_timestamp_c<long> const&, basic_timestamp_c<long> const&)':
timestamp_calculator.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureI17basic_timestamp_cIlES3_EENS_15AssertionResultEPKcS6_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureI17basic_timestamp_cIlES3_EENS_15AssertionResultEPKcS6_RKT_RKT0_]+0x59): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
tests/unit/common/bit_reader.o: In function `(anonymous namespace)::BitReader_GetBit_Test::TestBody()':
bit_reader.cpp:(.text+0x5eb): undefined reference to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)'
bit_reader.cpp:(.text+0x6ce): undefined reference to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)'
bit_reader.cpp:(.text+0x7b1): undefined reference to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)'
bit_reader.cpp:(.text+0x894): undefined reference to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)'
bit_reader.cpp:(.text+0x96a): undefined reference to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)'
tests/unit/common/bit_reader.o:bit_reader.cpp:(.text+0xa5a): more undefined references to `testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)' follow
tests/unit/common/bit_reader.o: In function `testing::AssertionResult testing::internal::CmpHelperEQFailure<int, int>(char const*, char const*, int const&, int const&)':
bit_reader.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureIiiEENS_15AssertionResultEPKcS4_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureIiiEENS_15AssertionResultEPKcS4_RKT_RKT0_]+0x59): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)'
tests/unit/common/bit_reader.o: In function `testing::AssertionResult testing::internal::CmpHelperEQFailure<int, unsigned long>(char const*, char const*, int const&, unsigned long const&)':
bit_reader.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureIimEENS_15AssertionResultEPKcS4_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureIimEENS_15AssertionResultEPKcS4_RKT_RKT0_]+0x59): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)'
tests/unit/common/bit_reader.o: In function `testing::AssertionResult testing::internal::CmpHelperEQFailure<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)':
bit_reader.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES8_EENS_15AssertionResultEPKcSB_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES8_EENS_15AssertionResultEPKcSB_RKT_RKT0_]+0x59): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)'
tests/unit/common/bit_reader.o: In function `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > testing::PrintToString<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)':
bit_reader.cpp:(.text._ZN7testing13PrintToStringINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEES7_RKT_[_ZN7testing13PrintToStringINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEES7_RKT_]+0xe1): undefined reference to `testing::internal::PrintStringTo(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_ostream<char, std::__1::char_traits<char> >*)'
tests/unit/common/bit_reader.o: In function `testing::AssertionResult testing::internal::CmpHelperEQFailure<int, long>(char const*, char const*, int const&, long const&)':
bit_reader.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureIilEENS_15AssertionResultEPKcS4_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureIilEENS_15AssertionResultEPKcS4_RKT_RKT0_]+0x59): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)'
tests/unit/common/bit_reader.o: In function `testing::AssertionResult testing::internal::CmpHelperEQFailure<int, unsigned char>(char const*, char const*, int const&, unsigned char const&)':
bit_reader.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureIihEENS_15AssertionResultEPKcS4_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureIihEENS_15AssertionResultEPKcS4_RKT_RKT0_]+0x59): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)'
tests/unit/common/bit_reader.o: In function `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > testing::PrintToString<unsigned char>(unsigned char const&)':
bit_reader.cpp:(.text._ZN7testing13PrintToStringIhEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKT_[_ZN7testing13PrintToStringIhEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKT_]+0xe1): undefined reference to `testing::internal::PrintTo(unsigned char, std::__1::basic_ostream<char, std::__1::char_traits<char> >*)'
tests/unit/common/bit_reader.o: In function `testing::AssertionResult testing::internal::CmpHelperEQFailure<int, unsigned short>(char const*, char const*, int const&, unsigned short const&)':
bit_reader.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureIitEENS_15AssertionResultEPKcS4_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureIitEENS_15AssertionResultEPKcS4_RKT_RKT0_]+0x59): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)'
tests/unit/common/bit_writer.o: In function `testing::AssertionResult testing::internal::CmpHelperEQFailure<int, unsigned int>(char const*, char const*, int const&, unsigned int const&)':
bit_writer.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureIijEENS_15AssertionResultEPKcS4_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureIijEENS_15AssertionResultEPKcS4_RKT_RKT0_]+0x59): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)'
tests/unit/common/bit_writer.o: In function `testing::AssertionResult testing::internal::CmpHelperEQFailure<unsigned int, unsigned int>(char const*, char const*, unsigned int const&, unsigned int const&)':
bit_writer.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureIjjEENS_15AssertionResultEPKcS4_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureIjjEENS_15AssertionResultEPKcS4_RKT_RKT0_]+0x59): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)'
tests/unit/common/bit_writer.o: In function `testing::AssertionResult testing::internal::CmpHelperEQFailure<unsigned long long, unsigned long>(char const*, char const*, unsigned long long const&, unsigned long const&)':
bit_writer.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureIymEENS_15AssertionResultEPKcS4_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureIymEENS_15AssertionResultEPKcS4_RKT_RKT0_]+0x59): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)'
tests/unit/common/checksums.o: In function `testing::AssertionResult testing::internal::CmpHelperEQFailure<unsigned int, unsigned long>(char const*, char const*, unsigned int const&, unsigned long const&)':
checksums.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureIjmEENS_15AssertionResultEPKcS4_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureIjmEENS_15AssertionResultEPKcS4_RKT_RKT0_]+0x59): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)'
tests/unit/common/checksums.o:checksums.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureI8memory_cS2_EENS_15AssertionResultEPKcS5_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureI8memory_cS2_EENS_15AssertionResultEPKcS5_RKT_RKT0_]+0x59): more undefined references to `testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)' follow
tests/unit/common/checksums.o: In function `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > testing::PrintToString<memory_c>(memory_c const&)':
checksums.cpp:(.text._ZN7testing13PrintToStringI8memory_cEENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKT_[_ZN7testing13PrintToStringI8memory_cEENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKT_]+0xf1): undefined reference to `testing::internal2::PrintBytesInObjectTo(unsigned char const*, unsigned long, std::__1::basic_ostream<char, std::__1::char_traits<char> >*)'
tests/unit/common/codec.o: In function `(anonymous namespace)::Codec_LookUpStringAudio_Test::TestBody()':

...

c++: error: linker command failed with exit code 1 (use -v to see invocation)
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/mkvtoolnix
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/mkvtoolnix
```
As I can guess, there's some compiler troubles due to some of my other ports?
Any help would be appreciated.


----------

