Created attachment 303567 [details] emerge --info Build fails on amd64 hardened: x86_64-pc-linux-gnu-g++ -c -include kdiff3 -pipe -O2 -pipe -march=native -mtune=native -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -Isrc-QT4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Isrc-QT4 -Isrc-QT4/kreplacements -I. -I. -o main.o src-QT4/main.cpp cc1plus: error: one or more PCH files were found, but they were invalid cc1plus: error: use -Winvalid-pch for more information cc1plus: fatal error: kdiff3: No such file or directory compilation terminated. Any ideas?
Could not confirm on amd64 non-hardened. Please attach full build.log.
Created attachment 303691 [details] build.log build.log: There not much new there.. Could the suggested -Winvalid-pch flag help? How can I enable it?
Created attachment 303745 [details] successful build.log I'm thinking the error is earlier--almost nothing happens in your configure phase, just "Running qmake", whereas when I emerge kdiff3 it runs a bunch of normal KDE configuration checks. I've attached the build.log from my successful emerge for comparison.
figured it out. -Winvalid-pch gave me: g++ -c -include kdiff3 -pipe -O2 -Winvalid-pch -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -Isrc-QT4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Isrc-QT4 -Isrc-QT4/kreplacements -I. -I. -o main.o src-QT4/main.cpp cc1plus: warning: ./kdiff3.gch/c++: had text segment at different address cc1plus: warning: src-QT4/kdiff3.gch/c++: had text segment at different address cc1plus: error: one or more PCH files were found, but they were invalid cc1plus: fatal error: kdiff3: No such file or directory related bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39206 pax address-space randomization somehow messes up PCH files. workaround is "echo 0 > /proc/sys/kernel/randomize_va_space" before compiling. the program itself works fine with address-space randomization enabled.
That's strange, I'm unable to reproduce with amd64 hardened and randomize_va_space = 2. Do you somehow have x11-libs/qt-core merged with USE="pch" by any chance?
unlikely, the pch flag is masked [ebuild R ] x11-libs/qt-core-4.8.0-r1 USE="exceptions glib iconv optimized-qmake qt3support ssl (-aqua) (-c++0x) -debug (-pch) (-qpa)" 0 kB
Cc'ing hardened team for potential insights...
Can you check what pax mark you have on cc1 and cc1plus? laptop1 4.6.3 # paxctl -v cc1plus PaX control v0.7 Copyright 2004,2005,2006,2007,2009,2010,2011,2012 PaX Team <pageexec@freemail.hu> - PaX flags: -------x-e-r [cc1plus] RANDEXEC is disabled EMUTRAMP is disabled RANDMMAP is disabled It compile fine for me. * Updating shared mime info database ... >>> kde-misc/kdiff3-0.9.96 merged. laptop1 4.6.3 # emerge --info Portage 2.1.10.57 (hardened/linux/amd64, gcc-4.6.3, glibc-2.14.1-r2, 3.3.0-hardened x86_64) ================================================================= System uname: Linux-3.3.0-hardened-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_720_@_1.60GHz-with-gentoo-2.1 Timestamp of tree: Tue, 01 May 2012 17:45:01 +0000 app-shells/bash: 4.2_p24 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.6.7-r2, 2.7.2-r3, 3.1.4-r3, 3.2.2-r1 dev-util/cmake: 2.8.7-r5 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1 sys-apps/openrc: 0.9.9.3 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.8.5-r4, 1.9.6-r3, 1.11.4 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.4.4-r2, 4.5.3-r2, 4.6.3, 4.7.0::hardened-dev sys-devel/gcc-config: 1.6 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.3 (virtual/os-headers) sys-libs/glibc: 2.14.1-r2 CHOST="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core2" CXXFLAGS="-O2 -pipe -march=core2"
Hi! Thanks for looking into this. I just tried to rebuild kdiff3 with pax enabled and it worked. I'm not sure what changed.. maybe an update fixed something. For the record: mart@artemis /usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3 $ paxctl -v cc1 PaX control v0.7 Copyright 2004,2005,2006,2007,2009,2010,2011,2012 PaX Team <pageexec@freemail.hu> - PaX flags: -------x-e-r [cc1] RANDEXEC is disabled EMUTRAMP is disabled RANDMMAP is disabled mart@artemis /usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3 $ paxctl -v cc1plus PaX control v0.7 Copyright 2004,2005,2006,2007,2009,2010,2011,2012 PaX Team <pageexec@freemail.hu> - PaX flags: -------x-e-r [cc1plus] RANDEXEC is disabled EMUTRAMP is disabled RANDMMAP is disabled
(In reply to comment #9) > Hi! Thanks for looking into this. > > I just tried to rebuild kdiff3 with pax enabled and it worked. I'm not sure > what changed.. maybe an update fixed something. > > > For the record: > mart@artemis /usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3 $ paxctl -v cc1 > PaX control v0.7 > Copyright 2004,2005,2006,2007,2009,2010,2011,2012 PaX Team > <pageexec@freemail.hu> > > - PaX flags: -------x-e-r [cc1] > RANDEXEC is disabled > EMUTRAMP is disabled > RANDMMAP is disabled > mart@artemis /usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3 $ paxctl -v cc1plus > PaX control v0.7 > Copyright 2004,2005,2006,2007,2009,2010,2011,2012 PaX Team > <pageexec@freemail.hu> > > - PaX flags: -------x-e-r [cc1plus] > RANDEXEC is disabled > EMUTRAMP is disabled > RANDMMAP is disabled We only recently disabled RANDMMAP on cc1 and cc1plus. With it on, you hit the bug, off and you avoid it.