Help - Search - Members - Calendar
Full Version: Using Gcc Directly On The Z
OESF Forums > Distros, Development, and Model Specific Forums > Everything Development > OpenZaurus/Opie/Qtopia
larrycow
I'm trying to compile some world-hailing test program on my zaurus. I installed gcc and, as far as I know, everything needed. But when I'm trying to

CODE
arm-linux-gcc hello.c  -o hello


I got an ugly

CODE
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/bin/ld:/usr/lib/gcc/arm-linux/3.4.3/../../../libc.so: file format not recognized; treating as linker script
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/bin/ld:/usr/lib/gcc/arm-linux/3.4.3/../../../libc.so:4: syntax error
collect2: ld returned 1 exit status


Would anyone understand this? And, better, explain me why?

Thanks alot.
asm-nai
QUOTE(larrycow @ Mar 4 2006, 08:52 PM)
I'm trying to compile some world-hailing test program on my zaurus. I installed gcc and, as far as I know, everything needed. But when I'm trying to

CODE
arm-linux-gcc hello.c  -o hello


I got an ugly

CODE
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/bin/ld:/usr/lib/gcc/arm-linux/3.4.3/../../../libc.so: file format not recognized; treating as linker script
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/bin/ld:/usr/lib/gcc/arm-linux/3.4.3/../../../libc.so:4: syntax error
collect2: ld returned 1 exit status


Would anyone understand this? And, better, explain me why?

Thanks alot.
*


Hi.

You should edit "/usr/lib/libc.so".


From
CODE
/*GNU ld script
 Use the shared library,but some functions are only in
 the static library,so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
GROUP( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED( /lib/ld-linux.so.2) )


To
CODE
/*GNU ld script
 Use the shared library,but some functions are only in
 the static library,so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
GROUP( /lib/libc.so.6 /usr/lib/libc_nonshared.a  )


Bilding consists of this well in my environment .
larrycow
Actually, my /usr/lib/libc.so looks more like this:

CODE
/* GNU ld script
  Use the shared library, but some functions are only in
  the static library, so try that secondarily.  */
*** BUG in libc/scripts/output-format.sed *** elf32-bigarm,elf32-littlearm
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )


I guess the BUG line can explain a lot of things, but I can't see how to work around this.
larrycow
I tried again on the new 3.5.4 release. Loads of packages to install, but at least it looks better (*-symlinks.ipk is the way...).

Still, I can't compile the simplest C program on Earth. Well, actually I can't link it. The linker told me that

CODE
root@collie:~# gcc -o hello hello.c
/usr/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld: cannot find /lib/libc.so.6 inside /usr/bin/../../usr
collect2: ld returned 1 exit status


Would anyone have an idea?
Hakkikkt
Hoi,
I had a similar problem with libc6. You should check that you have libc6 installed.
If this is already the case, you should check that libc6.so.6 is in the path ...

Greetings, Georg
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.