Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171904 - sys-libs/glibc-2.5-r1 fails to build complaining of undefined symbols getspnam etc.
Summary: sys-libs/glibc-2.5-r1 fails to build complaining of undefined symbols getspna...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-23 10:19 UTC by Mike Auty (RETIRED)
Modified: 2007-03-25 21:06 UTC (History)
0 users

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


Attachments
FEATURES="-ccache" MAKEOPTS="-j1" LDFLAGS="" Emerge --info output (Emerge info.txt,3.76 KB, text/plain)
2007-03-23 10:20 UTC, Mike Auty (RETIRED)
Details
Gzipped build log (build.log.gz,215.69 KB, application/x-gzip)
2007-03-24 10:01 UTC, Mike Auty (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Auty (RETIRED) gentoo-dev 2007-03-23 10:19:53 UTC
So, glibc-2.5 installed fine (last installed on December 13th) and hasn't given my any problems.  A few weeks ago glibc-2.5-r1 was released and didn't appear to have any major patches with it, but it no longer appears to compile.  Oddly it's compiled without any problems on all of the other machines that I maintain (which tend to have a similar configuration).



make[2]: Entering directory `/var/tmp/portage/sys-libs/glibc-2.5-r1/work/glibc-2.5/nss'
make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.5-r1/work/glibc-2.5/nss'
make[2]: Entering directory `/var/tmp/portage/sys-libs/glibc-2.5-r1/work/glibc-2.5/nss'
i686-pc-linux-gnu-gcc getent.c -c -std=gnu99 -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -march=prescott -mtune=prescott -pipe -Wstrict-prototypes -mpreferred-stack-boundary=2     -I../include -I/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nss -I/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386 -I../ports/sysdeps/unix/sysv/linux -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../ports/sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv/i386 -I../ports/sysdeps/unix/sysv -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../ports/sysdeps/unix -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../ports -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include -isystem /usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1    -o /var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nss/getent.o -MD -MP -MF /var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nss/getent.o.dt -MT /var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nss/getent.o
i686-pc-linux-gnu-gcc -nostdlib -nostartfiles -o /var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nss/getent  -Wl,-dynamic-linker=/lib/ld-linux.so.2   -Wl,-z,combreloc -Wl,-z,relro  /var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/csu/crt1.o /var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/csu/crti.o `i686-pc-linux-gnu-gcc --print-file-name=crtbegin.o` /var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nss/getent.o  -Wl,-rpath-link=/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl:/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/math:/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/elf:/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/dlfcn:/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nss:/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nis:/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/rt:/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/resolv:/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/crypt:/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nptl /var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/libc.so.6 /var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/libc_nonshared.a -lgcc -Wl,--as-needed -lgcc_s  -Wl,--no-as-needed `i686-pc-linux-gnu-gcc --print-file-name=crtend.o` /var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/csu/crtn.o
/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nss/getent.o: In function `shadow_keys':
getent.c:(.text+0x2c9): undefined reference to `getspnam'
getent.c:(.text+0x2eb): undefined reference to `setspent'
getent.c:(.text+0x2f7): undefined reference to `getspent'
collect2: ld returned 1 exit status
make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nss/getent] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.5-r1/work/glibc-2.5/nss'
make[1]: *** [nss/others] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.5-r1/work/glibc-2.5'
make: *** [all] Error 2

!!! ERROR: sys-libs/glibc-2.5-r1 failed.
Call stack:
  ebuild.sh, line 1614:   Called dyn_compile
  ebuild.sh, line 971:   Called qa_call 'src_compile'
  environment, line 4118:   Called src_compile
  glibc-2.5-r1.ebuild, line 1161:   Called toolchain-glibc_src_compile
  glibc-2.5-r1.ebuild, line 270:   Called die

!!! make for default failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.5-r1/temp/build.log'.



I've turned off all of the compilation options that I thought might be causing problems (FEATURES="-ccache" MAKEOPTS="-j1" LDFLAGS="") and still no luck.  I uncertain whether it's just a problem with -r1 or whether something else on my system is now causing issues.  From what I can tell this is related to nss and possibly PAM related stuff, so if it helps, my version of PAM is sys-libs/pam-0.99.7.1.

I'm going to try recompiling glibc-2.5 in a bit and see if that succeeds (I'll report back here), but if there's any other information or tests/patches I can try out, please let me know.  Thanks...  5:)
Comment 1 Mike Auty (RETIRED) gentoo-dev 2007-03-23 10:20:30 UTC
Created attachment 114115 [details]
FEATURES="-ccache" MAKEOPTS="-j1" LDFLAGS="" Emerge --info output
Comment 2 SpanKY gentoo-dev 2007-03-24 07:44:22 UTC
those functions are supposed to be in libc.so itself, so if yours isnt providing it, you've got big problems :p

post the output of:
readelf -s /var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/libc.so.6 | egrep '[gs]etsp(nam|ent)'

also, run `emerge glibc >& log` and post the log file as an attachment
Comment 3 Mike Auty (RETIRED) gentoo-dev 2007-03-24 10:01:58 UTC
Created attachment 114211 [details]
Gzipped build log

It appears as though something must have changed on my system or that the glibc-2.5 patchset has been updated since I last built it in December, because now glibc-2.5 doesn't build either.

The egrep function didn't return any lines, so it appears libc.so.6 doesn't actually contain the missing symbols.  I can attach the results of readelf -s if it will help?
Comment 4 Mike Auty (RETIRED) gentoo-dev 2007-03-24 10:02:44 UTC
Provided the requested file as an attachment.
Comment 5 SpanKY gentoo-dev 2007-03-24 10:22:36 UTC
run the same readelf|egrep on these files:
/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/shadow/getspnam.o
/var/tmp/portage/sys-libs/glibc-2.5-r1/work/build-default-i686-pc-linux-gnu-nptl/shadow/getspnam.os
Comment 6 Mike Auty (RETIRED) gentoo-dev 2007-03-24 12:09:59 UTC
plasma shadow # readelf -s getspnam.o | egrep "[gs]etsp(nam|ent)"
     1: 00000000     0 FILE    LOCAL  DEFAULT  ABS getspnam.c
    17: 00000000   260 FUNC    GLOBAL DEFAULT    1 getspnam
    19: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __getspnam_r

plasma shadow # readelf -s getspnam.os | egrep "[gs]etsp(nam|ent)"
     1: 00000000     0 FILE    LOCAL  DEFAULT  ABS getspnam.c
    21: 00000000   290 FUNC    GLOBAL DEFAULT    2 getspnam
    25: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __getspnam_r
Comment 7 SpanKY gentoo-dev 2007-03-25 04:26:28 UTC
this is the problem:
/bin/cat: hsadow/stamp.os: No such file or directory
/bin/cat: hsadow/stamp.o: No such file or directory
/bin/cat: hsadow/stamp.oS: No such file or directory

this keeps the shadow/ objects from being integrated into libc.so

the odd thing is that the cat command is given "shadow/..."

is your shell/environment/coreutils sane or you been screwing with them ?
Comment 8 Mike Auty (RETIRED) gentoo-dev 2007-03-25 11:15:26 UTC
Actually, that explains a whole lot.  I'm very sorry to have inconvenienced you with this bug, given that it's my own fault.

Mid-way through last year one of the pranksters in my office decided to wait until I walked away from my computer without locking it and then cat /etc/shadow (I guess that's what you get for working with penetration testers), so I set up a fake shadow file and wrote a wrapper for cat to do the letter transposition.  It appears I shot myself in the foot, sorry!  5:(
Comment 9 Kevin F. Quinn (RETIRED) gentoo-dev 2007-03-25 19:53:57 UTC
(In reply to comment #8)
> Mid-way through last year one of the pranksters in my office decided to wait
> until I walked away from my computer without locking it and then cat
> /etc/shadow (I guess that's what you get for working with penetration testers),
> so I set up a fake shadow file and wrote a wrapper for cat to do the letter
> transposition.

Yikes :/  That's pretty pointless - anyone really breaking in would do '/bin/cat /etc/shadow' or supply their own shell utilities anyway.   A better approach in a potentially hostile environment is to _never_ open a shell as root, and use sudo for the few commands that need it (and _don't_ set sudo to skip the password requirement for your uid).  This is probably what the prankster was trying to highlight to you...
Comment 10 Mike Auty (RETIRED) gentoo-dev 2007-03-25 21:06:53 UTC
You would think it's pretty pointless, but the guy was a trainee and didn't actually know much about *nix: the history command showed him using just plain cat.  Also, I hadn't deemed such a lame attack as a high risk in our office, go figure...