This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

glibc 2.1.1pre1: Static build broken on alpha



I tried to compile 2.1.1pre1 on an alpha running Linux 2.2.2 with egcs 
1.1.x (egcs-2.91.60) and binutils 2.9.1.0.15 and got the following
build failure when linking sln:

/home/jaeger/egcs/bin/gcc sln.c -c -O -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -mieee     -I../include -I. -I/home/jaeger/buildreport-glibc/19990310/elf -I.. -I../libio  -I/home/jaeger/buildreport-glibc/19990310 -I../sysdeps/alpha/elf -I../crypt/sysdeps/unix -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/alpha -I../sysdeps/unix/sysv/linux/alpha/alpha -I../sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/alpha -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/alpha/fpu -I../sysdeps/alpha -I../sysdeps/wordsize-64 -I../sysdeps/ieee754 -I../sysdeps/libm-ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic   -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC   -o /home/jaeger/buildreport-glibc/19990310/!
elf/sln.o
/home/jaeger/egcs/bin/gcc -nostdlib -nostartfiles -static -o /home/jaeger/buildreport-glibc/19990310/elf/sln   /home/jaeger/buildreport-glibc/19990310/csu/crt1.o /home/jaeger/buildreport-glibc/19990310/csu/crti.o `/home/jaeger/egcs/bin/gcc --print-file-name=crtbegin.o` /home/jaeger/buildreport-glibc/19990310/elf/sln.o  /home/jaeger/buildreport-glibc/19990310/libc.a -lgcc /home/jaeger/buildreport-glibc/19990310/libc.a `/home/jaeger/egcs/bin/gcc --print-file-name=crtend.o` /home/jaeger/buildreport-glibc/19990310/csu/crtn.o
/home/jaeger/buildreport-glibc/19990310/libc.a(init-first.o): In function `init':
/home/jaeger/libc-2.1/csu/../sysdeps/unix/sysv/linux/init-first.c:92: multiple definition of `_init'
/home/jaeger/buildreport-glibc/19990310/csu/crti.o(.init+0x0): first defined here
/home/jaeger/buildreport-glibc/19990310/libc.a(init-first.o): In function `init':
/home/jaeger/libc-2.1/csu/../sysdeps/unix/sysv/linux/init-first.c:70: undefined reference to `_dl_fpu_control'
/home/jaeger/libc-2.1/csu/../sysdeps/unix/sysv/linux/init-first.c:90: undefined reference to `__libc_global_ctors'
/home/jaeger/libc-2.1/csu/../sysdeps/unix/sysv/linux/init-first.c:90: undefined reference to `__libc_global_ctors'
/home/jaeger/buildreport-glibc/19990310/libc.a(dl-open.o): In function `dl_open_worker':
/home/jaeger/libc-2.1/elf/dl-open.c:104: undefined reference to `_dl_profile_output'
collect2: ld returned 1 exit status
make[2]: *** [/home/jaeger/buildreport-glibc/19990310/elf/sln] Error 1
make[2]: Leaving directory `/home/jaeger/libc-2.1/elf'
make[1]: *** [elf/others] Error 2
make[1]: Leaving directory `/home/jaeger/libc-2.1'
make: *** [all] Error 2

At least part of the problem seems to be that PIC is default on alpha
(configure outputs: checking whether -fPIC is default... yes) and
e.g. the code in dl-open which uses _dl_profile_output is protected by 
"#ifdef PIC".  In sysdeps/unix/sysv/linux/init-first.c the references
to the undefined code are likewise protected by "#ifdef PIC".  All
code 

All code gets compiled with -DPIC according to this fragment from
Makeconfig:
# If everything is compiled with -fPIC (implicitly) we must tell this by
# defining the PIC symbol.
ifeq (yes,$(build-pic-default))
pic-default = -DPIC
endif

The rest of the compilation looked ok and I could run some shared
binaries linked against 2.0.7 (just gave it a short test).

Btw. no problems on ix86 - as usual;-)
Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]