[maemo-developers] Scratchbox cs2007q3-glibc2.5-arm7 toolchain support?

From: Ben Martin monkeyiq at users.sourceforge.net
Date: Wed May 7 10:08:12 EEST 2008
Oops
s/arm7/arm6/g

On Wed, 2008-05-07 at 16:57 +1000, Ben Martin wrote:
> Hi,
>   After my tinkering with trying to get a more recent ld I realized that
> I needed to install a scratchbox package or patch an existing one with
> ld features to get what I wanted. Having an updated binutils inside
> scratchbox was all fine and dandy for compiling using qemu to run the
> ARM ld binary but this doesn't scale to large projects (segvs, pain
> etc).
> 
>   I notice that there is
> scratchbox-toolchain-cs2007q3-glibc2.5-arm7_1.0.7-3_i386.deb
> released here:
> http://scratchbox.org/download/files/sbox-releases/stable/deb/
> 
> Installing that and making a target in scratchbox allows me to compile
> the hello-world app (modified to use C++ and iostreams). This all works
> as expected and runs fine inside scratchbox. The reason I changed the
> example to use C++ is to use the libstdc++.so.6 which the project I am
> planning on using will want as well.
> 
> Trying to run this on an n810 gets
> foo at n810 hello-world $ ./hello 
> ./hello: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
> (required by ./hello)
> 
> foo at n810 hello-world $ ldd ./hello
> ./hello: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
> (required by ./hello)
>         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x41d70000)
>         libm.so.6 => /lib/libm.so.6 (0x41220000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x41e40000)
>         libc.so.6 => /lib/libc.so.6 (0x41028000)
>         /lib/ld-linux.so.3 (0x41000000)
> 
> FWIW the normal C only hello-world compiled with the new toolchain runs
> fine on the n810. It doesn't require any newer libraries it would seem.
> 
> What is the recommended solution for folks wanting to use the more
> recent g++ and toolchain? The new linking method is supported out of the
> box for the more recent ld in this toolchain ;)
> 
> sbox > g++ --version
> sbox-arm-none-linux-gnueabi-g++ (GCC) 4.2.1
> > ld --help|grep sty 
>   --hash-style=STYLE          Set hash style to sysv, gnu or both
> 
> 
> I could imagine doing similar things to the things that were mentioned
> on a recent thread about glib. The quick and dirty version being having
> a personal lib directory and forcing its use with LD_LIBRARY_PATH in a
> little wrapper script for any tools I compile like:
> $ gcc4-launch foo
> Or forcing the scratchbox to link to 
> libstdc++.so.6.0.9 instead of
> libstdc++.so.6
> and just shoving the libstdc++.so.6.0.9 into /usr/lib and being done
> with it.
> 
> I thought I'd throw it out there in case someone is using this newer
> toolchain and has a solution.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.maemo.org/pipermail/maemo-developers/attachments/20080507/3c13e03b/attachment.pgp 
More information about the maemo-developers mailing list