Author Topic: How To Setup Native Onboard Development On 3.5.2  (Read 7733 times)

Absolute Nirvana

  • Newbie
  • *
  • Posts: 32
    • View Profile
How To Setup Native Onboard Development On 3.5.2
« on: December 11, 2004, 12:00:41 am »
First of all I would like to say Kudos to the OZ team for all of their hard work and innovation with these latest releases.

I've noticed that the 3.5.2 feed has a development section and I eagerly went through it with hopes of finally having a recent, up to date development environment on my zaurus.  I proceeded to install gcc_3.4.2-r3_arm.ipk, binutils_2.15.94.0.1-r0_arm.ipk, and their respective symlink pakages.  The gcc command is now recognized on my Z, but when I try to compile a simple Hello World program:

Code: [Select]
#include

int main(void)
{
     printf("Hello Zaurus\n");
     return 0;
}

I get:
Code: [Select]
stdio.h: No such file or directory
Does anyone have any insight to why it is not finding these basic libraries? Do I need to add something that is missing from my $PATH variable maybe?
Zaurus SL-C1000
PdaXrom 1.1.0 beta 2
Brando Ultra Clear Screen Protector
512MB Viking CF, Crucial 128MB MMC
Ambicom WL1100 CF wifi
Custom hand-sewn case (made out of headliner)

Elleomea

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • http://www.mikeasoft.com
How To Setup Native Onboard Development On 3.5.2
« Reply #1 on: December 11, 2004, 07:02:47 am »
You need to install libstdc++-dev from the dev feed (note: this is different from the devel feed). Be warned, it takes up quite a bit of space.

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
How To Setup Native Onboard Development On 3.5.2
« Reply #2 on: December 11, 2004, 07:14:52 am »
stdio.h sounds more like libc6-devel to me.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

Elleomea

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • http://www.mikeasoft.com
How To Setup Native Onboard Development On 3.5.2
« Reply #3 on: December 11, 2004, 07:24:15 am »
Oh sorry, my mistake; it is libc6-dev that's needed.

Absolute Nirvana

  • Newbie
  • *
  • Posts: 32
    • View Profile
How To Setup Native Onboard Development On 3.5.2
« Reply #4 on: December 14, 2004, 05:29:52 pm »
Thanks guys, it was indeed libc6-dev that was needed.  Adding that got rid of the stdio.h not being found error, however I get a different error now.  When i try to compile the same program I now get:

Code: [Select]
/mnt/card/usr/bin/../lib/gcc/arm-linux/3.4.2/../../../../arm-linux/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status

Am I missing a symlink to libgcc_s.so.1 in my ../arm-linux/bin/ld path or am I missing something else completely different?
Zaurus SL-C1000
PdaXrom 1.1.0 beta 2
Brando Ultra Clear Screen Protector
512MB Viking CF, Crucial 128MB MMC
Ambicom WL1100 CF wifi
Custom hand-sewn case (made out of headliner)

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
How To Setup Native Onboard Development On 3.5.2
« Reply #5 on: December 15, 2004, 05:52:47 am »
It's probably lacking a symlink to libgcc_s in the place it expects. Try creating a symlink (you might need to look at a different native toolchain to work out where it should go though).

I must admit I tried getting the native toolchain up and running and eventually gave up (can't remember what stumped me), but I'm keen for someone else to have a go and see whether I missed something obvious.


Si

P.S.
Quote
Am I missing a symlink to libgcc_s.so.1 in my ../arm-linux/bin/ld path or am I missing something else completely different?

You might place it in <toolchain root>/arm-linux/lib as this is where other libs to be linked are placed. $ld_library_path should not be fiddled with for compilers as it's only for libraries which are to be run (dynamically loaded)!
« Last Edit: December 15, 2004, 05:55:14 am by lardman »
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

Absolute Nirvana

  • Newbie
  • *
  • Posts: 32
    • View Profile
How To Setup Native Onboard Development On 3.5.2
« Reply #6 on: December 15, 2004, 06:02:08 pm »
Alrighty, I'll give that a go and see if that does the trick or not.  It might take a couple of days because i'm hot and heavy into finals this week at school.  If I am able to get work however I will write up a mini-howto outlining the process step by step and what exactly it was that I did.
Zaurus SL-C1000
PdaXrom 1.1.0 beta 2
Brando Ultra Clear Screen Protector
512MB Viking CF, Crucial 128MB MMC
Ambicom WL1100 CF wifi
Custom hand-sewn case (made out of headliner)

Absolute Nirvana

  • Newbie
  • *
  • Posts: 32
    • View Profile
How To Setup Native Onboard Development On 3.5.2
« Reply #7 on: December 17, 2004, 09:06:24 pm »
I haven't come up with a complete solution, but I have come a step closer.  Creating a symlink got rid of the error about lgcc_s not being found.  I did this like so:

Code: [Select]
ln -sf /lib/libgcc_s.so.1 /mnt/card/usr/lib/libgcc_s.so
Now, (yet again) I get a different error, this time about glibc when I try to compile.  The two errors that I get are:

Code: [Select]
libc.so: file format not recognized; treating as linker script

and

libc.so:4: syntax error

Does anyone have any insight on these glibc errors?
Zaurus SL-C1000
PdaXrom 1.1.0 beta 2
Brando Ultra Clear Screen Protector
512MB Viking CF, Crucial 128MB MMC
Ambicom WL1100 CF wifi
Custom hand-sewn case (made out of headliner)

blakeyez

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://
How To Setup Native Onboard Development On 3.5.2
« Reply #8 on: December 18, 2004, 09:32:08 am »
I tried to setup a native toolchain build with openembedded a few months ago and had some similar troubles, and eventually gave up.  As far as I could determine, nothing done on the zaurus end would completely fix the toolchain.  It was an issue in how binutils was built iirc, but I never did figure out how to fix it.

Dave

Absolute Nirvana

  • Newbie
  • *
  • Posts: 32
    • View Profile
How To Setup Native Onboard Development On 3.5.2
« Reply #9 on: January 07, 2005, 01:21:04 pm »
Dave,

When you attempted to build everything using OE, were you using OZ 3.5.1 or 3.5.2? I'm assuming it was 3.5.1 if it was a few months ago.  Now that I have a lil more free time on my hands I might like to see if I can make any progress on this.  I'm going to keep on trying because I, as well as others, would get very good use out of it.

-Curtis
Zaurus SL-C1000
PdaXrom 1.1.0 beta 2
Brando Ultra Clear Screen Protector
512MB Viking CF, Crucial 128MB MMC
Ambicom WL1100 CF wifi
Custom hand-sewn case (made out of headliner)

gururise

  • Newbie
  • *
  • Posts: 5
    • View Profile
How To Setup Native Onboard Development On 3.5.2
« Reply #10 on: January 11, 2005, 05:30:49 pm »
Any news on this front?  I too would be very interested in native development on the Z!

Absolute Nirvana

  • Newbie
  • *
  • Posts: 32
    • View Profile
How To Setup Native Onboard Development On 3.5.2
« Reply #11 on: February 02, 2005, 07:54:47 pm »
No further progress quite yet, but I have stumbled across something that could help.  I did some research on the last set of errors I was getting (listed below) and I believe the problem lies in the version of glibc being used.  All other posts on the web that I was able to find regarding these errors came to the conclusion that this particular version of glibc, version 2.3.2, is just broken.

Quote
Code: [Select]
libc.so: file format not recognized; treating as linker script

and

libc.so:4: syntax error

So if that is definately the case, then a relatively simple fix should be to use OE to build the latest version of glibc, 2.3.4 i believe, and use that one instead.  Anyone interested in this project have experience with OE?  I am more that happy to give it a go, but it may take me a while to get anywhere.  So, if anyone wants to help out and beat me to the punch, feel free.  Otherwise, that is the current state of gcc and I will update once something happens.
Zaurus SL-C1000
PdaXrom 1.1.0 beta 2
Brando Ultra Clear Screen Protector
512MB Viking CF, Crucial 128MB MMC
Ambicom WL1100 CF wifi
Custom hand-sewn case (made out of headliner)

hvontres

  • Full Member
  • ***
  • Posts: 118
    • View Profile
    • http://
How To Setup Native Onboard Development On 3.5.2
« Reply #12 on: May 12, 2005, 03:55:23 pm »
Quote
I haven't come up with a complete solution, but I have come a step closer.  Creating a symlink got rid of the error about lgcc_s not being found.  I did this like so:

Code: [Select]
ln -sf /lib/libgcc_s.so.1 /mnt/card/usr/lib/libgcc_s.so
Now, (yet again) I get a different error, this time about glibc when I try to compile.  The two errors that I get are:

Code: [Select]
libc.so: file format not recognized; treating as linker script

and

libc.so:4: syntax error

Does anyone have any insight on these glibc errors?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=57888\"][{POST_SNAPBACK}][/a][/div]

I was able to fix that error by editing libc.so and removing the buggy TARGET line.
Apparently the build script goofed up and put garbage there. The offending line starts with "BUG".

In addition, you might need to install the kernel headders. I was able to get them from the oz-3.5.3-adhoc-sdk.tar.bz file available at www.vanile.de. alternatively, if you have a working cross-compiler you could steal them from there. These are the .h files in the /usr/include/asm and /usr/include/linux directories.

I was able to get gpsd to compile with this setup.

Cheers,

Henry von Tresckow
[span style=\'font-size:10pt;line-height:100%\']Henry von Tresckow[/span]
--------------------------------------
SL-5600, OZ 3.5.4.2 (Hentges), Kernel 2.6.17 :)
1gb Kingston SD (ext2), 5Gb Seagate ST1 (3.03 Fw, fat32)
256 MB Kingston SD (ext2),256MB Viking CF,32MB CF (vfat),
homebuilt GPS unit (Based on RFMD RF 8000)

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
How To Setup Native Onboard Development On 3.5.2
« Reply #13 on: May 13, 2005, 05:27:56 am »
Could you give a list of the ipks you installed as a reference for anyone else who's going to try this out (like me  )

Quote
I was able to fix that error by editing libc.so and removing the buggy TARGET line.
Apparently the build script goofed up and put garbage there. The offending line starts with "BUG".

So you just removed the entire line?

Cheers,


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

hvontres

  • Full Member
  • ***
  • Posts: 118
    • View Profile
    • http://
How To Setup Native Onboard Development On 3.5.2
« Reply #14 on: May 13, 2005, 09:30:48 pm »
Quote
Could you give a list of the ipks you installed as a reference for anyone else who's going to try this out (like me  )
Here is what I remember installing:

gcc
gcc-symlinks
binutils
make
libc6-dev (from 3.5.3 feed)

in addition, I needed the Kernel headders. I got those from the oz-3.5.3-adhoc-sdk.tar.bz file.

Quote
Quote
I was able to fix that error by editing libc.so and removing the buggy TARGET line.
Apparently the build script goofed up and put garbage there. The offending line starts with "BUG".

So you just removed the entire line?
Yes. I googled for the offending line and one of the replies metioned that it was not needed in the first place.

Quote
Cheers,


Si
[div align=\"right\"][a href=\"index.php?act=findpost&pid=79572\"][{POST_SNAPBACK}][/a][/div]
[span style=\'font-size:10pt;line-height:100%\']Henry von Tresckow[/span]
--------------------------------------
SL-5600, OZ 3.5.4.2 (Hentges), Kernel 2.6.17 :)
1gb Kingston SD (ext2), 5Gb Seagate ST1 (3.03 Fw, fat32)
256 MB Kingston SD (ext2),256MB Viking CF,32MB CF (vfat),
homebuilt GPS unit (Based on RFMD RF 8000)