public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Newbie Q: building ecos 2.0
@ 2003-10-14 11:02 Alexander Popov
  2003-10-14 11:21 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Popov @ 2003-10-14 11:02 UTC (permalink / raw)
  To: ecos-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] Newbie Q: building ecos 2.0
  2003-10-14 11:02 [ECOS] Newbie Q: building ecos 2.0 Alexander Popov
@ 2003-10-14 11:21 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2003-10-14 11:21 UTC (permalink / raw)
  To: Alexander Popov; +Cc: ecos-discuss

On Tue, Oct 14, 2003 at 02:02:00PM +0300, Alexander Popov wrote:
> 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:

You should not have to fix anything. It should work right out of the
box. If it does not, its generally a user error. 
 
> 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

It seems very strange that a newbie would be trying to use the
loader. I suggest you leave that alone until you graduate from newbie
and become at least experienced or maybe Guru.

Start by building a floppy redboot image.

export ECOS_REPOSITORY=~/eCos/anoncvs/packages/
ecosconfig new pc redboot
ecosconfig import ~/eCos/anoncvs/packages/hal/i386/pc/current/misc/redboot_FLOPPY.ecm
ecosconfig tree
make

The resulting image in the bin directory onto a floppy and boot it.

All this is well documented, so just RTM,

    Andrew

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-14 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-14 11:02 [ECOS] Newbie Q: building ecos 2.0 Alexander Popov
2003-10-14 11:21 ` Andrew Lunn

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).