Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491502 - =media-video/mkvtoolnix-6.5.0 src/merge/libmtxmerge.a(output_control.o): In function `finish_file(bool, bool, bool)': output_control.cpp:(.text+0x66d5): undefined reference to `libebml::EbmlVoid::operator libebml::EbmlId const&() const'
Summary: =media-video/mkvtoolnix-6.5.0 src/merge/libmtxmerge.a(output_control.o): In f...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-17 13:08 UTC by Andrew Savchenko
Modified: 2015-10-16 16:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,158.64 KB, text/x-log)
2013-11-17 13:08 UTC, Andrew Savchenko
Details
environment (environment,119.34 KB, text/plain)
2013-11-17 13:09 UTC, Andrew Savchenko
Details
emerge --info (emerge.info,6.30 KB, text/plain)
2013-11-17 13:09 UTC, Andrew Savchenko
Details
build.log (build.log,104.89 KB, text/x-log)
2014-01-03 03:11 UTC, Andrew Savchenko
Details
environment (environment,119.07 KB, text/plain)
2014-01-03 03:11 UTC, Andrew Savchenko
Details
emerge --info (emerge.info,6.36 KB, text/plain)
2014-01-03 03:12 UTC, Andrew Savchenko
Details
emerge --info (emerge.info,9.00 KB, text/plain)
2014-02-27 19:10 UTC, Andrew Savchenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Savchenko gentoo-dev 2013-11-17 13:08:21 UTC
Hello,

mkvtoolnix-6.5.0 fails to build with libebml-1.3.0:

x86_64-pc-linux-gnu-g++ -Wall -Wno-comment -Wfatal-errors -D_FILE_OFFSET_BITS=64 -DPACKAGE=\"mkvtoolnix\" -DVERSION=\"6.5.0\" -DMTX_LOCALE_DIR=\"/usr/share/locale\" -DMTX_PKG_DATA_DIR=\"/usr/share/mkvtoolnix\" -DMTX_DOC_DIR=\"/usr/share/doc/mkvtoolnix-6.5.0\" -std=c++0x -Wnon-virtual-dtor -Woverloaded-virtual -Wextra -I/usr/include -march=native -O2 -funswitch-loops -fpredictive-commoning -ftree-vectorize -ftree-slp-vectorize -fvect-cost-model -fgcse-after-reload -ftree-partial-pre -ftree-loop-linear -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -fexcess-precision=fast -pipe -fstack-protector -frecord-gcc-switches -fvisibility-inlines-hidden -ffast-math -I. -Ilib -Ilib/avilib-0.6.10 -Ilib/utf8-cpp/source -Isrc -c -MMD -MF ./rake.d/dependency.d/tmp/src_extract_mkvextract_o.d -o src/extract/mkvextract.o -x c++ src/extract/mkvextract.cpp
src/merge/libmtxmerge.a(output_control.o): In function `finish_file(bool, bool, bool)':
output_control.cpp:(.text+0x66d5): undefined reference to `libebml::EbmlVoid::operator libebml::EbmlId const&() const'
collect2: error: ld returned 1 exit status
Comment 1 Andrew Savchenko gentoo-dev 2013-11-17 13:08:50 UTC
Created attachment 363408 [details]
build.log
Comment 2 Andrew Savchenko gentoo-dev 2013-11-17 13:09:03 UTC
Created attachment 363410 [details]
environment
Comment 3 Andrew Savchenko gentoo-dev 2013-11-17 13:09:16 UTC
Created attachment 363412 [details]
emerge --info
Comment 4 Andrew Savchenko gentoo-dev 2013-11-17 13:24:11 UTC
Should be (skipping output from other parallel jobs):

x86_64-pc-linux-gnu-g++ -march=native -O2 -funswitch-loops -fpredictive-commoning -ftree-vectorize -ftree-slp-vectorize -fvect-cost-model -fgcse-after-reload -ftree-partial-pre -ftree-loop-linear -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -fexcess-precision=fast -pipe -fstack-protector -frecord-gcc-switches -Wl,-O1,--as-needed,--sort-common,-z,combreloc,-z,relro,-z,now,--relax,--hash-style=gnu -L/usr/lib64 -Llib/avilib-0.6.10 -Llib/librmff -Lsrc/common -o src/mkvmerge src/merge/mkvmerge.o -Lsrc/merge -lmtxmerge -Lsrc/input -lmtxinput -Lsrc/output -lmtxoutput -lmtxcommon -lmagic -lz -lmatroska -lebml -lz -lpugixml -lboost_regex-1_49 -lboost_filesystem-1_49 -lboost_system-1_49 -lavi -lrmff -Lsrc/mpegparser -lmpegparser -lFLAC -logg -lm -lvorbis -logg
src/merge/libmtxmerge.a(output_control.o): In function `finish_file(bool, bool, bool)':
output_control.cpp:(.text+0x66d5): undefined reference to `libebml::EbmlVoid::operator libebml::EbmlId const&() const'
collect2: error: ld returned 1 exit status
Comment 5 Andrew Savchenko gentoo-dev 2013-11-19 07:15:51 UTC
I found that it compiles with CXXFLAGS="-O2 -pipe" and fails with the same error with CXXFLAGS="-march=native -O2 -pipe". ATM I'm not sure this is a gcc bug, because -march=native is a quite sane flag.

On gcc-4.8.1-r1 on this host -march=native expands to:
$ gcc -### -march=native -c /usr/include/stdlib.h
...
COLLECT_GCC_OPTIONS='-march=native'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.1/cc1 -quiet /usr/include/stdlib.h "-march=nocona" -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt --param "l1-cache-size=0" --param "l1-cache-line-size=0" --param "l2-cache-size=256" "-mtune=nocona" -quiet -dumpbase stdlib.h -auxbase stdlib -o /tmp/cc1M30Yn.s "--output-pch=/usr/include/stdlib.h.gch"
Comment 6 Andrew Savchenko gentoo-dev 2014-01-03 03:11:42 UTC
Created attachment 366806 [details]
build.log

The same problem is still here with gcc-4.8.2, mkvtoolnix-6.6.0 and CXXFLAGS="-march=nocona -O2". Removal of either -march=nocona or -O2 allows program to compile. Looks like some nasty gcc bug...
Comment 7 Andrew Savchenko gentoo-dev 2014-01-03 03:11:59 UTC
Created attachment 366808 [details]
environment
Comment 8 Andrew Savchenko gentoo-dev 2014-01-03 03:12:17 UTC
Created attachment 366810 [details]
emerge --info
Comment 9 Andrew Savchenko gentoo-dev 2014-02-27 19:09:14 UTC
The same problem on another host and another arch (~x86).

If output_control.cpp is compiled with CXXFLAGS="-O2", link fails as above. If compiled with -O1, links fine.

mkvtoolnix-6.7.0, gcc-4.8.2.
Comment 10 Andrew Savchenko gentoo-dev 2014-02-27 19:10:03 UTC
Created attachment 371398 [details]
emerge --info
Comment 11 Alexis Ballier gentoo-dev 2015-10-16 07:04:13 UTC
please try with latest mkvtoolnix/gcc, maybe it was a bug somewhere else that was fixed meanwhile
Comment 12 Andrew Savchenko gentoo-dev 2015-10-16 16:45:52 UTC
Hi,

with gcc-4.9.3 and mkvtoolnix-8.4.0 on one ~x86 box I can't reproduce this bug. Two other boxes are not suitable for testing right now.