help-gnat
[Top][All Lists]
Advanced

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

Problems with building GCC/GNAT as an Ada cross compiler


From: pee
Subject: Problems with building GCC/GNAT as an Ada cross compiler
Date: Tue, 28 Oct 2003 17:57:36 -0500
User-agent: Internet Messaging Program (IMP) 3.1-cvs

Hello all,

    I am trying to build GNAT to cross compile from host=i686-linux-pc to
target=powerpc-elf.  However, only gnatbind is available after building
everything.  There's no gnatmake, gnatfind, etc.  When I tried calling "make
gnatlib" and "make gnattools", it gave out some error messages.  I tried looking
through both the archive but couldn't find anything on it.  I wonder if anyone
could help me out.  Thank you very much.

    Here is the configuration I'm using:

1. binutils-1.11.0
2. gcc-3.3
3. newlib-1.11.0
4. linux-2.4.20-20.9

    I followed Bill Gatliff's building script, and all these configure and make
didn't give me any error.  After that, I tried making gnatlib in order to build
gnattools afterwards, but I ran into this error:



make[1]: Entering directory `/home/pee/XComp_source/CrossGNAT/build-gcc/gcc/ada'
make -C rts CC="../../xgcc -B../../" \
        INCLUDES="-I. -I.. -I../..
-I/home/pee/XComp_source/CrossGNAT/gcc-3.3/gcc/ada
-I/home/pee/XComp_source/CrossGNAT/gcc-3.3/gcc/ada/..
-I/home/pee/XComp_source/CrossGNAT/gcc-3.3/gcc/ada/../config
-I/home/pee/XComp_source/CrossGNAT/gcc-3.3/gcc/ada/../../include -I./../.." \
                CFLAGS="-g -O2  -fexceptions -DIN_RTS" \
        srcdir=/home/pee/XComp_source/CrossGNAT/gcc-3.3/gcc/ada \
        -f ../Makefile adaint.o argv.o cio.o cstreams.o errno.o exit.o raise.o
sysdep.o aux-io.o init.o cal.o adafinal.o tracebak.o expect.o mkdir.o  prefix.o
make[2]: Entering directory 
`/home/pee/XComp_source/CrossGNAT/build-gcc/gcc/ada/rts'
../../xgcc -B../../ -c -DCROSS_COMPILE -DIN_GCC   `echo -g -O2  -fexceptions
-DIN_RTS |sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`        -I. -I..
-I../.. -I/home/pee/XComp_source/CrossGNAT/gcc-3.3/gcc/ada
-I/home/pee/XComp_source/CrossGNAT/gcc-3.3/gcc/ada/..
-I/home/pee/XComp_source/CrossGNAT/gcc-3.3/gcc/ada/../config
-I/home/pee/XComp_source/CrossGNAT/gcc-3.3/gcc/ada/../../include -I./../.. 
adaint.c
In file included from adaint.c:128:
adaint.h:71: error: parse error before '*' token
adaint.c:230: error: `MAXPATHLEN' undeclared here (not in a function)
adaint.c:725: error: parse error before "DIR"
adaint.c:725: warning: data definition has no type or storage class
adaint.c:727: error: parse error before '{' token
adaint.c: In function `__gnat_get_env_value_ptr':
adaint.c:1113: warning: assignment makes pointer from integer without a cast
adaint.c: In function `__gnat_locate_exec_on_path':
adaint.c:1827: warning: initialization makes pointer from integer without a cast
make[2]: *** [adaint.o] Error 1
make[2]: Leaving directory 
`/home/pee/XComp_source/CrossGNAT/build-gcc/gcc/ada/rts'
make[1]: *** [gnatlib] Error 2
make[1]: Leaving directory `/home/pee/XComp_source/CrossGNAT/build-gcc/gcc/ada'
make: *** [gnatlib] Error 2


     It was complaining that it couldn't find dirent.h in the include path
before, so I copied newlib-1.11.0/newlib/libc/include into the target include
path, and it could find dirent.h, but still gives out this error.

     Thank you very much for your help.

Pee


-------------------------------------------------------------------------------

     Here is my build transcript if necessary.

  
*** build binutils ***

$ ../binutils-2.14/configure --target=$target --prefix=$prefix 2>&1 | tee
configure.log

$ make all install 2>&1 | tee make.log
  
                                                                            
*** build gcc-core ***

$ ../gcc-3.3/configure --target=$target --prefix=$prefix
--enable-languages=c,ada --with-local-prefix=$prefix/$target --without-headers
--with-newlib --disable-shared --with-gnu-as --with-gnu-ld --enable-threads
--host=i686-linux 2>&1 | tee configure.log

$ make all-gcc install-gcc 2>&1 | tee make.log


*** build newlib ***

$ ../newlib-1.11.0/configure --prefix=$prefix --target=$target 2>&1 | tee
configure.log

$ make all install info install-info 2>&1 | tee make.log


*** build gcc full ***

$ ../gcc-3.3/configure --target=$target --prefix=$prefix
--enable-languages=c,ada --with-local-prefix=$prefix/$target 2>&1 | tee
configure_full.log

$ make all install 2>&1 | tee make_full.log


    Here only gnatbind is available, so I go into gcc-3.3/gcc directory and
build gnatlib in order to build gnattools later on, but I got an error:

$ make gnatlib







reply via email to

[Prev in Thread] Current Thread [Next in Thread]