OESF Portables Forum

Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => OpenZaurus/Opie/Qtopia => Topic started by: larrycow on March 04, 2006, 06:52:23 am

Title: Using Gcc Directly On The Z
Post by: larrycow on March 04, 2006, 06:52:23 am
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: [Select]
arm-linux-gcc hello.c  -o hello
I got an ugly

Code: [Select]
/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.
Title: Using Gcc Directly On The Z
Post by: asm-nai on March 06, 2006, 08:18:27 pm
Quote
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: [Select]
arm-linux-gcc hello.c  -o hello
I got an ugly

Code: [Select]
/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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=116953\"][{POST_SNAPBACK}][/a][/div]

Hi.

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

 
From
Code: [Select]
/*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: [Select]
/*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 .
Title: Using Gcc Directly On The Z
Post by: larrycow on March 08, 2006, 03:34:08 pm
Actually, my /usr/lib/libc.so looks more like this:

Code: [Select]
/* 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.
Title: Using Gcc Directly On The Z
Post by: lardman on March 09, 2006, 06:03:29 am
See things like this:

https://www.oesf.org/forums/index.php?showt...l=gnu+ld+script (https://www.oesf.org/forums/index.php?showtopic=11423&hl=gnu+ld+script)
https://www.oesf.org/forums/index.php?showt...l=gnu+ld+script (https://www.oesf.org/forums/index.php?showtopic=9944&hl=gnu+ld+script)

Si
Title: Using Gcc Directly On The Z
Post by: larrycow on March 29, 2006, 05:45:36 pm
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: [Select]
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?
Title: Using Gcc Directly On The Z
Post by: Hakkikkt on April 08, 2006, 09:32:23 am
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