holger krekel wrote:
i am currently experimenting with cross-compilation of large
C-files. For this, i need to use the cross-compiler from the
hosting end because compiling in the virtual environment takes
around 10 times as long (but succeeds). If i follow the 1.0
tutorial and use the cs2005q3.2-glibc2.5 toolchain this happens:
The virtual environment is actually a chroot with a twist. LD_PRELOAD,
some wrapper scripts, etc. but the performance penalty shouldn't be that
great.
Of course, there's the running of foreign binaries during build time,
but that depends highly on the software you're building and the
combination of devkits you're using.
[EMAIL PROTECTED]:~$
/scratchbox/compilers/cs2005q3.2-glibc2.5-arm/bin/arm-linux-gcc
gcctest.c
/scratchbox/compilers/cs2005q3.2-glibc2.5-arm/bin/../lib/gcc/arm-none-linux-gnueabi/3.4.4/../../../../arm-none-linux-gnueabi/bin/ld:
skipping incompatible /lib/libc.so.6 when searching for
/lib/libc.so.6
/scratchbox/compilers/cs2005q3.2-glibc2.5-arm/bin/../lib/gcc/arm-none-linux-gnueabi/3.4.4/../../../../arm-none-linux-gnueabi/bin/ld:
cannot find /lib/libc.so.6 collect2: ld returned 1 exit status
This is (according to the tutorial) supposed to work, i think.
If i use the cs2007 toolchain
(http://scratchbox.org/download/files/sbox-releases/apophis/tarball/scratchbox-toolchain-cs2007q3-glibc2.5-arm7-1.0.8-6-i386.tar.gz)
then cross-compilation suceeds.
It seems that cs2005q3.2 linker has a problem finding the toolchain
supplied libc. It tries to search the libraries from the standard path
which outside scratchbox contains the host libraries. Naturally, given
the difference between architectures, this is doomed to fail.
It's a long time since i dealt with linking/C-compilation
issues in detail ... so does anyone know if it's supposed to be safe to use
http://repository.maemo.org/stable/diablo/maemo-scratchbox-install_4.1.1.sh
and then install scratchbox.org's cs2007 toolchain and use that for cross-compilation?
You can apt-get install all relevant packages from scratchbox.org
repositories, given you have a debian based system, or just download the
tarballs from scratchbox.org, extract them and follow the README on
installing.
No need to use the maemo script.
P.S.: what does "cs2005" and "cs2007" actually signify?
It means the toolchain packaged for scratchbox is a codesourcery
toolchain. For more information, see [1]. If you need just a cross
compiler without scratchbox, download the vanilla one from their site.
Regards,
Jussi
[1] http://www.codesourcery.com/
_______________________________________________
Scratchbox-users mailing list
Scratchbox-users@lists.scratchbox.org
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users