This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Using GCC 3.0.4 on both Sun Solaris 8 and HP-UX 11.11 - Code compiles on Solaris 8 but not on HP-UX 11.11
- From: Paul Nakao <paul dot nakao at amdocs dot com>
- To: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
- Date: Mon, 13 May 2002 09:31:17 -0400
- Subject: Using GCC 3.0.4 on both Sun Solaris 8 and HP-UX 11.11 - Code compiles on Solaris 8 but not on HP-UX 11.11
I am trying to compile various shareware code on Sun Solaris 8 (sparc) and HP-UX 11.11
The three products I am trying to compile are:
UnixCppUnit v1.5
snmp++ v3.1.6c
xerces-c v4.0.1 (from IBM Alphaworks)
All the above products compile fine on Sun Solaris 8 using GCC 3.0.4 but they all fail with linker errors using the exact same GCC 3.0.4 compiler on HP-UX 11.11
My guess is that there is a problem with the HP-UX linker because it is not likely that three different products fail similarly when all compile fine on a different platform.
I compiled GCC 3.0.4 for Sun Solaris 8 using:
./configure --prefix=/export/home/gcc/gcc-3.0.4 --exec-prefix=/export/home/gcc/gcc-3.0.4 \
--with-gnu-as --with-as=/export/home/binutils/binutils-2.11.2/bin/as \
--with-gnu-ld --with-ld=/export/home/binutils/binutils-2.11.2/bin/ld --enable-libgcj
gmake bootstrap
gmake install
I compiled GCC 3.0.4 for HP-UX 11.11 using:
PATH=/export/home/binutils/binutils-2.11.2/bin:${PATH}
export PATH
CONFIG_SHELL=/usr/bin/ksh
export CONFIG_SHELL
unset CCOPTS
unset LDOPTS
CC=cc
export CC
./configure --prefix=/export/home/gcc/gcc-3.0.4_gnu_as \
--exec-prefix=/export/home/gcc/gcc-3.0.4_gnu_as \
--with-gnu-as --with-as=/export/home/binutils/binutils-2.11.2/bin/as
gmake bootstrap
gmake install
I have tried three different products known to compile with GCC 3.0.4 compiler and they all fail at the linker stage with something along the lines of :
g++ -G -o `basename ../../lib/libCppUnit.so` TestCase.o TestFailure.o TestResult.o TestSuite.o
g++: unrecognized option `-G'
/usr/ccs/bin/ld: Unsatisfied symbols:
main (Not referenced yet! Probably due to -u option)
collect2: ld returned 1 exit status
gmake[3]: *** [../../lib/libCppUnit.so] Error 1
gmake[3]: Leaving directory `/export/home/UnixCppUnit/UnixCppUnit_1.5/29_04_2002/UnixCppUnit/test/framework'
gmake[2]: *** [all] Error 1
gmake[2]: Leaving directory `/export/home/UnixCppUnit/UnixCppUnit_1.5/29_04_2002/UnixCppUnit/test'
gmake[1]: *** [all] Error 1
gmake[1]: Leaving directory `/export/home/UnixCppUnit/UnixCppUnit_1.5/29_04_2002/UnixCppUnit'
gmake: *** [all] Error 2
I will get errors similar to the above when compiling:
UnixCppUnit v1.5
snmp++ v3.1.6c
xerces-c v4.0.1
Anytime I compile I seem to get the unrecognized -G option and the 'ld' errors about 'Unsatisifed symobols' which don't make any sense considering it is only linking in the *.o files which were just compiled and there are no external libraries being linked in just yet.
I have also patched the HP-UX linker with the latest 'ld' patch of PHSS_26263 prior to compiling GCC 3.0.4
Any help or advice would be much appreciated.
Paul Nakao
Advanced Engineering Services
Senior Consultant
Amdocs Canada Inc.
55 University Avenue, Suite 1500
Toronto, Ontario
CANADA M5J 2H7
E-Mail: paul.nakao@amdocs.com
Voice: (416) 216-5957
Fax: (416) 363-1011
-------------------------------------------------------------------------------------
The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated recipient(s)
of the message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or copying of
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.
Thank you.
-------------------------------------------------------------------------------------