FW: procedure for building rtems-4.5.0beta2

Mike Davies mikert at noco.demon.co.uk
Wed May 3 23:28:45 UTC 2000


In message <7B99F52D9C62D211BE2D00A0C9D8B6960190C2FE at hcms02.jocy.sea.sie
mens.com>, "Smith, Gene" <Gene.Smith at sea.siemens.com> writes
>Matt sent me this procedure that he worked up for installing the beta for a
>pc386. It works for me.  Thought it might be useful to other new rtems users
>out there. It also points out a few problems he found and how he fixed them.
>-Gene

...snip...

>************this is the main fix I had to do****************
>export PATH=$PATH:~/rtems-4.5.0-beta2/install/bin
>************************************************************
>even though it doesn't exist yet

Thanks for that,  I found this answer myself in the end (different
install directory),  maybe the bit script needs a quick mod ?


Anyway,  having followed your instructions too the letter, the tools
build OK, now (gdb too, as far as I can tell atm).  My problem now is
getting rtems to build.  I've reached as up to your line "./bit_rtems
i386 pc386" without problems, but the result of this is as follows :

___start___

bash-2.02$ ./bit_rtems i386 pc386
/install/bin:/usr/local/bin:/bin:/cygnus/CYGWIN~1/H-
I586~1/bin:.:/cygdrive/c/egc
s-1.1.2/bin:/cygdrive/c/perl/bin:/cygdrive/c/Actel/bin:/cygdrive/c/WINNT
/system3
2:/cygdrive/c/WINNT:/cygdrive/c/BC45/IDAPI:.:/home/mike/rtems-
4.5.0-beta2/instal
l/bin:/home/mike/rtems-4.5.0-beta2/install/bin
Removing build directory build-i386-rtems ...
../rtems-4.5.0-beta2/configure --target=i386-rtems --
prefix=/home/mike/rtems-4.5
.0-beta2/install --disable-hwapi --disable-multiprocessing --enable-cxx
--enable
-rdbg --disable-tests --enable-networking --enable-posix --disable-itron
--enabl
e-rtemsbsp=pc386
creating cache ./config.cache
checking for RTEMS Version... 4.5.0-beta2
checking host system type... i386-pc-cygwin32
checking target system type... i386-pc-rtems
checking build system type... i386-pc-cygwin32
checking rtems target cpu... i386
checking for a BSD compatible install... /usr/local/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... found
checking for working automake... missing
checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles...
no
checking if the test suites are enabled? ... no
checking if cpu i386 is supported... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating tools/Makefile
creating make/Makefile
creating make/custom/Makefile
creating make/Templates/Makefile
creating make/compilers/Makefile
creating doc/Makefile
configuring in tools/build
running /bin/sh ../../../rtems-4.5.0-beta2/tools/build/configure  --
target=i386-
rtems --prefix=/home/mike/rtems-4.5.0-beta2/install --disable-hwapi --
disable-mu
ltiprocessing --enable-cxx --enable-rdbg --disable-tests --enable-
networking --e
nable-posix --disable-itron --enable-rtemsbsp=pc386 --cache-
file=../.././config.
cache --srcdir=../../../rtems-4.5.0-beta2/tools/build
loading cache ../.././config.cache
checking for RTEMS Version... 4.5.0-beta2
checking host system type... i386-pc-cygwin32
checking for a BSD compatible install... (cached) /usr/local/bin/install
-c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... missing
checking for working autoconf... found
checking for working automake... missing
checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles...
no
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for executable suffix... configure: error: installation or
configuratio
n problem: compiler cannot create executables.
configure: error: ../../../rtems-4.5.0-beta2/tools/build/configure
failed for to
ols/build
Could not successfully configure into build-i386-rtems!
bash-2.02$

___end___




I tried the compiler to see if it runs at all :

bash-2.02$ i386-rtems-gcc -dumpmachine
i386-rtems

then I tried a hello world compile on a file hello.c containing :

__start
#include <stdio.h>

int main()
{
        printf ("hello world !");
        return 0;
}
__end



bash-2.02$ i386-rtems-gcc hello.c -o hello.exe
/home/mike/rtems-4.5.0-beta2/install/i386-rtems/bin/ld: warning: cannot
find ent
ry symbol _start; defaulting to 08048084
/home/mike/rtems-4.5.0-beta2/install/i386-rtems/lib/libc.a(wsetup.o): In
functio
n `__swsetup':
wsetup.o(.text+0x5a): undefined reference to `_free_r'
/home/mike/rtems-4.5.0-beta2/install/i386-rtems/lib/libc.a(findfp.o): In
functio
n `__sfmoreglue':
findfp.o(.text+0x8c): undefined reference to `_malloc_r'
/home/mike/rtems-4.5.0-beta2/install/i386-rtems/lib/libc.a(makebuf.o):
In functi
on `__smakebuf':
makebuf.o(.text+0x2c): undefined reference to `_fstat_r'
makebuf.o(.text+0x88): undefined reference to `_malloc_r'
makebuf.o(.text+0xd3): undefined reference to `isatty'
/home/mike/rtems-4.5.0-beta2/install/i386-rtems/lib/libc.a(mprec.o): In
function
 `_Balloc':
mprec.o(.text+0x1e): undefined reference to `_calloc_r'
mprec.o(.text+0x58): undefined reference to `_calloc_r'
/home/mike/rtems-4.5.0-beta2/install/i386-rtems/lib/libc.a(stdio.o): In
function
 `__sread':
stdio.o(.text+0x19): undefined reference to `_read_r'
/home/mike/rtems-4.5.0-beta2/install/i386-rtems/lib/libc.a(stdio.o): In
function
 `__swrite':
stdio.o(.text+0x51): undefined reference to `_lseek_r'
stdio.o(.text+0x6d): undefined reference to `_write_r'
/home/mike/rtems-4.5.0-beta2/install/i386-rtems/lib/libc.a(stdio.o): In
function
 `__sseek':
stdio.o(.text+0x91): undefined reference to `_lseek_r'
/home/mike/rtems-4.5.0-beta2/install/i386-rtems/lib/libc.a(stdio.o): In
function
 `__sclose':
stdio.o(.text+0xc5): undefined reference to `_close_r'
collect2: ld returned 1 exit status
bash-2.02$


It seems as if the rtems compiler can't find its libraries or something,
have I missed out some simple "export" statement or something ?


Thanks for your help,


-- 
Mike Davies



More information about the users mailing list