From: Steve Fosdick <steve.fosdick@aom.bt.co.uk>
To: help-gcc@gnu.org
Subject: Problem Building Cross Compiler - gcc2.95.2 hppa1.1-hp-hpux10.20 and sparc-sun-solaris
Date: Tue, 30 Nov 1999 23:28:00 -0000 [thread overview]
Message-ID: <38287211.376EF8D5@aom.bt.co.uk> (raw)
Message-ID: <19991130232800.xl1VTEZx4nupdFoKdJs6vmyLcx4PgUgWrF4IUKe9AXc@z> (raw)
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.
next reply other threads:[~1999-11-30 23:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-09 11:14 Steve Fosdick [this message]
1999-11-30 23:28 ` Steve Fosdick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38287211.376EF8D5@aom.bt.co.uk \
--to=steve.fosdick@aom.bt.co.uk \
--cc=help-gcc@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).