libmp4v2-1.9.1 segfaults during compilation. Unsure whether it's my environment or a known issue. Reproducible: Always Steps to Reproduce: 1. emerge libmp4v2 Actual Results: Compile gets to this file and fails, can even reproduce compiling by hand: /bin/sh ./libtool --tag=CXX --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -march=core2 -fvisibility=hidden -c -o src/3gp.lo src/3gp.cpp mkdir src/.libs i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -march=core2 -fvisibility=hidden -c src/3gp.cpp -fPIC -DPIC -o src/.libs/3gp.o i686-pc-linux-gnu-g++: Internal error: Segmentation fault (program cc1plus) Please submit a full bug report. See <http://bugs.gentoo.org/> for instructions. make: *** [src/3gp.lo] Error 1 * * ERROR: media-libs/libmp4v2-1.9.1 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 1087: Called _eapi2_src_compile * ebuild.sh, line 634: Called die * The specific snippet of code: * emake || die "emake failed" * The die message: * emake failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/media-libs/libmp4v2-1.9.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/media-libs/libmp4v2-1.9.1/temp/environment'. * >>> Failed to emerge media-libs/libmp4v2-1.9.1, Log file: >>> '/var/tmp/portage/media-libs/libmp4v2-1.9.1/temp/build.log' * Messages for package media-libs/libmp4v2-1.9.1: * * ERROR: media-libs/libmp4v2-1.9.1 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 1087: Called _eapi2_src_compile * ebuild.sh, line 634: Called die * The specific snippet of code: * emake || die "emake failed" * The die message: * emake failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/media-libs/libmp4v2-1.9.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/media-libs/libmp4v2-1.9.1/temp/environment'.
Created attachment 198869 [details] build.log
Created attachment 198870 [details] environment
Created attachment 198872 [details] emerge --info
Changing ownership to sound herd and CCing hardened. Simon is using non-hardened profile + ~arch, the only 'hardened' thing is hardened-sources. For instance, we still have glibc-2.10 masked, etc. I'll try reproducing this on stable hardened later.
It's g++ that's segfaulting and I can't reproduce this. I'm also using -march=core2, the environment is not far from what I have. So bouncing to toolchain@
core2 is supposed to be used to enable the 64bit extensions on a core2 chip. You have a CHOST of i686. I have absolutely no idea what happens in this circumstance, but I think we might have a clue now. Pick an march that doesn't imply 64bit extensions and see how it works out for you.
Mark, march/mcpu args passed to gcc do not modify target arch and are independent of it. march=core2 should be ok. It could be a number of things, including a hardware issue. Re-opening for now, at least until I can also attempt to reproduce the issue.
Just for the hell of it, I recompiled gcc with no -march and just set -O2 in my CFLAGS. It compiles fine, libmp4v2 still fails with the g++ segfault. Trying to improve my gdb skills (I'm pretty lousy at it) so I can provide some more info. Happy to try any debugging suggestions.
Using this instead of /usr/bin/g++: [pezz@nexus]-[13:04:55]-[~/build/mp4v2-1.9.1] $ /usr/i686-pc-linux-gnu/gcc-bin/4.3.3/i686-pc-linux-gnu-g++ -ggdb -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -g -O2 -fvisibility=hidden -c src/3gp.cpp -fPIC -DPIC -o src/.libs/3gp.o And it compiles. Really seems like something with gcc is messed up on my end.
(In reply to comment #9) > Using this instead of /usr/bin/g++: > > [pezz@nexus]-[13:04:55]-[~/build/mp4v2-1.9.1] > $ /usr/i686-pc-linux-gnu/gcc-bin/4.3.3/i686-pc-linux-gnu-g++ -ggdb > -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -g -O2 > -fvisibility=hidden -c src/3gp.cpp -fPIC -DPIC -o src/.libs/3gp.o > > And it compiles. Really seems like something with gcc is messed up on my end. > What about w/o -ggdb -g?
I'm not really sure what made it compile before, I am unable to reproduce the "good" compile now. [pezz@nexus]-[15:28:51]-[~/build/mp4v2-1.9.1] $ /usr/i686-pc-linux-gnu/gcc-bin/4.3.3/i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -g -O2 -fvisibility=hidden -c src/3gp.cpp -fPIC -DPIC -o src/.libs/3gp.o i686-pc-linux-gnu-g++: Internal error: Segmentation fault (program cc1plus) Same if I remove -g etc. I'm stumped.
Gordon, Thanks for the info. I didn't realize that. Simoon, still, I can't reproduce this, nor can anyone else. You also said it worked once for you and then it didn't. This certainly sounds like some sort of hardware issue on your side.
Happy to leave this closed, but if anyone has some advice on what may be wrong with my environment, I'd appreciate it. I've found when building the package manually, adding: --disable-gch to ./configure makes it fully compile successfully every time, even with crazy optimised CFLAGS/CXXFLAGS.
(In reply to comment #13) > --disable-gch It's now passed by default in 1.9.1.
Reopen. This was actually never solved, only worked around in libmp4v2's ebuild by disabling the precompiled headers. Quoting Zorry from Freenode: pch break the pax's aslr (randmmap)
Actually, bug #301299 isn't a dependency. It's the same issue though. Not a toolchain bug - this is due to hardened-sources.