This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See crosstool-NG 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] |
On Mon, 2013-02-11 14:41:29 -0500, Mahshid Sedghi <mahshid.sedghy@gmail.com> wrote: > Hello again, > > I actually replaced the inline assembly code with some c++ atomic > operations such as "fetch_and_inc", and now I am able to cross compile > the application for alpha. But when I run the binaries in the guest OS > using an alpha image, I am getting the following errors: > > ./word_count: /lib/libc.so.6.1: version `GLIBC_2.4' not found > (required by ./word_count) > ./word_count: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.10' not > found (required by ./word_count > > Even when I use static linking (using -static-libgcc), the problem > still remains. For some reason, it seems that static linking does not > work, and the application is trying to access those shared objects at > runtime, but it is not found in the alpha disk image. Do you have any > solution for this problem? Basically, the libc (and its headers) used for compilation needs to be the same as on the target system, or older. So you should either use the libc you just built along with the cross-compiler, or use your target's headers to build with. For static linking, -static is the most important part. libgcc is another component handled specifically. To see if a program uses dynamically linked libs, you can use the `ldd' program to see what's dynamically linked by the dynamic linker. (Another way is to use readelf or objdump so peek into the binary.) MfG, JBG -- Jan-Benedict Glaw jbglaw@lug-owl.de +49-172-7608481 Signature of: GDB has a 'break' feature; why doesn't it have 'fix' too? the second :
Attachment:
signature.asc
Description: Digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |