jueves, 5 de mayo de 2011

solving MKVToolnix compile crash


When trying to compile mkvtoolnix 4.6 on Ubuntu 10.10, the compiler crashed with the following error message:



(in /home/agonzalez/src/mkvtoolnix-4.6.0)
CXX src/input/flac_common.cpp
cc1plus: internal compiler error: Segmentation fault
Please submit a full bug report, with preprocessed source if appropriate.


The solution is discussed at Gentoo's BugZilla in bug 311595.



In a few words, the problem is solved by compiling the source files that give problems with a special command line. This line was, in my case:



g++ -O3 -march=barcelona -O2 -ftracer -ftree-vectorize -g -ggdb -fvisibility-inlines-hidden -DPACKAGE=\"mkvtoolnix\" -DVERSION=\"4.7.0\" -DMTX_LOCALE_DIR=\"/usr/share/locale\" -DMTX_PKG_DATA_DIR=\"/usr/share/mkvtoolnix\" -I. -Ilib -Ilib/avilib-0.6.10 -Ilib/utf8-cpp/source -Isrc -Ilib/libebml -MMD -c -o src/input/flac_common.o src/input/flac_common.cpp

This compiles src/input/flac_common.cpp into object file src/input/flac_common.o. I had to repeat this for src/common/curl.cpp, changing the corresponding filenames in the command line.