OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Problem Linking Sample Qtopia Amr App, where oh where is crt1.o
carp
post Oct 4 2005, 10:53 AM
Post #1





Group: Members
Posts: 7
Joined: 28-July 05
Member No.: 7,722



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.
Go to the top of the page
 
+Quote Post
inode0
post Oct 4 2005, 12:56 PM
Post #2





Group: Members
Posts: 97
Joined: 15-December 04
Member No.: 5,933



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
Go to the top of the page
 
+Quote Post
carp
post Oct 5 2005, 05:57 AM
Post #3





Group: Members
Posts: 7
Joined: 28-July 05
Member No.: 7,722



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
*

Go to the top of the page
 
+Quote Post
inode0
post Oct 5 2005, 06:17 AM
Post #4





Group: Members
Posts: 97
Joined: 15-December 04
Member No.: 5,933



# 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
Go to the top of the page
 
+Quote Post
carp
post Oct 6 2005, 05:25 AM
Post #5





Group: Members
Posts: 7
Joined: 28-July 05
Member No.: 7,722



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
*
Go to the top of the page
 
+Quote Post
inode0
post Oct 6 2005, 06:23 PM
Post #6





Group: Members
Posts: 97
Joined: 15-December 04
Member No.: 5,933



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th December 2014 - 02:52 PM