* Problem Building Cross Compiler - gcc2.95.2 hppa1.1-hp-hpux10.20 and sparc-sun-solaris
@ 1999-11-09 11:14 Steve Fosdick
1999-11-30 23:28 ` Steve Fosdick
0 siblings, 1 reply; 2+ messages in thread
From: Steve Fosdick @ 1999-11-09 11:14 UTC (permalink / raw)
To: help-gcc
I am trying to build a cross compiler that is to run on an HP machine with an HP-PA processor running HP-UX, and generate code for a Sun machine with Sparc processor running Solaris 7.
Here's how I configured it.
mkdir gcc-obj
cd gcc-obj
../gcc-2.95.2/configure --prefix=/opt/gnu --target=sparc-sun-solaris --enable-shared --enable-haifa --with-gnu-as --with-gnu-ld --with-headers=/home/fosdicsj/software/unix/build/sparc-sun-solaris/sun-includes --with-libs=/home/fosdicsj/software/unix/build/sparc-sun-solaris/sun-libs
To start with it fails to compiler gmon-sol2.c. Here's an excerpt from the log:
/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/ -I/opt/gnu/sparc-sun-solaris/include -DCROSS_COMPILE -DIN_GCC -DHAIFA -O3 -I./include -I. -I../../gcc-2.95.2/gcc -I../../gcc-2.95.2/gcc/config -I../../gcc-2.95.2/gcc/../include \
-c ../../gcc-2.95.2/gcc/config/sparc/gmon-sol2.c -o gmon.o ../../gcc-2.95.2/gcc/config/sparc/gmon-sol2.c: In function `_mcleanup': ../../gcc-2.95.2/gcc/config/sparc/gmon-sol2.c:184: `PATH_MAX' undeclared (first use in this function)
../../gcc-2.95.2/gcc/config/sparc/gmon-sol2.c:184: (Each undeclared identifier is reported only once
../../gcc-2.95.2/gcc/config/sparc/gmon-sol2.c:184: for each function it appears in.)
make[1]: *** [gmon.o] Error 1
make[1]: Leaving directory `/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc'
make: *** [all-gcc] Error 2
zsh: 20319 exit 2 make
I "fixed" this by adding a #define for PATH_MAX to gmon-sol2.c (#include <limits.h> doesn't work) and then it gets further. Here's another log file excerpt:
Configuring in sparc-sun-solaris/libiberty
creating cache ./config.cache
checking host system type... sparc-sun-solaris2
checking build system type... hppa1.1-hp-hpux10.20
checking for sparc-sun-solaris-ar... sparc-sun-solaris-ar
checking for sparc-sun-solaris-ranlib... sparc-sun-solaris-ranlib
checking for gcc... /home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/
checking whether we are using GNU C... yes
checking whether /home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/ accepts -g... yes
checking for POSIXized ISC... no
checking for a BSD compatible install... ../../../gcc-2.95.2/libiberty/../install-sh -c
Appending ../../../gcc-2.95.2/libiberty/config/../../config/mh-sparcpic to xhost-mkfrag
checking how to run the C preprocessor... /home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/ -E
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether the C compiler (/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/ -O3 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
make[1]: Entering directory `/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/sparc-sun-solaris/libio'
make[1]: *** No rule to make target `all'. Stop.
make[1]: Leaving directory `/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/sparc-sun-solaris/libio'
make: *** [all-target-libio] Error 2
zsh: 18136 exit 2 make
A look at the log from configure reveals more info:
configure:1749: checking whether the C compiler (/home/fosdicsj/software/unix/bu ild/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/spar c-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/ -O3 ) works
configure:1765: /home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc /xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt /gnu/sparc-sun-solaris/bin/ -o conftest -O3 conftest.c 1>&5
/opt/gnu/sparc-sun-solaris/bin/ld: cannot open values-Xa.o: No such file or dire ctory
collect2: ld returned 1 exit status
configure: failed program was:
#line 1760 "configure"
#include "confdefs.h"
main(){return(0);}
So, can anyone please offer me any help on getting it to finish compiling. I have no idea what this values-Xa.o file does or where it should come from.
The same version of gcc (2.95.2) compiles flawlessly as a native compiler and gcc2.8.1 compiled OK as a cross compiler for Sparc.
--
Steve Fosdick Internet: fosdicsj@aom.bt.co.uk
Voice: +44 1473 642987 MSMAIL: BTEA/BTLIP23/FOSDICSJ
Fax: +44 1473 646656 BOAT: FOSDICSJ
Snail: B29/G34, BT Labs, Martlesham Heath, Ipswich, IP5 7RE, England.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Problem Building Cross Compiler - gcc2.95.2 hppa1.1-hp-hpux10.20 and sparc-sun-solaris
1999-11-09 11:14 Problem Building Cross Compiler - gcc2.95.2 hppa1.1-hp-hpux10.20 and sparc-sun-solaris Steve Fosdick
@ 1999-11-30 23:28 ` Steve Fosdick
0 siblings, 0 replies; 2+ messages in thread
From: Steve Fosdick @ 1999-11-30 23:28 UTC (permalink / raw)
To: help-gcc
I am trying to build a cross compiler that is to run on an HP machine with an HP-PA processor running HP-UX, and generate code for a Sun machine with Sparc processor running Solaris 7.
Here's how I configured it.
mkdir gcc-obj
cd gcc-obj
../gcc-2.95.2/configure --prefix=/opt/gnu --target=sparc-sun-solaris --enable-shared --enable-haifa --with-gnu-as --with-gnu-ld --with-headers=/home/fosdicsj/software/unix/build/sparc-sun-solaris/sun-includes --with-libs=/home/fosdicsj/software/unix/build/sparc-sun-solaris/sun-libs
To start with it fails to compiler gmon-sol2.c. Here's an excerpt from the log:
/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/ -I/opt/gnu/sparc-sun-solaris/include -DCROSS_COMPILE -DIN_GCC -DHAIFA -O3 -I./include -I. -I../../gcc-2.95.2/gcc -I../../gcc-2.95.2/gcc/config -I../../gcc-2.95.2/gcc/../include \
-c ../../gcc-2.95.2/gcc/config/sparc/gmon-sol2.c -o gmon.o ../../gcc-2.95.2/gcc/config/sparc/gmon-sol2.c: In function `_mcleanup': ../../gcc-2.95.2/gcc/config/sparc/gmon-sol2.c:184: `PATH_MAX' undeclared (first use in this function)
../../gcc-2.95.2/gcc/config/sparc/gmon-sol2.c:184: (Each undeclared identifier is reported only once
../../gcc-2.95.2/gcc/config/sparc/gmon-sol2.c:184: for each function it appears in.)
make[1]: *** [gmon.o] Error 1
make[1]: Leaving directory `/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc'
make: *** [all-gcc] Error 2
zsh: 20319 exit 2 make
I "fixed" this by adding a #define for PATH_MAX to gmon-sol2.c (#include <limits.h> doesn't work) and then it gets further. Here's another log file excerpt:
Configuring in sparc-sun-solaris/libiberty
creating cache ./config.cache
checking host system type... sparc-sun-solaris2
checking build system type... hppa1.1-hp-hpux10.20
checking for sparc-sun-solaris-ar... sparc-sun-solaris-ar
checking for sparc-sun-solaris-ranlib... sparc-sun-solaris-ranlib
checking for gcc... /home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/
checking whether we are using GNU C... yes
checking whether /home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/ accepts -g... yes
checking for POSIXized ISC... no
checking for a BSD compatible install... ../../../gcc-2.95.2/libiberty/../install-sh -c
Appending ../../../gcc-2.95.2/libiberty/config/../../config/mh-sparcpic to xhost-mkfrag
checking how to run the C preprocessor... /home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/ -E
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether the C compiler (/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/ -O3 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
make[1]: Entering directory `/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/sparc-sun-solaris/libio'
make[1]: *** No rule to make target `all'. Stop.
make[1]: Leaving directory `/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/sparc-sun-solaris/libio'
make: *** [all-target-libio] Error 2
zsh: 18136 exit 2 make
A look at the log from configure reveals more info:
configure:1749: checking whether the C compiler (/home/fosdicsj/software/unix/bu ild/sparc-sun-solaris/gcc-obj/gcc/xgcc -B/home/fosdicsj/software/unix/build/spar c-sun-solaris/gcc-obj/gcc/ -B/opt/gnu/sparc-sun-solaris/bin/ -O3 ) works
configure:1765: /home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc /xgcc -B/home/fosdicsj/software/unix/build/sparc-sun-solaris/gcc-obj/gcc/ -B/opt /gnu/sparc-sun-solaris/bin/ -o conftest -O3 conftest.c 1>&5
/opt/gnu/sparc-sun-solaris/bin/ld: cannot open values-Xa.o: No such file or dire ctory
collect2: ld returned 1 exit status
configure: failed program was:
#line 1760 "configure"
#include "confdefs.h"
main(){return(0);}
So, can anyone please offer me any help on getting it to finish compiling. I have no idea what this values-Xa.o file does or where it should come from.
The same version of gcc (2.95.2) compiles flawlessly as a native compiler and gcc2.8.1 compiled OK as a cross compiler for Sparc.
--
Steve Fosdick Internet: fosdicsj@aom.bt.co.uk
Voice: +44 1473 642987 MSMAIL: BTEA/BTLIP23/FOSDICSJ
Fax: +44 1473 646656 BOAT: FOSDICSJ
Snail: B29/G34, BT Labs, Martlesham Heath, Ipswich, IP5 7RE, England.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-11-30 23:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-09 11:14 Problem Building Cross Compiler - gcc2.95.2 hppa1.1-hp-hpux10.20 and sparc-sun-solaris Steve Fosdick
1999-11-30 23:28 ` Steve Fosdick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).