I have tried to install Gentoo on my new laptop. When compiling kdebase, the following error occurs: /bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-l ong-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE= 500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -DNDEBUG -DNO_DEBU G -O2 -O2 -march=pentium4 -fomit-frame-pointer -Wformat-security -Wmissing-forma t-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT _NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -D_GNU_SOURCE -L/ usr/X11R6/lib -L/usr/qt/3/lib -L/usr/kde/3.2/lib -R /usr/kde/3.2/lib -R /usr/qt /3/lib -R /usr/X11R6/lib -o kblankscrn.kss blankscrn.o -lkdeui -lkscreensaver -lm /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/../../../../i386-pc-linux-gnu/bin/ld: / usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/../../../Scrt1.o(.text+0x28): unresolvab le relocation against symbol `main' collect2: ld returned 1 exit status make[2]: *** [kblankscrn.kss] Error 1 make[2]: Leaving directory `/scratch/tmp/portage/kdebase-3.2.0/work/kdebase-3.2. 0/kscreensaver' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/scratch/tmp/portage/kdebase-3.2.0/work/kdebase-3.2. 0' make: *** [all] Error 2 From other bug reports, I gather that the problem might be due to hardened-gcc the was installed by "emerge system" when going from stage2 to stage3. I also tried to disable hardened-gcc with "hcc -r", and also I tried unmerging it, but still I get the same compilation error.
Created attachment 26455 [details] Complete error log Complete error log. I got it by rerunning "make" in kdebase's work directory after ebuild had failed.
It's something strange going on in the compiler - at a glance, I have to question why your gcc is setup as an i386 compiler yet your flags include -march=pentium4. Maybe the problem lies there? Reassigning.
This is definately a broken gcc (try to remerge it). As a sidenote, a build log from rerunning make is most times not usefull as it does not add significant information (it skips a big part of the compilation process)
It seems that re-emerging gcc corrected the symptom.
As to the question of compiler being set up as i386 and -march=pentium4, that's how it got setup by following the installation instructions of Gentoo. So is this a problem with the install documentation? Re-emerging gcc fixed the problem anyway.
This is happening to me too; kscreensaver won't link because main is not found. my make.conf defs are: CHOST="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
I had forgotten to say: my gcc version was gcc-3.3.2-r5. I just finished re-emerging gcc; after that kdebase successfully built. It had died three times before, so the workaround was correct for me: there must have been a problem with gcc before. Of course, how *that* happened is another puzzle...
Assuming fixed in latest versions, please reopen if not.