Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113625 - libc-2.3.5-r3 won't build --> undefined reference to '.LC3' (in csu/crtn.S)
Summary: libc-2.3.5-r3 won't build --> undefined reference to '.LC3' (in csu/crtn.S)
Status: RESOLVED DUPLICATE of bug 111217
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-26 07:12 UTC by Jamie Saker
Modified: 2005-11-28 23:41 UTC (History)
0 users

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 Jamie Saker 2005-11-26 07:12:46 UTC
glibc-2.3.5 emerge is erroring out on some unresolved symbols. from looking at
the referred-to file, I'm guessing the problem may be related to the hardened
environment with pie/pic. I'm now encountering this problem on four systems (two
of which I've included emerge info here for addl info) so it appears that the
glibc update is DOA with hardened builds, at least per my environment. i see per
earlier bug reports that 2.3.4 had issues with hardened builds and found several
references to the specific bug in 2.3.5 

Reproducible: Always
Steps to Reproduce:
1. emerge -uD world (or emerge world, or emerge glibc)
2. glibc-2.3.5 configs and begins compilation for awhile
3. glibc-2.3.5 hits undefined reference to '.LC3' and errors out

Actual Results:  
(config & lots of compiling until we hit csu/crtn.o work)

/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.o:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S:15:
undefined reference to `.LC2'
/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.o:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S:38:
undefined reference to `.LC3'
collect2: ld returned 1 exit status
make[2]: ***
[/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/iconvconfig]
Error 1
make[2]: *** Waiting for unfinished jobs....
/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.o:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S:15:
undefined reference to `.LC2'
/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.o:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S:38:
undefined reference to `.LC3'
collect2: ld returned 1 exit status
make[2]: ***
[/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/iconv/iconv_prog]
Error 1
make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.5-r3/work/glibc-2.3.5/iconv'
make[1]: *** [iconv/others] Error 2
make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.5-r3/work/glibc-2.3.5'
make: *** [all] Error 2


Expected Results:  
glibc should have built

Happens on multiple systems - am posting emerge info for two of them:

First system:
Portage 2.0.53_rc7 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r2,
2.6.11-hardened-r14 i686)
=================================================================
System uname: 2.6.11-hardened-r14 i686 AMD Sempron(tm)
Gentoo Base System version 1.12.0_pre9
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -fstack-protector-all"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -fstack-protector-all"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa apm arts audiofile avi berkdb bitmap-fonts bzip2 crypt cups
curl eds emboss encode expat fam foomaticdb fortran gd gdbm gif glut gmp gpm
gstreamer gtk2 hardened idn imlib innodb ipv6 jpeg kde lcms libg++ libwww mad
mikmod mmx mng motif mp3 mpeg mysql ncurses nls ogg oggvorbis opengl oss pam
pcre pdflib perl pic pie png postgres python qt quicktime readline sdl slang
spell ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb
vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

Second system:
Portage 2.0.51.22-r3 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r1,
2.6.11-hardened-r15 i686)
=================================================================
System uname: 2.6.11-hardened-r15 i686 AMD Athlon(tm) XP 1900+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fstack-protector-all -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /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="-O2 -march=athlon-xp -fstack-protector-all -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distcc distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.binarycompass.org
http://mirror.datapipe.net/gentoo http://www.gigaload.org/gentoo.org/
http://gentoo.mirrors.pair.com/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 acl acpi apache2 apm arts avi berkdb bitmap-fonts bzip2 crypt cups dba
eds emboss encode expat foomaticdb fortran gdbm gif gmp gpm gstreamer gtk2
hardened imlib ipv6 jpeg kerberos ldap libg++ libwww mad mikmod mmx motif mp3
mpeg ncurses nls ogg oggvorbis oss pam pcre pdflib perl pic pie png postgres
python quicktime readline sdl slang spell ssl tcpd truetype truetype-fonts
type1-fonts udev vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-11-26 07:25:17 UTC

*** This bug has been marked as a duplicate of 111217 ***
Comment 2 Kevin F. Quinn (RETIRED) gentoo-dev 2005-11-26 08:52:49 UTC
Jamie - remove '-fstack-protector-all' from CFLAGS in make.conf 
You really don't want it there, the hardened compiler will make a much better
guess at when it's ok to switch that on for you.
Comment 3 Jamie Saker 2005-11-28 18:44:02 UTC
Thanks Kevin - will remove it and procede. I'm assuming the USE=hardened will
guide my installs to add the flag when it can?
Comment 4 Kevin F. Quinn (RETIRED) gentoo-dev 2005-11-28 23:41:59 UTC
No; the use flag won't do it for other ebuilds, but the compiler you built with
USE=hardened will.  The hardened compiler automagically switch on SSP when
compiling regardless of your use flags.  USE=hardened is used (1) by the gcc
build to create and use the hardened compiler by default and (2) by other
ebuilds to conditionally fix stuff that breaks either as a result of using the
hardened compiler, or as a result of the kernel hardening from PaX & grsecurity.

The default with a normal compiler is to build without SSP - with the hardened
compiler, the default is to build _with_ SSP except for some known situations in
which it can't work, where this can be detected automatically.

FWIW one other thing the hardened compiler does, is to automatically "upgrade"
-fstack-protector to -fstack-protector-all.