This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cross-compile problems


The Alexanders wrote:
Hello, I want to say many thanks to the nice fellow who helped me get the enviroment set up, and i must say crosstool is the best!
I can verify that it is sucessfully built on i686 Windows PC running CYGWIN.

Very good. Which version of glibc did you build? Probably glibc-2.3.3, if you used the default from a recent crosstool.

I have one question though, i build the program successfully but when i run it on a linux machine it complains about some missing headers.

Probably not headers; probably a mismatch in glibc or gcc version. (Copying and pasting the error message into your next post would be helpful.)

My questions is how do i include the files necessary to
create a program which will run on any x86-linux machine.

Firstly, you could try linking your program with -static. It makes for big bloated executables, but can solve some shared library mismatch problems (by avoiding them entirely).

If the error was a glibc version mismatch:
Find out the oldest version of glibc on any of the machines
you want to run on, then build a toolchain for that version
of glibc.
If it was a libgcc_s version mismatch: you might need to
drop back to an earlier version of gcc that matches the
libgcc on your system.

Alternately, you could install the missing shared libraries
on the target systems.
- Dan

--
Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]