[ECOS] Newbie Q: building ecos 2.0

Alexander Popov s_popov@prosyst.bg
Tue Oct 14 11:02:00 GMT 2003


Hi all,

I just got ecos and I'm (a complete and helpless newbie :) ) trying to 
build an image for i386 (PC).
I used the configtool to setup the platform but when I tried to build it 
it crushed on a few places. I fixed most of them one way or another but 
I'm stuck here:

<cut>

make[1]: `/opt/ecos/ecos-2.0/tools/bin/pentium3_install/lib/target.ld' 
is up to date.
make[1]: Leaving directory 
`/opt/ecos/ecos-2.0/tools/bin/pentium3_build/hal/i386/arch/v2_0'
make -r -C services/loader/v2_0 tests/libfoo.so
make[1]: Entering directory 
`/opt/ecos/ecos-2.0/tools/bin/pentium3_build/services/loader/v2_0'
mkdir -p tests
i386-elf-gcc -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef 
-Woverloaded-virtual -g -ffunction-sections -fdata-sections -fno-rtti 
-fno-exceptions -finit-priority -Wp,-MD,foo.tmp  
-I/opt/ecos/ecos-2.0/tools/bin/pentium3_install/include 
-I/opt/ecos/ecos-2.0/packages/services/loader/v2_0 
-I/opt/ecos/ecos-2.0/packages/services/loader/v2_0/src 
-I/opt/ecos/ecos-2.0/packages/services/loader/v2_0/tests -I. -shared -c 
-o tests/foo.o /opt/ecos/ecos-2.0/packages/services/loader/v2_0/tests/foo.c
i386-elf-gcc -g -nostdlib 
-L/opt/ecos/ecos-2.0/tools/bin/pentium3_install/lib -shared -Tdynamic.ld 
-o tests/libfoo.so 
/opt/ecos/ecos-2.0/tools/bin/pentium3_install/lib/crtbeginS.o 
tests/foo.o /opt/ecos/ecos-2.0/tools/bin/pentium3_install/lib/crtendS.o
tests/foo.o: In function `foo':
/opt/ecos/ecos-2.0/packages/services/loader/v2_0/tests/foo.c:68: 
undefined reference to `fee'
collect2: ld returned 1 exit status
make[1]: *** [tests/libfoo.so] Error 1
make[1]: Leaving directory 
`/opt/ecos/ecos-2.0/tools/bin/pentium3_build/services/loader/v2_0'
make: *** [build] Error 2
make: Leaving directory `/opt/ecos/ecos-2.0/tools/bin/pentium3_build'

obviously the linker can't find fee (which is defined extern).
I found the implementation in services/loader/v2_0/tests/loadfoo.cxx
To skip the error and continue the building I defined fee inside 
tests/foo.c but that didn't help much since I got this:

i386-elf-gcc -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef 
-Woverloaded-virtual -g -ffunction-sections -fdata-sections -fno-rtti 
-fno-exceptions -finit-priority -Wp,-MD,loadfoo.tmp  
-I/opt/ecos/ecos-2.0/tools/bin/pentium3_install/include 
-I/opt/ecos/ecos-2.0/packages/services/loader/v2_0 
-I/opt/ecos/ecos-2.0/packages/services/loader/v2_0/src 
-I/opt/ecos/ecos-2.0/packages/services/loader/v2_0/tests -I. -c -o 
tests/loadfoo.o 
/opt/ecos/ecos-2.0/packages/services/loader/v2_0/tests/loadfoo.cxx
#                   i386-elf-gcc -g -nostdlib 
-L/opt/ecos/ecos-2.0/tools/bin/pentium3_install/lib -Ttarget.ld 
-ldlforce -o 
/opt/ecos/ecos-2.0/tools/bin/pentium3_install/tests/services/loader/current/tests/loadfoo 
/opt/ecos/ecos-2.0/tools/bin/pentium3_install/lib/crtbeginS.o 
tests/loadfoo.o /opt/ecos/ecos-2.0/tools/bin/pentium3_install/lib/crtendS.o
i386-elf-gcc -g -nostdlib -Wl,-E 
-L/opt/ecos/ecos-2.0/tools/bin/pentium3_install/lib -Ttarget.ld 
-ldlforce -o 
/opt/ecos/ecos-2.0/tools/bin/pentium3_install/tests/services/loader/current/tests/loadfoo 
tests/loadfoo.o
/opt/ecos/ecos-2.0/tools/bin/pentium3_install/lib/libtarget.a(io_fileio_select.o): 
In function `_GLOBAL__D.50000_cyg_timeval_to_ticks':
/opt/ecos/ecos-2.0/packages/io/fileio/v2_0/src/select.cxx:93: undefined 
reference to `cyg_pthread_sigmask_set'
/opt/ecos/ecos-2.0/packages/io/fileio/v2_0/src/select.cxx:93: undefined 
reference to `cyg_posix_sigpending'
/opt/ecos/ecos-2.0/packages/io/fileio/v2_0/src/select.cxx:93: undefined 
reference to `cyg_pthread_sigmask_set'
/opt/ecos/ecos-2.0/packages/io/fileio/v2_0/src/select.cxx:93: undefined 
reference to `cyg_posix_deliver_signals'
/opt/ecos/ecos-2.0/packages/io/fileio/v2_0/src/select.cxx:93: undefined 
reference to `cyg_posix_deliver_signals'
/opt/ecos/ecos-2.0/tools/bin/pentium3_install/lib/libtarget.a(services_loader_loader.o): 
In function `_GLOBAL__D__ZN10Cyg_Loader6loaderE':
/opt/ecos/ecos-2.0/packages/services/loader/v2_0/src/loader.cxx:124: 
undefined reference to `_DYNAMIC'
/opt/ecos/ecos-2.0/packages/services/loader/v2_0/src/loader.cxx:124: 
undefined reference to `_DYNAMIC'
collect2: ld returned 1 exit status
make[1]: *** 
[/opt/ecos/ecos-2.0/tools/bin/pentium3_install/tests/services/loader/current/tests/loadfoo] 
Error 1
make[1]: Leaving directory 
`/opt/ecos/ecos-2.0/tools/bin/pentium3_build/services/loader/v2_0'
make: *** [build] Error 2
make: Leaving directory `/opt/ecos/ecos-2.0/tools/bin/pentium3_build'

Should there be any -l<lib> options in LDFLAGS that is missing, or maybe 
more stuff in the config (everithink was resolved when I started 
compiling it)?

Thanks in advance.

Best Regards,
Sasho


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list