Bug 235 - glibc fails to compile.
Summary: glibc fails to compile.
Status: RESOLVED DUPLICATE of bug 333
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.3.2
: P2 normal
Target Milestone: ---
Assignee: GOTO Masanori
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-26 22:04 UTC by Carlo Wood
Modified: 2004-09-28 01:52 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlo Wood 2004-06-26 22:04:32 UTC
After download plain glibc-2.3.2.tar.gz and glibc-linuxthreads-2.3.2.tar.bz2
I execute the following commands on a basically Fedora core 1 GNU/linux box:

/usr/src/glibc>rm -rf glibc-2.3.2
/usr/src/glibc>tar xzf glibc-2.3.2.tar.gz
/usr/src/glibc>cd glibc-2.3.2
/usr/src/glibc/glibc-2.3.2>tar xjf ../glibc-linuxthreads-2.3.2.tar.bz2
/usr/src/glibc/glibc-2.3.2>mkdir build
/usr/src/glibc/glibc-2.3.2>cd build
/usr/src/glibc/glibc-2.3.2/build>../configure --with-tls --without-cvs
--with-elf --enable-kernel=2.6.5 --disable-hidden-plt --enable-add-ons
--enable-bounded --enable-shared --prefix="$INSTALL_PREFIX"

Then I run 'make' which rather quickly results in the following error:

/usr/src/glibc/glibc-2.3.2/build>make
make -r PARALLELMFLAGS="" CVSOPTS="" -C .. objdir=`pwd` all
make[1]: Entering directory `/usr/src/glibc/glibc-2.3.2'
[...]
mv -f /usr/src/glibc/glibc-2.3.2/build/Versions.vT
/usr/src/glibc/glibc-2.3.2/build/Versions.v
( echo 'sysd-versions-subdirs = csu assert ctype locale intl catgets math setjmp
signal stdlib stdio-common libio malloc string wcsmbs time dirent grp pwd posix
io termios resource misc socket sysvipc gmon gnulib iconv iconvdata wctype
manual shadow po argp crypt linuxthreads nss localedata timezone rt conform
debug linuxthreads_db inet resolv hesiod sunrpc nis nscd streams login dlfcn elf
sysdeps/i386/elf linuxthreads/sysdeps/unix/sysv/linux/i386
linuxthreads/sysdeps/unix/sysv/linux linuxthreads/sysdeps/pthread
sysdeps/pthread linuxthreads/sysdeps/unix/sysv linuxthreads/sysdeps/unix
linuxthreads/sysdeps/i386/i686 linuxthreads/sysdeps/i386
sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux sysdeps/gnu
sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386
sysdeps/unix/sysv sysdeps/unix/i386 sysdeps/unix sysdeps/posix
sysdeps/i386/i686/fpu sysdeps/i386/i686 sysdeps/i386/i486 sysdeps/i386/fpu
sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64
sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic' ; \
  cat /usr/src/glibc/glibc-2.3.2/build/Versions.v \
  | LC_ALL=C gawk -v buildroot=/usr/src/glibc/glibc-2.3.2/build/ -v
defsfile=/usr/src/glibc/glibc-2.3.2/build/Versions.all \
                    -v move_if_change='/bin/sh scripts/move-if-change' \
                    -f scripts/versions.awk; \
) > /usr/src/glibc/glibc-2.3.2/build/sysd-versionsT
gawk: scripts/versions.awk:121: fatal: expression for `>' redirection has null
string value
make[1]: *** [/usr/src/glibc/glibc-2.3.2/build/sysd-versions] Error 2
make[1]: Leaving directory `/usr/src/glibc/glibc-2.3.2'
make: *** [all] Error 2

The reason is that at that line the variable 'outfile' is empty
at that moment.

Using --disable-versioning doesn't help either because then
I get this compile error:

gcc-cvs-3.5 ../sysdeps/generic/libc-tls.c -c -std=gnu99 -O2 -Wall -Winline
-Wstrict-prototypes -Wwrite-strings -g      -I../include -I.
-I/usr/src/glibc/glibc-2.3.2/build/csu -I.. -I../libio 
-I/usr/src/glibc/glibc-2.3.2/build -I../sysdeps/i386/elf
-I../linuxthreads/sysdeps/unix/sysv/linux/i386
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread
-I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv
-I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386/i686
-I../linuxthreads/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common
-I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686
-I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -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
/lib/modules/2.6.5/build/include -D_LIBC_REENTRANT -include
../include/libc-symbols.h       -DHAVE_INITFINI -o
/usr/src/glibc/glibc-2.3.2/build/csu/libc-tls.o
../sysdeps/generic/libc-tls.c: In function `__libc_setup_tls':
../sysdeps/generic/libc-tls.c:199: error: 'firstcall' undeclared (first use in
this function)
../sysdeps/generic/libc-tls.c:199: error: (Each undeclared identifier is
reported only once
../sysdeps/generic/libc-tls.c:199: error: for each function it appears in.)
make[2]: *** [/usr/src/glibc/glibc-2.3.2/build/csu/libc-tls.o] Error 1
make[2]: Leaving directory `/usr/src/glibc/glibc-2.3.2/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/usr/src/glibc/glibc-2.3.2'
make: *** [all] Error 2


Note this is done with the following environment sourced (although
I doubt that is the reason):

---------------
CC="gcc-cvs-3.5"
CXX="g++-cvs-3.5"
CPP="/usr/local/$CC/bin/cpp"
CXXCPP="/usr/local/$CC/bin/cpp -x c++"
CPPFLAGS=
LDFLAGS=
CFLAGS=
CXXFLAGS=

export CC CXX CPP CXXCPP CPPFLAGS LDFLAGS CFLAGS CXXFLAGS

# These two are helper variables.
GCCVER=`$CXX -v 2>&1 | grep '^gcc[ -][Vv]ersion' | sed -e 's/gcc[ -][Vv]ersion
//' -e 's/ (.*//' -e 's/ /-/g'`
INSTALL_PREFIX="/usr/src/install/debug/$GCCVER"

PKG_CONFIG_PATH="$INSTALL_PREFIX/lib/pkgconfig"
PATH="$INSTALL_PREFIX/bin:$PATH"
LD_LIBRARY_PATH="$INSTALL_PREFIX/lib"

export PKG_CONFIG_PATH PATH LD_LIBRARY_PATH
------------------
Comment 1 Carlo Wood 2004-06-26 23:02:04 UTC
Using

../configure --enable-add-ons=linuxthreads --prefix=/usr

Gives the same results (same awk error).

Using a "normal" enviroment works...

If the only extra environment variable that I set is 'CC',
and I set it to my 3.5 compiler - as follows:

CC="gcc-cvs-3.5" ../configure --enable-add-ons=linuxthreads --prefix=/usr
then I get the same
gawk: scripts/versions.awk:121: fatal: expression for `>' redirection has null
string value
error.  So apparently it IS caused by using gcc version 3.5.0 20040530
[ Note that it is strangly enough (well, another bug) needed to completely
  delete the directory and then start over when changing CC.  When I just
  reconfigure with CC unset after the above error - then the script hangs
  after printing 'no versions defined for libc' ].

Using CC="gcc-3.4.0" gives the same problem.
Using CC="gcc-3.3.3" gives the same problem.
Using CC="gcc-3.3.2" gives the same problem.
Using CC="gcc" works.

Hmpf that is weird.

>gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix

>gcc-3.3.2 -v
Reading specs from /usr/local/gcc-3.3.2/lib/gcc-lib/i386-redhat-linux/3.3.2/specs
Configured with: /usr/src/gcc/gcc-3.3.2/configure --prefix=/usr/local/gcc-3.3.2
--enable-shared --with-gnu-as --with-gnu-ld --enable-languages=c++
--enable-debug --enable-threads=posix --disable-checking --with-system-zlib
--enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.3.2


Why can't I compile glic with a non-default compiler install?
Comment 2 Ulrich Drepper 2004-08-10 02:39:30 UTC
You create the problem yourself, so fix it.  Then let us know.  Nobody here is
going to waste his/her time on something which apparently nobody but you needs.

If you found the reason and think glibc should change, update the bug.
Comment 3 GOTO Masanori 2004-09-28 01:52:58 UTC
Installtion bug report is considered as #333.

*** This bug has been marked as a duplicate of 333 ***