4.5.0-beta3a build problems

Ralf Corsepius corsepiu at faw.uni-ulm.de
Mon Sep 18 19:53:30 UTC 2000


Martti Kuparinen wrote:
> 
> Hi!
> 
> I'm running FreeBSD 4.1-STABLE with the following packages installed:
> 
>     i386-rtems-binutils-2.9.5.0.24
>     i386-rtems-gcc-2.95.2
>     i386-rtems-gdb-4.18
> 
> The cross-compilation tools are located in /usr/local/bin/ and they are:
> 
>     i386-rtems-addr2line  i386-rtems-gasp       i386-rtems-objdump
>     i386-rtems-ar         i386-rtems-gcc        i386-rtems-ranlib
>     i386-rtems-as         i386-rtems-gdb        i386-rtems-readelf
>     i386-rtems-c++        i386-rtems-ld         i386-rtems-size
>     i386-rtems-c++filt    i386-rtems-nm         i386-rtems-strings
>     i386-rtems-g++        i386-rtems-objcopy    i386-rtems-strip

Fine.
> 
> I'm trying to compile RTEMS with the following commands but no matter
> what I do, the compilation fails. This seems to be a search path problem

Yep, cf. below.

> as things get better by adding manually "-Ifoo" statements into Makefiles.
> As this is an ugly hack so I'm not too happy with it :-) I get the same
> result even if I use the bit_rtems script.
> 
> Any ideas what's wrong with my setup and how to make things work properly?
> Maybe I'm doing something very stupid here.
> 
:)

> Martti
> 
> ---
> Martti Kuparinen <martti.kuparinen at nomadiclab.com>
> http://www.iki.fi/~kuparine/
> 
> ===============================================================================
> 
> # export CC=i386-rtems-gcc

Do *not* set CC when building RTEMS. 

Adding /usr/local/bin to $PATH should be sufficient. Also make sure
that cc rsp. gcc is a native c-compiler (/usr/local/i386-rtems/bin
must *not* be in $PATH).

> # export MAKE=gmake
This should not be required. Invoking gmake as "gmake" should be
sufficient in case "make" isn't "gnu-make" on your host.

> 
> # rm -rf source build
> # mkdir source build
> # cd source
> # tar xfz ../tgz/rtems-4.5.0-beta3a.tgz
> # cd ../build
> # ../source/rtems-4.5.0-beta3a/configure --target=i386-rtems \
>     --prefix=/usr/local/rtems --enable-rdbg

This is OK.

> 
> creating cache ./config.cache
> checking for RTEMS Version... 4.5.0-beta3a
> checking host system type... i386-unknown-freebsd4.1
> checking target system type... i386-pc-rtems
> checking build system type... i386-unknown-freebsd4.1
> checking rtems target cpu... i386
> ...
> checking whether the C compiler (i386-rtems-gcc) works... yes
> checking whether the C compiler (i386-rtems-gcc) is a cross-compiler... yes
> ...
> 
> # gmake all
> ...
> Making all in build
> gmake[2]: Entering directory `/home/martti/tmp/rtems/build/tools/build'
> i386-rtems-gcc -DHAVE_CONFIG_H -I. -I../../../source/rtems-4.5.0-beta3a/tools/build -I.     -g -O2 -c ../../../source/rtems-4.5.0-beta3a/tools/build/cklength.c
> ../../../source/rtems-4.5.0-beta3a/tools/build/cklength.c:35: memory.h: No such file or directory
> gmake[2]: *** [cklength.o] Error 1

The wrong CC is being picked up.

BTW: I do *not* recommend to use --prefix=/usr/local for building
the gnu-tools. /usr/local/include and /usr/local/lib are special
directories. Therefore installing files to these directories can
have unwanted side-effects and corrupt your system.

Ralf

-- 
Ralf Corsepius 
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
(FAW)
Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690
mailto:corsepiu at faw.uni-ulm.de           FAX: +49/731/501-999  
http://www.faw.uni-ulm.de



More information about the users mailing list