Summary: | (toolchain) sash-3.7 emerge (using -fstack-protector) fails with errors like "multiple definition of `__guard'" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Vladimir <vl409> |
Component: | [OLD] Core system | Assignee: | The Gentoo Linux Hardened Team <hardened> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Vladimir
2005-01-18 09:37:11 UTC
CFLAGS=-fstack-protector and USE=hardened do sorta the same thing. Solution is to remove -fstack-protectror from your CFLAGS and let the toolchain handle emitting the fstack when/where ever it can be used. Closing bug as invalid >>Solution is to remove -fstack-protectror from your CFLAGS and let the toolchain handle emitting the fstack when/where ever it can be used. this doesn`t fix the problem. Here is log: ========================================== [root@root]# emerge sash Calculating dependencies ...done! >>> emerge (1 of 1) app-shells/sash-3.7 to / >>> md5 src_uri ;-) sash-3.7.tar.gz >>> Unpacking source... >>> Unpacking sash-3.7.tar.gz to /var/tmp/portage/sash-3.7/work * Applying sash-3.6-fix-includes.patch ... [ ok ] * Applying sash-3.7-builtin.patch ... [ ok ] readline * Applying sash-3.6-readline.patch ... [ ok ] >>> Source unpacked. gcc -O2 -mcpu=i686 -pipe -Wall -Wmissing-prototypes -DHAVE_GZIP=1 -DHAVE_LINUX_ATTR=1 -DHAVE_LINUX_MOUNT=1 -DHAVE_BSD_MOUNT=0 -DMOUNT_TYPE='"ext3"' -DHAVE_READLINE -c -o sash.o sash.c sash.c: In function `fileman_completion': sash.c:536: warning: implicit declaration of function `completion_matches' sash.c:536: warning: assignment makes pointer from integer without a cast sash.c: In function `command_generator': sash.c:561: warning: suggest parentheses around assignment used as truth value /usr/include/ctype.h: At top level: sash.c:1458: warning: `showPrompt' defined but not used gcc -O2 -mcpu=i686 -pipe -Wall -Wmissing-prototypes -DHAVE_GZIP=1 -DHAVE_LINUX_ATTR=1 -DHAVE_LINUX_MOUNT=1 -DHAVE_BSD_MOUNT=0 -DMOUNT_TYPE='"ext3"' -DHAVE_READLINE -c -o cmds.o cmds.c .... .... .... gcc -O2 -mcpu=i686 -pipe -Wall -Wmissing-prototypes -DHAVE_GZIP=1 -DHAVE_LINUX_ATTR=1 -DHAVE_LINUX_MOUNT=1 -DHAVE_BSD_MOUNT=0 -DMOUNT_TYPE='"ext3"' -DHAVE_READLINE -c -o utils.o utils.c gcc --disable-shared -static -s -o sash sash.o cmds.o cmd_dd.o cmd_ed.o cmd_grep.o cmd_ls.o cmd_tar.o cmd_gzip.o cmd_find.o cmd_file.o cmd_chattr.o cmd_ar.o utils.o -lz -lreadline -lncurses /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../libc.a(ssp.o)(.data+0x0): multiple definition of `__guard' /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/libgcc.a(_stack_smash_handler.oS)(.data+0x0):/var/tmp/portage/gcc-3.2.3-r1/work/gcc-3.2.3/gcc/libgcc2.c:2078: first defined here /usr/bin/ld: Warning: size of symbol `__guard' changed from 32 in /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/libgcc.a(_stack_smash_handler.oS) to 4 in /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../libc.a(ssp.o) /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../libc.a(ssp.o)(.text+0x90): In function `__stack_smash_handler': : multiple definition of `__stack_smash_handler' /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/libgcc.a(_stack_smash_handler.oS)(.text+0x80):/var/tmp/portage/gcc-3.2.3-r1/work/gcc-3.2.3/gcc/libgcc2.c:2093: first defined here /usr/bin/ld: Warning: size of symbol `__stack_smash_handler' changed from 603 in /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/libgcc.a(_stack_smash_handler.oS) to 716 in /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../libc.a(ssp.o) cmd_ls.o(.text+0x84d): In function `listFile': : warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking cmds.o(.text+0x69e): In function `do_chgrp': : warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../libreadline.a(complete.o)(.text+0xf41): In function `rl_username_completion_function': : warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking cmds.o(.text+0x58e): In function `do_chown': : warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking cmd_ls.o(.text+0x7df): In function `listFile': : warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../libreadline.a(complete.o)(.text+0xf34): In function `rl_username_completion_function': : warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../libreadline.a(complete.o)(.text+0xf85): In function `rl_username_completion_function': : warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking collect2: ld returned 1 exit status make: *** [sash] Error 1 ===================================================== Here is USE and CFLAGS(from emerge --info): ================== USE="berkdb crypt dlloader gdbm hardened java ncurses nls pam perl pic pie python readline ssl tcpd x86 zlib" CFLAGS="-O2 -mcpu=i686 -pipe /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../libc.a (see this?) this means you miscompiled your userland. You got that symbol in your *.a due to you using -fstack-protector in your CFLAGS. Solution for that is to recompile gcc. And for kix to fix all the other things that will show up over time you should just do an emerge -e world Closing bug as INVALID again. |