OESF Portables Forum

Everything Else => Desktop Operating Systems Issues => Zaurus General Forums => Archived Forums => Linux Issues => Topic started by: carp on October 04, 2005, 02:53:59 pm

Title: Problem Linking Sample Qtopia Amr App
Post by: carp on October 04, 2005, 02:53:59 pm
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.
Title: Problem Linking Sample Qtopia Amr App
Post by: inode0 on October 04, 2005, 04:56:00 pm
Quote
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
Title: Problem Linking Sample Qtopia Amr App
Post by: carp on October 05, 2005, 09:57:55 am
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
Quote
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
[div align=\"right\"][a href=\"index.php?act=findpost&pid=98181\"][{POST_SNAPBACK}][/a][/div]
Title: Problem Linking Sample Qtopia Amr App
Post by: inode0 on October 05, 2005, 10:17:12 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
Title: Problem Linking Sample Qtopia Amr App
Post by: carp on October 06, 2005, 09:25:11 am
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
# 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
[div align=\"right\"][a href=\"index.php?act=findpost&pid=98263\"][{POST_SNAPBACK}][/a][/div]
Title: Problem Linking Sample Qtopia Amr App
Post by: inode0 on October 06, 2005, 10:23:02 pm
Quote
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 (https://www.oesf.org/index.php?title=Compiler_Setup).

John