"emerge -u lvm-user" runs for a while, then terminates with the following lines: gcc vgscan.o -L/usr/portage/tmp/portage/lvm-user-1.0.7-r1/work/LVM/1.0.7/tools/lib -llvm-10 -o vgscan gcc vgsplit.o -L/usr/portage/tmp/portage/lvm-user-1.0.7-r1/work/LVM/1.0.7/tools/lib -llvm-10 -o vgsplit gcc vgscan.o -L/usr/portage/tmp/portage/lvm-user-1.0.7-r1/work/LVM/1.0.7/tools/lib -llvm-10 -static -o vgscan.static /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.3/../../../libc.a(ssp.o)(.data+0x0): multiple definition of `__guard' /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.3/libgcc.a(_stack_smash_handler.oS)(.data+0x0): first defined here /usr/bin/ld: Disabling relaxation: it will not work with multiple definitions /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.3/../../../libc.a(ssp.o)(.text+0x84): In function `__stack_smash_handler': : multiple definition of `__stack_smash_handler' /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.3/libgcc.a(_stack_smash_handler.oS)(.text+0x9c):/var/tmp/portage/gcc-3.2.3-r2/work/gcc-3.2.3/gcc/libgcc2.c:2093: first defined here /usr/bin/ld: Warning: size of symbol `__stack_smash_handler' changed from 448 in /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.3/../../../libc.a(ssp.o) to 340 in /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.3/../../../libc.a(ssp.o) /usr/portage/tmp/portage/lvm-user-1.0.7-r1/work/LVM/1.0.7/tools/lib/liblvm-10.a(lv_create_node.o)(.text+0x6c): In function `lv_create_node': : warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking collect2: ld returned 1 exit status make[2]: *** [vgscan.static] Error 1 make[2]: Leaving directory `/usr/portage/tmp/portage/lvm-user-1.0.7-r1/work/LVM/1.0.7/tools' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/portage/tmp/portage/lvm-user-1.0.7-r1/work/LVM/1.0.7/tools' make[1]: Entering directory `/usr/portage/tmp/portage/lvm-user-1.0.7-r1/work/LVM/1.0.7' ********************************** There were errors in your compile. ********************************** make[1]: *** [.touchbuilt] Error 1 make[1]: Leaving directory `/usr/portage/tmp/portage/lvm-user-1.0.7-r1/work/LVM/1.0.7' make: *** [all] Error 2 !!! ERROR: sys-fs/lvm-user-1.0.7-r1 failed. !!! Function src_compile, Line 48, Exitcode 2 !!! Make failed Reproducible: Always Steps to Reproduce: 1. emerge -u lvm-user 2. 3. Actual Results: The build terminates with the following lines: ********************************** There were errors in your compile. ********************************** make[1]: *** [.touchbuilt] Error 1 make[1]: Leaving directory `/usr/portage/tmp/portage/lvm-user-1.0.7-r1/work/LVM/1.0.7' make: *** [all] Error 2 !!! ERROR: sys-fs/lvm-user-1.0.7-r1 failed. !!! Function src_compile, Line 48, Exitcode 2 !!! Make failed Expected Results: Should have finished building and merging the package normally. root # emerge info Portage 2.0.50_pre22 (default-sparc-1.4, gcc-3.2.3, glibc-2.3.3_pre20040117-r0, 2.4.24-sparc) ================================================================= System uname: 2.4.24-sparc sparc sun4m Gentoo Base System version 1.4.3.12 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59 Automake: sys-devel/automake-1.8.2 ACCEPT_KEYWORDS="sparc ~sparc" AUTOCLEAN="yes" CFLAGS="-mcpu=supersparc -O2 -pipe -fstack-protector" CHOST="sparc-sun4m-linux-gnu" COMPILER="gcc3" 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/env.d" CXXFLAGS="-mcpu=supersparc -O2 -pipe -fstack-protector" DISTDIR="/usr/portage/distfiles" FEATURES="buildpkg ccache digest sandbox" GENTOO_MIRRORS="http://www.gtlib.cc.gatech.edu/pub/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/usr/portage/tmp/" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X berkdb crypt cups curl ethereal foomaticdb gd gdbm gnome gtk imlib jpeg libwww mbox mozilla mysql ncurses nocd pam pdflib perl png ppds python qt readline samba sasl slang sparc spell ssl tcltk tcpd tiff truetype xml xml2 zlib"
Please try without -fstack-protector
Okay, it emerged successfully when I took -fstack-protector out of CFLAGS. So, is there any way to make it work right with that option?
SSP/propolice people got ideas about this?
what revision of gcc is this? I think your gcc might be to old. ssp had problems with the __guard symbol and static linking before but this should be resolved now with the move of the __guard symbol to glibc itself. (>=r5 should fix it I think)
Ummm, according to the "emerge info" output above, it's gcc-3.2.3 .
can you type gcc -v and paste the results here please.
root # gcc -v Reading specs from /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.3/specs Configured with: /var/tmp/portage/gcc-3.2.3-r2/work/gcc-3.2.3/configure --prefix=/usr --bindir=/usr/sparc-unknown-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.3/include --datadir=/usr/share/gcc-data/sparc-unknown-linux-gnu/3.2 --mandir=/usr/share/gcc-data/sparc-unknown-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/sparc-unknown-linux-gnu/3.2/info --enable-shared --host=sparc-unknown-linux-gnu --target=sparc-unknown-linux-gnu --with-system-zlib --enable-languages=c,c++,f77,objc --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.3/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext Thread model: posix gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2, propolice)
your gcc-3.2.3-r2 which has this bug. Please update to current and try again.
How, pray tell, do I upgrade it? I already run "emerge sync" every morning, and "emerge -up gcc" comes up empty: root # emerge -up gcc These are the packages that I would merge, in order: Calculating dependencies ...done! root # "qpkg -i gcc" shows sys-devel/gcc-3.3.2-r6 apparently available; but I haven't been able to figure out how to get emerge to build that particular version for me. "emerge sys-devel/gcc-3.3.2-r6" and similar attempts all fail. Also, from what I've seen with other packages, I'm afraid that once I jump ahead of what "emerge -u world" offers as the latest version, "emerge -u world" is always going to want to DOWNgrade the gcc installation back to what it considers the current version. How do I get around this?
Ping.. sparc@g.o Are you guys really stuck at -r2 ? If so whats broke? We need to get you up2date for future planned changes in flag-o-matic.
We're trying to avoid gcc updates until after 2004.0. After that we'll hopefully be moving over to gcc-3.3.x, although that needs testing... We don't have enough people or kit to sanely keep several gcc revisions on the go.
Ok well until then your going to have to deal with users reporting problems with -fstack-protector or back port the patch. I suggest you backport the 3.3-7 patch in addition take a backport of the pie patch. And try to get binutils up to 2.14.90.8 Or you if you want perhaps filter-flags -fstack-protector on packages that link static. But if you do that please please check the gcc version first. Checking for the gcc version is going to cause you a not so fun performance hit on emerge,ebuild so you might want to cache it via an environment variable. In addition what kind of testing do you need done on sparc? I've got an ultra10 sitting in a 7 foot rac at my house unplugged. I can lend a few CPU cycles if need be.
I had some problems upgrading from gcc-3.2.3-r2 to gcc-3.3.2 series (i think it was -r3 or so in my particular case). Namely we got some application breakage, mozilla not working any more without any useful detail, among other apps. The big problem is upgrading, we mostly know that getting a full system from zero works. Also the sparc leads (weeve & todd) are out of reach for some personal reasons, and the other developers are somewhat busy also. I'm currently using almost 100% of my available time towards getting 2004.0 out of the door. If everything is ok i'll be able to test newer glibc/gcc versions in upgrade scenarios, but i'll need extra help for sparc32 which usually breaks in oh-so-subtle ways, specially with gcc & glibc.
I've just unmasked gcc-3.3.x for ~sparc. Please test and see if this helps.
Resolving this as fixed as gcc-3.3.3 is now stable on sparc and I've successfully built out a system from stage 1 using -fstack-protector, as well as lvm-user. If for some reason this continues to plague you, feel free to re-open.