OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #zaurus and #alarmz chat on freenode.net | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> How To Setup Native Onboard Development On 3.5.2, using new development section of oz feed
Absolute Nirvana
post Dec 10 2004, 09:00 PM
Post #1





Group: Members
Posts: 32
Joined: 5-December 04
Member No.: 5,779



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
#include<stdio.h>

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


I get:
CODE
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?
Go to the top of the page
 
+Quote Post
Elleomea
post Dec 11 2004, 04:02 AM
Post #2





Group: Members
Posts: 50
Joined: 13-July 04
From: UK
Member No.: 3,992



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.
Go to the top of the page
 
+Quote Post
Mickeyl
post Dec 11 2004, 04:14 AM
Post #3





Group: Members
Posts: 1,495
Joined: 12-November 03
From: Germany
Member No.: 907



stdio.h sounds more like libc6-devel to me.
Go to the top of the page
 
+Quote Post
Elleomea
post Dec 11 2004, 04:24 AM
Post #4





Group: Members
Posts: 50
Joined: 13-July 04
From: UK
Member No.: 3,992



Oh sorry, my mistake; it is libc6-dev that's needed.
Go to the top of the page
 
+Quote Post
Absolute Nirvana
post Dec 14 2004, 02:29 PM
Post #5





Group: Members
Posts: 32
Joined: 5-December 04
Member No.: 5,779



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
/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?
Go to the top of the page
 
+Quote Post
lardman
post Dec 15 2004, 02:52 AM
Post #6





Group: Members
Posts: 4,512
Joined: 25-October 03
From: Bath, UK
Member No.: 464



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)!

This post has been edited by lardman: Dec 15 2004, 02:55 AM
Go to the top of the page
 
+Quote Post
Absolute Nirvana
post Dec 15 2004, 03:02 PM
Post #7





Group: Members
Posts: 32
Joined: 5-December 04
Member No.: 5,779



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.
Go to the top of the page
 
+Quote Post
Absolute Nirvana
post Dec 17 2004, 06:06 PM
Post #8





Group: Members
Posts: 32
Joined: 5-December 04
Member No.: 5,779



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
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
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?
Go to the top of the page
 
+Quote Post
blakeyez
post Dec 18 2004, 06:32 AM
Post #9





Group: Members
Posts: 90
Joined: 5-June 04
Member No.: 3,580



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
Go to the top of the page
 
+Quote Post
Absolute Nirvana
post Jan 7 2005, 10:21 AM
Post #10





Group: Members
Posts: 32
Joined: 5-December 04
Member No.: 5,779



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
Go to the top of the page
 
+Quote Post
gururise
post Jan 11 2005, 02:30 PM
Post #11





Group: Members
Posts: 5
Joined: 5-February 04
Member No.: 1,717



Any news on this front? I too would be very interested in native development on the Z!
Go to the top of the page
 
+Quote Post
Absolute Nirvana
post Feb 2 2005, 04:54 PM
Post #12





Group: Members
Posts: 32
Joined: 5-December 04
Member No.: 5,779



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(Absolute Nirvana @ Dec 18 2004, 02:06 AM)
CODE
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.
Go to the top of the page
 
+Quote Post
hvontres
post May 12 2005, 11:55 AM
Post #13





Group: Members
Posts: 118
Joined: 12-May 05
From: Oceanside,Ca
Member No.: 7,121



QUOTE(Absolute Nirvana @ Dec 17 2004, 07:06 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
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
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?
*


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
Go to the top of the page
 
+Quote Post
lardman
post May 13 2005, 01:27 AM
Post #14





Group: Members
Posts: 4,512
Joined: 25-October 03
From: Bath, UK
Member No.: 464



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 wink.gif )

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
Go to the top of the page
 
+Quote Post
hvontres
post May 13 2005, 05:30 PM
Post #15





Group: Members
Posts: 118
Joined: 12-May 05
From: Oceanside,Ca
Member No.: 7,121



QUOTE(lardman @ May 13 2005, 02:27 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 wink.gif )

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

2 Pages V   1 2 >
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: 18th January 2018 - 08:03 PM