OESF Portables Forum
Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Angstrom & OpenZaurus => Topic started by: Absolute Nirvana 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:
#include
int main(void)
{
printf("Hello Zaurus\n");
return 0;
}
I get:
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?
-
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.
-
stdio.h sounds more like libc6-devel to me.
-
Oh sorry, my mistake; it is libc6-dev that's needed.
-
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:
/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?
-
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. 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)!
-
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.
-
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:
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:
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 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
-
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
-
Any news on this front? I too would be very interested in native development on the Z!
-
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.
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.
-
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:
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:
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
-
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 )
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
-
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.
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.
Cheers,
Si
[div align=\"right\"][a href=\"index.php?act=findpost&pid=79572\"][{POST_SNAPBACK}][/a][/div]
-
hvontres,
I did a search in libc.so to try to find the line you were referring but I was unable to find it. Could you maybe print out what the line to be removed is please? The file /lib/libc.so.6 is the one you are talking about right?
-
hvontres,
I did a search in libc.so to try to find the line you were referring but I was unable to find it. Could you maybe print out what the line to be removed is please? The file /lib/libc.so.6 is the one you are talking about right?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=79841\"][{POST_SNAPBACK}][/a][/div]
The file in question is actually /usr/lib/libc.so . I believe it is line 4 that was causing the problem. It actually starts with the word "BUG".
Good luck,
-
Yup, that was the file. I was going crazy looking for it until i realized that i never installed libc6-dev after reflashing. But I got it working, so if anyone needs a how-to or more information, let me know and i'd be happy to share.
-
Yup, that was the file. I was going crazy looking for it until i realized that i never installed libc6-dev after reflashing. But I got it working, so if anyone needs a how-to or more information, let me know and i'd be happy to share.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div] (http://index.php?act=findpost&pid=80446\")
There is allready a guide for that, although it's for familiar (which doesn't matter, since it's built from OE too): [a href=\"http://handhelds.org/moin/moin.cgi/DevelopOnFamiliar]http://handhelds.org/moin/moin.cgi/DevelopOnFamiliar[/url]