OSDev.org
https://forum.osdev.org/

GCC Cross-Compiler issue
https://forum.osdev.org/viewtopic.php?f=1&t=21590
Page 1 of 1

Author:  tobbebia [ Fri Feb 19, 2010 2:08 pm ]
Post subject:  GCC Cross-Compiler issue

Hi!
I am very new to using GNU tools and doing os deving, so i apologize if the answer to this question is obvious! I have been following some simple os dev tutorials using DJGPP on Windows Vista, but earlier today i decided to install Ubuntu 9.10 (dual boot), and i wanted to make a working GCC Cross-Compiler for i386 target that i can use for os deving.

I followed the tutorial at this link to compile a GCC Cross-compiler:
http://wiki.osdev.org/GCC_Cross-Compiler

... and the AS asm from binutils seems to work, but GCC doesnt.

When i try to compile anything with the gcc cross-compiler i get this error message:

Code:
/usr/cross/libexec/gcc/i386-elf/4.4.3/cc1: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory


Btw I did not forget this before compiling gcc:
(if it even has to do with this)

Quote:
If you plan to use GCC 4.3.0 or a later version, you will also have to install the following:
GMP (this package is also readily available for MSYS)
MPFR


If I can't get this to work i will have to go back and do os dev on Windows. But linux seems much more intresting to me! :)

So if anyone knows how to fix this it would be very nice!

tobbebia

Author:  fronty [ Fri Feb 19, 2010 2:25 pm ]
Post subject:  Re: GCC Cross-Compiler issue

Is that shared library in a directory where your loader is told to look at?

Author:  tobbebia [ Fri Feb 19, 2010 2:43 pm ]
Post subject:  Re: GCC Cross-Compiler issue

fronty wrote:
Is that shared library in a directory where your loader is told to look at?

How can I see where the loader is looking? Thx for your reply.

Author:  fronty [ Fri Feb 19, 2010 3:01 pm ]
Post subject:  Re: GCC Cross-Compiler issue

/etc/ld.so.conf (or ld-elf), LD_LIBRARY_PATH, man ldconfig. If the directory containing that library isn't in anywhere loader thinks it should be, try setting LD_LIBRARY_PATH and running it then. If it works, change your configuration.

Author:  tobbebia [ Fri Feb 19, 2010 3:22 pm ]
Post subject:  Re: GCC Cross-Compiler issue

fronty wrote:
/etc/ld.so.conf (or ld-elf), LD_LIBRARY_PATH, man ldconfig. If the directory containing that library isn't in anywhere loader thinks it should be, try setting LD_LIBRARY_PATH and running it then. If it works, change your configuration.


Thanks!
Your solution worked.

tobbebia

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/