When I try emerging splashutils I get: libc.a(__static_init.o)(.text+0x19): In function `__libc_init': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/libc_init.c:35: undefined reference to `__guard' libc.a(printf.o)(.text+0x16): In function `printf': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/printf.c:11: undefined reference to `__guard' libc.a(printf.o)(.text+0x40):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/printf.c:19: undefined reference to `__stack_smash_handler' libc.a(vfprintf.o)(.text+0x1c): In function `vfprintf': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vfprintf.c:13: undefined reference to `__guard' libc.a(vfprintf.o)(.text+0x61):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vfprintf.c:26: undefined reference to `__guard' libc.a(vfprintf.o)(.text+0x73):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vfprintf.c:26: undefined reference to `__stack_smash_handler' libc.a(fwrite.o)(.text+0x1c): In function `_fwrite': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fwrite.c:10: undefined reference to `__guard' libc.a(fwrite.o)(.text+0x68):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fwrite.c:32: undefined reference to `__guard' libc.a(fwrite.o)(.text+0x7d):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fwrite.c:32: undefined reference to `__stack_smash_handler' libc.a(puts.o)(.text+0x15): In function `puts': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/puts.c:8: undefined reference to `__guard' libc.a(puts.o)(.text+0x4d):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/puts.c:13: undefined reference to `__guard' libc.a(puts.o)(.text+0x5f):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/puts.c:13: undefined reference to `__stack_smash_handler' libc.a(vsnprintf.o)(.text+0x1d): In function `vsnprintf': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:163: undefined reference to `__guard' libc.a(vsnprintf.o)(.text+0x8c4):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:433: undefined reference to `__stack_smash_handler' libc.a(fputs.o)(.text+0x1d): In function `fputs': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fputs.c:13: undefined reference to `__guard' libc.a(fputs.o)(.text+0x56):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fputs.c:15: undefined reference to `__stack_smash_handler' libc.a(__udivdi3.o)(.text+0x16): In function `__udivdi3': libgcc/__udivdi3.c:11: undefined reference to `__guard' libc.a(__udivdi3.o)(.text+0x3d):libgcc/__udivdi3.c:13: undefined reference to `__stack_smash_handler' libc.a(__umoddi3.o)(.text+0x16): In function `__umoddi3': libgcc/__umoddi3.c:11: undefined reference to `__guard' libc.a(__umoddi3.o)(.text+0x45):libgcc/__umoddi3.c:16: undefined reference to `__stack_smash_handler' libc.a(__udivmoddi4.o)(.text+0x1a): In function `__udivmoddi4': libgcc/__udivmoddi4.c:5: undefined reference to `__guard' libc.a(__udivmoddi4.o)(.text+0xc6):libgcc/__udivmoddi4.c:32: undefined reference to `__stack_smash_handler' make[1]: *** [tests/environ] Error 1 make: *** [klibc] Error 2 !!! ERROR: media-gfx/splashutils-0.9_rc1 failed. !!! Function src_install, Line 81, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. Reproducible: Always Steps to Reproduce: 1.emerge -b splashutils 2. 3. Actual Results: Emerge compile failure Expected Results: splashutils should be merged without an issue. One observation before emerge --info: I installed gcc-3.4,3 recently. Did allnecessary steps to make it work (gcc-config 3, fix_lib...., GCC_SPECS in file, etc). but maybe this has an impact. silflo ~ # emerge --info Portage 2.0.51-r3 (default-linux/x86/2004.2, gcc-hardened, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r4 i686) ================================================================= System uname: 2.6.9-gentoo-r4 i686 Intel(R) Celeron(R) CPU 2.66GHz Gentoo Base System version 1.6.6 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-mcpu=pentium4 -mtune=pentium4 -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mcpu=pentium4 -mtune=pentium4 -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa apm arts avi berkdb bitmap-fonts bonobo cdr crypt cups encode esd f77 fam flac foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml guile imagemagick imlib java jpeg junit kde ldap libg++ libwww mad mikmod motif mpeg ncurses nls nptl oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd tiff truetype x86 xml xml2 xmms xv zlib"
splashutils doesnt work for me as well. The following error: CONF libjpeg configure: error: installation or configuration problem: C compiler cannot create executables. sed: kann Makefile nicht lesen: Datei oder Verzeichnis nicht gefunden make[1]: Entering directory `/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/jpeg-6b' make[1]: *** Keine Regel, um
splashutils doesnt work for me as well. The following error: CONF libjpeg configure: error: installation or configuration problem: C compiler cannot create executables. sed: kann Makefile nicht lesen: Datei oder Verzeichnis nicht gefunden make[1]: Entering directory `/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/jpeg-6b' make[1]: *** Keine Regel, um »libjpeg.a« zu erstellen. Schluss. make[1]: Leaving directory `/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/jpeg-6b' MAKE libjpeg make[1]: *** Keine Regel, um »libjpeg.a« zu erstellen. Schluss. make: *** [jpeglib] Fehler 2 I tried reemerging jpeg-6b-r4 but that didnt work. My emerge info: Portage 2.0.51-r3 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r3 x86_64) ================================================================= System uname: 2.6.9-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.6.6 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon64 -mtune=athlon64 -pipe" CHOST="x86_64-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon64 -mtune=athlon64 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" GENTOO_MIRRORS="http://gentoo.inode.at/ ftp://gentoo.inode.at/source/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X acpi alsa apache2 avi berkdb bitmap-fonts cdr crypt directfb divx4linux dvd dvdr esd f77 fam fbcon fbdev font-server fortran freetype gif gnome gpm gstreamer gtk gtk2 hal howl imlib innodb ipv6 jp2 jpeg lzw lzw-tiff multilib mysql mysqli ncurses nls nptl oggvorbis opengl oss pam perl png python readline sdl session simplexml ssl tcpd tiff truetype unicode usb userlocales wxwindows xml2 xmms xpm xrandr xv xvid zlib"
Eduardo: Please try doing `gcc-config -l` to see what gcc profiles you have installed on your system. If you're currently using a -hardened one, try temporarily switching to non-hardened to see if that will make splashutils compile. Arpad: Please attach config.log from /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/jpeg-6b/.
Your recommendation worked for me. I changed the gcc-config to non hardened and splashutils went in OK.
i'm also having trouble with splashutils and using a hardened gcc, is there any possibility that splashutils will work with hardened gcc at some point? i don't have a non-hardened gcc compiled right now so... thanks for your work, and please let me know if i can help you by attaching anything
The problem here is with klibc (a library that is bundled with splashutils). If you want to help, you can grab the latest klibc tarball from http://www.kernel.org/pub/linux/libs/klibc/ and see if you can compile it with a hardened gcc.
Thats my config.log below. What should i do now? swatinux jpeg-6b # cat config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. configure:538: checking for gcc configure:615: checking whether the C compiler (gcc -Wall -g -I/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/linux/include -m elf_x86_64) works configure:629: gcc -o conftest -Wall -g -I/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/linux/include -m elf_x86_64 conftest.c 1>&5 cc1: error: missing argument to "-m" configure: failed program was: #line 625 "configure" #include "confdefs.h" main(){return(0);}
Created attachment 46328 [details, diff] Added LDFLAGS clearing..
Created attachment 46329 [details] Ebuild that uses Makefile.diff
Please put the attached Makefile.diff into the files/ subdir and replace your ebuild with the one I attached and try to emerge splashutils. Let me know whether this changes anything for you.
Sorry for the late answer and thanks for the patch. Emerging splashutils now works perfectly. I'm configuring a new kernel right now. Lets see if it works ;)
Just gave splashutils with 2.6.10 a try. But same problem with hardened-gcc here (undefined references to propolice __guard and __stack_smash_handler...). Most interestingly even when I switch from hardened to plain 3.4.3 with gcc-config it still does not work (oh yes, I did source the profile, also did a re-login twice). But when I switch to gcc-3.3.4 it worked just fine - huh? %-)
Created attachment 48261 [details, diff] Patch for the ebuild file. Compiles libraries with -fno-stack-protector. The current patch and ebuild did not worked for me. I submit a new patch for the portage ebuild: If the hardened flag is detected then compiles klibc and other libraries with the -fno-stack-protector flag. Note that this makes the package "unhardened".
Same compile problem here but I don't use hardened: ------------------------------------------------------------- # gcc-config -l [1] i686-pc-linux-gnu-3.3.4 [2] i686-pc-linux-gnu-3.3.5 * [3] i686-pc-linux-gnu-3.3.5-hardenednopie [4] i686-pc-linux-gnu-3.3.5-hardenednossp [5] i686-pc-linux-gnu-3.3.5-vanilla ------------------------------------------------------------- The output of emerge is: ------------------------------------------------------------- make[1]: Leaving directory `/var/tmp/portage/splashutils-0.9_rc1/work/miscsplashutils-0.1.2/fbtruetype' MAKE klibc tests/environ.o(.text+0x1d): In function `main': tests/environ.c:6: undefined reference to `__guard' tests/environ.o(.text+0xa0):tests/environ.c:24: undefined reference to `__guard' tests/environ.o(.text+0xb4):tests/environ.c:24: undefined reference to `__stack_smash_handler' libc.a(__static_init.o)(.text+0x19): In function `__libc_init': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/libc_init.c:35: undefined reference to `__guard' libc.a(printf.o)(.text+0x16): In function `printf': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/printf.c:11: undefined reference to `__guard' libc.a(printf.o)(.text+0x40):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/printf.c:19: undefined reference to `__stack_smash_handler' libc.a(vfprintf.o)(.text+0x1c): In function `vfprintf': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vfprintf.c:13: undefined reference to `__guard' libc.a(vfprintf.o)(.text+0x61):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vfprintf.c:26: undefined reference to `__guard' libc.a(vfprintf.o)(.text+0x73):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vfprintf.c:26: undefined reference to `__stack_smash_handler' libc.a(fwrite.o)(.text+0x1c): In function `_fwrite': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fwrite.c:10: undefined reference to `__guard' libc.a(fwrite.o)(.text+0x6a):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fwrite.c:32: undefined reference to `__guard' libc.a(fwrite.o)(.text+0x7f):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fwrite.c:32: undefined reference to `__stack_smash_handler' libc.a(puts.o)(.text+0x15): In function `puts': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/puts.c:8: undefined reference to `__guard' libc.a(puts.o)(.text+0x4d):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/puts.c:13: undefined reference to `__guard' libc.a(puts.o)(.text+0x5f):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/puts.c:13: undefined reference to `__stack_smash_handler' libc.a(vsnprintf.o)(.text+0x26): In function `format_int': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:47: undefined reference to `__guard' libc.a(vsnprintf.o)(.text+0x2e1):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:159: undefined reference to `__stack_smash_handler' libc.a(vsnprintf.o)(.text+0x30d): In function `vsnprintf': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:163: undefined reference to `__guard' libc.a(vsnprintf.o)(.text+0x7b5):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:433: undefined reference to `__guard' libc.a(vsnprintf.o)(.text+0x7ca):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:433: undefined reference to `__stack_smash_handler' libc.a(fputs.o)(.text+0x1d): In function `fputs': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fputs.c:13: undefined reference to `__guard' libc.a(fputs.o)(.text+0x56):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fputs.c:15: undefined reference to `__stack_smash_handler' libc.a(__udivdi3.o)(.text+0x16): In function `__udivdi3': libgcc/__udivdi3.c:11: undefined reference to `__guard' libc.a(__udivdi3.o)(.text+0x3d):libgcc/__udivdi3.c:13: undefined reference to `__stack_smash_handler' libc.a(__umoddi3.o)(.text+0x16): In function `__umoddi3': libgcc/__umoddi3.c:11: undefined reference to `__guard' libc.a(__umoddi3.o)(.text+0x45):libgcc/__umoddi3.c:16: undefined reference to `__stack_smash_handler' libc.a(__udivmoddi4.o)(.text+0x1a): In function `__udivmoddi4': libgcc/__udivmoddi4.c:5: undefined reference to `__guard' libc.a(__udivmoddi4.o)(.text+0xcc):libgcc/__udivmoddi4.c:32: undefined reference to `__stack_smash_handler' make[1]: *** [tests/environ] Error 1 make: *** [klibc] Error 2 !!! ERROR: media-gfx/splashutils-0.9_rc1 failed. !!! Function src_install, Line 81, Exitcode 2 ------------------------------------------------------------- My make.conf is: ------------------------------------------------------------- CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer" MAKEOPTS="-j2" CHOST="i686-pc-linux-gnu" CXXFLAGS="${CFLAGS}" AUTOCLEAN=yes PKGDIR="/backup/packages/" FEATURES="buildpkg fixpackages" FEATURES="collision-protect" VIDEO_CARDS="radeon" ALSA_CARDS="intel8x0" LINGUAS="de" LANGUAGE="49" ACCEPT_KEYWORDS="x86" GENTOO_MIRRORS="http://gentoo.inode.at/ ftp://gentoo.inode.at/source/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://ftp.gentoo.skynet.be/pub/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/ ftp://ftp.tiscali.nl/pub/mirror/gentoo" PORTDIR_OVERLAY="/usr/local/portage" USE="3dfx 3dnow acl acpi alsa apache2 arts audiofile avi bcmath berkdb bindist bonobo bzlib calendar caps cdb cdparanoia cdr cpdflib crypt cscope ctype cups curldbase dhcp directfb divx4linux doc dvd dvdr emacs encode esd fastcgi fbcon firebird flac foomaticdb ftp gdbm gif gphoto2 gpm gstreamer gtk2 gtkhtml hardened hbci imagemagic imlib innodb ipv6 jabber jack java jce jikes joystick jpeg kde kerberos lcms ldap leim libg++ lirc mad maildir mailwrapper mbox mcal mikmod mime mmx mng motif mozilla mpeg mule mysql nas ncurses nis nls odbc ofx oggvorbis opengl oss pcmcia pcre pda pdflib pic png pnp portaudio postgres ppds python qt quicktime readline real ruby samba sasl scanner sdl slang slp snmp socks5 speex spell ssl svga tcltk tcpd tiff truetype trusted uclibc unicode usb vhosts wavelan wmf xine xinerama xml2 xmms xosd xpm xvid zlib" ------------------------------------------------------------- A config.log at /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/jpeg-6b/ does NOT exists!
OK, this is getting a little complicated, with bugs reported for different GCC versions and different configs. Let's stick to a common testing scenario. If you're experiencing problems with undefined references, please do the following: 1) If you have compiled your gcc with 'hardened' USE flag, please apply the patch from Nikolaos and see if it fixes your problem. 2) If you don't use 'hardened' USE flag, do gcc-config -l and make sure you're using a non-hardened profile. If you have multiple versions of gcc installed, switch to the latest one. Then, do `echo $GCC_SPECS`. If the variable points to a hardened spec file or anything that you don't think is right, unset it (unset GCC_SPECS). It might also be a good idea to set it to "" in /etc/env.d/05gcc After you've done all that, try to emerge splashutils and let me know of the results.
But the patch from Nikolaos is for 0.9_pre10 and not for 0.9_rc1! GCC_SPECS is already set to "". After starting emerge it came to the same result. Perhaps it belongs to another problem: During compiling e.g. kmplayer I got the following result: --------------------------------------------------------------------- * This package is blocked because it wants to overwrite * files belonging to other packages (see messages above). * If you have no clue what this is all about report it * as a bug for this package on http://bugs.gentoo.org --------------------------------------------------------------------- Does this belongs to the problem?
Created attachment 48407 [details] ebuild patched with the hardened fix
Reiner & other people using _rc1 with hardened: please try the newly attached _rc1 ebuild.
Created attachment 48448 [details, diff] Warning for "unhardened" build. Yep, last ebuild with applied patch works for me and on rc1! Though, we should inform the user that the package will be built "unhardened". I am including a patch for that...
Created attachment 48552 [details] a new ebuild with the hardened fixes Please test the new ebuild. I have changed one of the lines that add -fno-stack-protector and added a warning.
With the patch of Michal it still does not work on my both computers (Notebook and Desktop): --------------------------------------------------------------------------- make[1]: Leaving directory `/var/tmp/portage/splashutils-0.9_rc1/work/miscsplashutils-0.1.2/fbtruetype' MAKE klibc tests/environ.o(.text+0x1d): In function `main': tests/environ.c:6: undefined reference to `__guard' tests/environ.o(.text+0xa0):tests/environ.c:24: undefined reference to `__guard' tests/environ.o(.text+0xb4):tests/environ.c:24: undefined reference to `__stack_smash_handler' libc.a(__static_init.o)(.text+0x19): In function `__libc_init': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/libc_init.c:35: undefined reference to `__guard' libc.a(printf.o)(.text+0x16): In function `printf': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/printf.c:11: undefined reference to `__guard' libc.a(printf.o)(.text+0x40):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/printf.c:19: undefined reference to `__stack_smash_handler' libc.a(vfprintf.o)(.text+0x1c): In function `vfprintf': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vfprintf.c:13: undefined reference to `__guard' libc.a(vfprintf.o)(.text+0x61):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vfprintf.c:26: undefined reference to `__guard' libc.a(vfprintf.o)(.text+0x73):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vfprintf.c:26: undefined reference to `__stack_smash_handler' libc.a(fwrite.o)(.text+0x1c): In function `_fwrite': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fwrite.c:10: undefined reference to `__guard' libc.a(fwrite.o)(.text+0x6a):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fwrite.c:32: undefined reference to `__guard' libc.a(fwrite.o)(.text+0x7f):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fwrite.c:32: undefined reference to `__stack_smash_handler' libc.a(puts.o)(.text+0x15): In function `puts': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/puts.c:8: undefined reference to `__guard' libc.a(puts.o)(.text+0x4d):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/puts.c:13: undefined reference to `__guard' libc.a(puts.o)(.text+0x5f):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/puts.c:13: undefined reference to `__stack_smash_handler' libc.a(vsnprintf.o)(.text+0x26): In function `format_int': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:47: undefined reference to `__guard' libc.a(vsnprintf.o)(.text+0x2e1):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:159: undefined reference to `__stack_smash_handler' libc.a(vsnprintf.o)(.text+0x30d): In function `vsnprintf': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:163: undefined reference to `__guard' libc.a(vsnprintf.o)(.text+0x7b5):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:433: undefined reference to `__guard' libc.a(vsnprintf.o)(.text+0x7ca):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/vsnprintf.c:433: undefined reference to `__stack_smash_handler' libc.a(fputs.o)(.text+0x1d): In function `fputs': /var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fputs.c:13: undefined reference to `__guard' libc.a(fputs.o)(.text+0x56):/var/tmp/portage/splashutils-0.9_rc1/work/splashutils-0.9-rc1/libs/klibc-0.179/klibc/fputs.c:15: undefined reference to `__stack_smash_handler' libc.a(__udivdi3.o)(.text+0x16): In function `__udivdi3': libgcc/__udivdi3.c:11: undefined reference to `__guard' libc.a(__udivdi3.o)(.text+0x3d):libgcc/__udivdi3.c:13: undefined reference to `__stack_smash_handler' libc.a(__umoddi3.o)(.text+0x16): In function `__umoddi3': libgcc/__umoddi3.c:11: undefined reference to `__guard' libc.a(__umoddi3.o)(.text+0x45):libgcc/__umoddi3.c:16: undefined reference to `__stack_smash_handler' libc.a(__udivmoddi4.o)(.text+0x1a): In function `__udivmoddi4': libgcc/__udivmoddi4.c:5: undefined reference to `__guard' libc.a(__udivmoddi4.o)(.text+0xcc):libgcc/__udivmoddi4.c:32: undefined reference to `__stack_smash_handler' make[1]: *** [tests/environ] Error 1 make: *** [klibc] Error 2 !!! ERROR: media-gfx/splashutils-0.9_rc1 failed. !!! Function src_install, Line 81, Exitcode 2 ---------------------------------------------------------------------------
I've to correct myself: it worked on my desktop but not on my notebook. :-?
Reiner: could you please try it with the ebuild labeled 'ebuild patched with the hardened fix' on the machine on which the latest ebuild fails? Nikolaos: could you please try the latest ebuild and let me know whether it works for you just as well as the previous one did?
Michal: Przepraszam! Sorry! I don't know what to say... but on my notebook I forgot to copy your ebuild. After recognizing it I tried again and it worked. Now I've a problem with updateing kplayer... :-(
OK! Works perfectly for me. We can, if you agree, close the bug and update the portage tree.
I've just added the fix to CVS, closing.
Please don't make the stripping/negating of -fstack-protector conditional on USE=hardened. Many people, including me, use the -fstack-protector on otherwise standard systems and get caught by this.
Fixed in CVS. Thanks for the suggestion.