Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34619 - modutils-2.4.25 doesn't compile with -fstack-protector
Summary: modutils-2.4.25 doesn't compile with -fstack-protector
Status: RESOLVED DUPLICATE of bug 25299
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
: 34620 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-28 06:21 UTC by meyerm
Modified: 2005-07-17 13:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description meyerm 2003-11-28 06:21:59 UTC
all said above ;-). Without it works. 

Reproducible: Always
Steps to Reproduce:
1. emerge modutils 



Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.4.22-grsec-2.0-rc3) 
================================================================= 
System uname: 2.4.22-grsec-2.0-rc3 i686 Intel(R) Xeon(TM) CPU 2.40GHz 
Gentoo Base System version 1.4.3.10 
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-O2 -fomit-frame-pointer -funroll-loops -fstack-protector -march=pentium3 
-mfpmath=sse -mmmx -msse" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config 
/usr/kde/3/share/config" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
CXXFLAGS="-O2 -fomit-frame-pointer -funroll-loops -march=pentium3 -mfpmath=sse 
-mmmx -msse" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="sandbox ccache autoaddcvs distcc buildpkg" 
GENTOO_MIRRORS=" http://mirror.fachschaften.tu-muenchen.de/gentoo" 
MAKEOPTS="-j9" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="" 
SYNC="rsync://mirror.fachschaften.tu-muenchen.de/gentoo-portage" 
USE="x86 oss apm arts avi crypt cups encode foomaticdb gif gpm imlib jpeg kde libg++ 
libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl pdflib png qt quicktime 
sdl spell svga truetype X xml2 xmms xv zlib alsa gdbm berkdb slang readline tcpd pam 
ssl perl python -gtk -gnome cdr dga dvd dvdr fam fbcon gphoto2 imap ipv6 maildir mmx 
pcmcia pda pnp samba scanner sse tetex tiff trusted unicode usb xinerama xosd 
video_cards_radeon linguas_de"
Comment 1 meyerm 2003-11-28 06:23:05 UTC
*** Bug 34620 has been marked as a duplicate of this bug. ***
Comment 2 Tim Yamin (RETIRED) gentoo-dev 2003-11-28 08:39:18 UTC
Can you please tell us what problems you are getting when you do use "-fstack-protector"?
Comment 3 meyerm 2003-11-28 08:48:05 UTC
Sure, sorry for forgetting it. The last few line of the emerge are shown below. I already read in the forums that someone else had problem with modutils in combination with -fstack-protector. BTW: sash can't be compiled if glibc has been compiled with -fstack-protector (already filed a bug report 34622, but perhaps this could help you to track down the problem?).

# emerge modutils
[...]
gcc -O2 -fomit-frame-pointer -funroll-loops -fstack-protector -march=pentium3 -mfpmath=sse -mmmx -msse -I./../include -D_GNU_SOURCE  -DCONFIG_ROOT_CHECK_OFF=0   -DELF_MACHINE_H='"elf_i386.h"' -DARCH_i386 -DTAINT_URL='"http://www.tux.org/lkml/#export-tainted"' -DCOMBINE_rmmod -DCOMBINE_modprobe -DCOMBINE_lsmod -DCOMBINE_ksyms -DCOMBINE_kallsyms -Dmain=combined_insmod_main -c -o combined_insmod.o insmod.c
ar rv libmodutils.a ksyms.o
a - ksyms.o
ar rv libmodutils.a kallsyms.o
a - kallsyms.o
ar rv libmodutils.a lsmod.o
a - lsmod.o
gcc -O2 -fomit-frame-pointer -funroll-loops -fstack-protector -march=pentium3 -mfpmath=sse -mmmx -msse -o modinfo modinfo.o ../obj/libobj.a ../util/libutil.a
ar rv libmodutils.a rmmod.o
a - rmmod.o
gcc -O2 -fomit-frame-pointer -funroll-loops -fstack-protector -march=pentium3 -mfpmath=sse -mmmx -msse -o insmod insmod.o rmmod.o modprobe.o lsmod.o ksyms.o kallsyms.o ../obj/libobj.a ../util/libutil.a
gcc -static -O2 -fomit-frame-pointer -funroll-loops -fstack-protector -march=pentium3 -mfpmath=sse -mmmx -msse -o insmod.static insmod.o rmmod.o modprobe.o lsmod.o ksyms.o kallsyms.o ../obj/libobj.a ../util/libutil.a
ar rv libmodutils.a modprobe.o
a - modprobe.o
ln -sf insmod modprobe
ln -sf insmod rmmod
ln -sf insmod lsmod
ln -sf insmod ksyms
ln -sf insmod kallsyms
ar rv libmodutils.a combined_insmod.o
a - combined_insmod.o
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libc.a(ssp.o)(.data+0x0): multiple definition of `__guard'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libgcc.a(_stack_smash_handler.oS)(.data+0x0):/var/tmp/portage/gcc-3.2.3-r2/work/gcc-3.2.3/gcc/libgcc2.c:2078: first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libc.a(ssp.o)(.text+0x80): In function `__stack_smash_handler':
: multiple definition of `__stack_smash_handler'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libgcc.a(_stack_smash_handler.oS)(.text+0x90):/var/tmp/portage/gcc-3.2.3-r2/work/gcc-3.2.3/gcc/libgcc2.c:2093: first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `__stack_smash_handler' changed from 722 in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libgcc.a(_stack_smash_handler.oS) to 577 in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libgcc.a(_stack_smash_handler.oS)
collect2: ld returned 1 exit status
distcc[4282] ERROR: compile on localhost failed
make[1]: *** [insmod.static] Error 1
make[1]: Leaving directory `/var/tmp/portage/modutils-2.4.25/work/modutils-2.4.25/insmod'
make: *** [all] Error 2

!!! ERROR: sys-apps/modutils-2.4.25 failed.
!!! Function src_compile, Line 42, Exitcode 2
!!! emake failed

Comment 4 Tim Yamin (RETIRED) gentoo-dev 2003-11-28 08:50:45 UTC
To me, that looks like a possible GCC / Glibc bug as the duplicate-symbols are inside GCC / Glibc.
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2003-11-30 05:48:16 UTC
Are you using gcc-3.2.3-r3? Otherwise, -static and -fstack-protector are broken and will fail. Please see bug #25299 for more information.
Comment 6 meyerm 2003-11-30 06:28:59 UTC
No, I am still using 3.2.3-r2. It was up-to-date 2 days before when I emerged the portage tree... :-/

OK, I just started an "emerge -Du world". New gcc, new kernel... man! ;-)

The next new setup I will start will be ~x86 right from the start... Perhaps then my bugreports will notify you of not-already-solved problems. ;-)

---

Hey, if I understand this ebuild correct I shall recompile all my packages which were compiled with -fstack-protector?? I just started the find and it spits out quite a lot packages which were compiled without errors... Help ;-) 
Comment 7 Tim Yamin (RETIRED) gentoo-dev 2003-11-30 10:17:23 UTC

*** This bug has been marked as a duplicate of 25299 ***