Help - Search - Members - Calendar
Full Version: Problem Linking Sample Qtopia Amr App
OESF Forums > General Forums > Desktop Operating Systems Issues > Linux Issues
carp
When I do a tmake and develop the Qtopia 1.6 sample app on Redhat 9 for x86 all is well and it compiles links and runs.

When I switch the the arm development and regen the Makefile so that it uses the arm-linux-gcc compiler and the Qtopia/Sharp libs then I get a linker error:

arm-linux-gcc -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o -L/opt/Qtopia/sharp/lib -L/opt/Qtopia/sharp/lib
/opt/Embedix/tools/arm-linux/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status
make: *** [example] Error 1

I've followed the earlier Qtopia thread to get this far.
inode0
QUOTE(carp @ Oct 4 2005, 06:53 PM)
arm-linux-gcc  -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o  -L/opt/Qtopia/sharp/lib -L/opt/Qtopia/sharp/lib
/opt/Embedix/tools/arm-linux/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status
make: *** [example] Error 1

I don't have a system handy to look, but I would expect it to be in the some /FOO/usr/lib directory where FOO might be anything, depending on how you installed the compiler.

Have you tried

# updatedb
# locate crt1.o

That might help you find the one you are looking for?!

John
carp
Ok I should have been more specific... shame on me. I'd already found crt1.o (/usr/lib) and one of my many link line edits included /usr/lib as follows:

[carpenrc@localhost example]$ locate crt1.o
/usr/lib/Mcrt1.o
/usr/lib/crt1.o
/usr/lib/gcrt1.o

[carpenrc@localhost example]$ make
arm-linux-gcc -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o -L/opt/Qtopia/sharp/lib -L/usr/lib -ljpeg -luuid -lqpe -lqte

/opt/Embedix/tools/arm-linux/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status
make: *** [example] Error 1

[carpenrc@localhost example]$ echo $LD_LIBRARY_PATH
/lib:/usr/lib:/opt/Qtopia/sharp/lib

So it seems obvious but obviously the linker doesn't find the file.

Anything anyone can think of?

QUOTE(inode0 @ Oct 4 2005, 04:56 PM)
QUOTE(carp @ Oct 4 2005, 06:53 PM)
arm-linux-gcc  -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o  -L/opt/Qtopia/sharp/lib -L/opt/Qtopia/sharp/lib
/opt/Embedix/tools/arm-linux/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status
make: *** [example] Error 1

I don't have a system handy to look, but I would expect it to be in the some /FOO/usr/lib directory where FOO might be anything, depending on how you installed the compiler.

Have you tried

# updatedb
# locate crt1.o

That might help you find the one you are looking for?!

John
*

inode0
# file /usr/lib/crt1.o /opt/Embedix/tools/arm-linux/lib/crt1.o
/usr/lib/crt1.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
/opt/Embedix/tools/arm-linux/lib/crt1.o: ELF 32-bit LSB relocatable, ARM, version 1 (ARM), not stripped

Check to make sure you are linking against the ARM version.

John
carp
Aha said the blind man...

I'm missing crt1.o in my /opt/Embedix/tools/arm-linux/lib dir. Very few files there. Hmm. Where can I download these arm libs? I copied all the shared libs out of /lib from my Zaurus.

QUOTE(inode0 @ Oct 5 2005, 10:17 AM)
# file /usr/lib/crt1.o /opt/Embedix/tools/arm-linux/lib/crt1.o
/usr/lib/crt1.o:                        ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
/opt/Embedix/tools/arm-linux/lib/crt1.o: ELF 32-bit LSB relocatable, ARM, version 1 (ARM), not stripped

Check to make sure you are linking against the ARM version.

John
*
inode0
QUOTE(carp @ Oct 6 2005, 01:25 PM)
Aha said the blind man...

I'm missing crt1.o in my /opt/Embedix/tools/arm-linux/lib dir.  Very few files there.  Hmm.  Where can I download these arm libs?  I copied all the shared libs out of /lib from my Zaurus.

Should be able to find everything you need here.

John
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.