Page 1 of 1
Using gcc cross compiler problem (noob question)
Posted: Sun Mar 06, 2011 8:04 am
by lasarus
Hi, this is my first post on this forum and I like this site very very much but I have a problem using my newly built cross compiler and I need your help.
I'm using Cyqwin and I think I've followed the cross compiler instructions right but when I try to use i586-elf-gcc to compile my kernel I get this error message:
/usr/local/cross/bin/i586-elf-gcc.exe: error while loading shared libraries: ?:
cannot open shared object file: No such file or directory
If somebody know what I'm doing wrong please tell me because I really want to make an OS.
btw I'm a noob at Linux/Cyqwin so please bare with me.
Re: Using gcc cross compiler problem (noob question)
Posted: Sun Mar 06, 2011 8:26 am
by Dario
Looks like gcc is trying to link with some libraries that are missing (probably glibc, although not sure why???), but you shouldn't link standard library to your kernel anyway. Make sure you pass right flags to your compiler.
And if Linux is not such a big deal for you, drop Cygwin crap.
Re: Using gcc cross compiler problem (noob question)
Posted: Sun Mar 06, 2011 2:01 pm
by Combuster
What's your path set to? Did you change it and forgot the keep the original path intact?
Ever tried using dependency walker to see what (missing) libraries it needs or expects?
Re: Using gcc cross compiler problem (noob question)
Posted: Mon Mar 07, 2011 9:12 am
by lasarus
Thank you for your replies!
Just to not embarrass myself what should the path be set to?
Re: Using gcc cross compiler problem (noob question)
Posted: Mon Mar 07, 2011 12:19 pm
by AJ
Hi,
To test what your path is set to, check the PATH variable (echo $PATH). The
GCC Cross-Compiler article in the wiki states that you should use:
to set your path variable correctly (assuming that you have correctly set PREFIX.
By uninstalling and reinstalling cygwin, you have done one of 2 things:
1. Removed your cross compiler...
2. Removed the cross compiler location from your PATH variable.
In either case, I suggest that it would help the original problem by following the steps cross compiler article again (from scratch). You may find that you missed something that will be magically resolved the second time (e.g. have you missed the --without-headers flag?).
HTH
Cheers,
Adam
[edit: I took ages to get my cross compiler working with Cygwin initially, but got there in the end - be persistant and it will work.]
Re: Using gcc cross compiler problem (noob question)
Posted: Mon Mar 07, 2011 1:27 pm
by lasarus
Thank you for your response but I think I know what I did wrong(I'm such a noob).
The first time I removed everything from the PATH variable and the second time I took a 10 year old version of gcc.
But I'm yet to test if I have done everything correctly this time so I may come back for more help.