problems building gcc 4.0.1 on Solaris 9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When building gcc 4.0.1 on Solaris 9, I get

ld: warning: file ../build-sparc-sun-solaris2.9/libiberty/libiberty.a(hashtab.o): wrong ELF class: ELFCLASS64
Undefined			first referenced
 symbol  			    in file
htab_create_alloc                   build/genmodes.o
htab_find                           build/genmodes.o
xcalloc                             build/genmodes.o
htab_hash_string                    build/genmodes.o
htab_find_slot                      build/genmodes.o
xmalloc                             build/genmodes.o
xstrdup                             build/genmodes.o
ld: fatal: Symbol referencing errors. No output written to build/genmodes

This is my script for running configure:

#!/usr/bin/sh
umask 022
cd /local1/dick1/dick1/gcc
# /usr/sfw/bin/gtar xvfp gcc-4.0.1.tar # tarball doesn't like Sun tar
#
# start from a clean sheet
rm -rf gcc-d/*
#mkdir -m 755 gcc-d
cd gcc-d
CC="/nerc/packages/gcc/3.4.2/bin/gcc"
export CC
CFLAGS="-m64"
export CFLAGS
CONFIG_SHELL=/bin/ksh; export CONFIG_SHELL
ABI=64
LDFLAGS=-64
MAKE=/opt/sfw/bin/gmake
/local1/dick1/dick1/gcc/gcc-4.0.1/configure --prefix=/nerc/packages/gcc/4.0.1/ \ --enable-languages=c,c++,f95 \
	--with-gmp=/nerc/packages/gcc/4.0.1/gmp \
	--with-mpfr=/nerc/packages/gcc/4.0.1/mpfr
#
# use gmake, else errors
# next is  gmake bootstrap
# next is gmake install

/nerc/packages/gcc/3.4.2/bin/gcc -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genmodes \ build/genmodes.o build/errors.o ../build-sparc-sun-solaris2.9/libiberty/libiberty.a ld: warning: file ../build-sparc-sun-solaris2.9/libiberty/libiberty.a(hashtab.o): wrong ELF class: ELFCLASS64
Undefined			first referenced
 symbol  			    in file
htab_create_alloc                   build/genmodes.o
htab_find                           build/genmodes.o
xcalloc                             build/genmodes.o
htab_hash_string                    build/genmodes.o
htab_find_slot                      build/genmodes.o
xmalloc                             build/genmodes.o
xstrdup                             build/genmodes.o
ld: fatal: Symbol referencing errors. No output written to build/genmodes
collect2: ld returned 1 exit status
gmake[2]: *** [build/genmodes] Error 1
gmake[2]: Leaving directory `/local1/dick1/dick1/gcc/gcc-d/gcc'
gmake[1]: *** [stage1_build] Error 2
gmake[1]: Leaving directory `/local1/dick1/dick1/gcc/gcc-d/gcc'
gmake: *** [bootstrap] Error 2

So, I am specifying CFLAGS -m64, but it looks like CFLAGS isn't being carried through to the build of these components.

If I now add change the CC definition to
CC="/nerc/packages/gcc/3.4.2/bin/gcc -m64"

I get a lot further, as far as

stage1/xgcc -Bstage1/ -B/nerc/packages/gcc/4.0.1//sparc-sun-solaris2.9/bin/ -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genmodes \ build/genmodes.o build/errors.o ../build-sparc-sun-solaris2.9/libiberty/libiberty.a ld: warning: file ../build-sparc-sun-solaris2.9/libiberty/libiberty.a(hashtab.o): wrong ELF class: ELFCLASS64
Undefined			first referenced
 symbol  			    in file
htab_create_alloc                   build/genmodes.o
htab_find                           build/genmodes.o
xcalloc                             build/genmodes.o
htab_hash_string                    build/genmodes.o
htab_find_slot                      build/genmodes.o
xmalloc                             build/genmodes.o
xstrdup                             build/genmodes.o
ld: fatal: Symbol referencing errors. No output written to build/genmodes
collect2: ld returned 1 exit status
gmake[2]: *** [build/genmodes] Error 1
gmake[2]: Leaving directory `/local1/dick1/dick1/gcc/gcc-d/gcc'
gmake[1]: *** [stage2_build] Error 2
gmake[1]: Leaving directory `/local1/dick1/dick1/gcc/gcc-d/gcc'
gmake: *** [bootstrap] Error 2

Is this a bug with a solution?

Any suggestions as to what I do next?

tia, Dick

--
Richard Gillman
iTSS UNIX Systems Group, Maclean Building, Wallingford OX10 8BB
Tel: 01491 - 692 339


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux