[maemo-developers] Cross compiling under debian
From: Sebastian Mancke asteban at gmx.deDate: Wed Apr 18 10:43:32 EEST 2007
- Previous message: Howto revert a gtk_widget_tap_and_hold_setup
- Next message: Cross compiling under debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
compiling my packages with Java-JNI-code (e.g. classpath) for maemo does
not work out of the box, because scratchbox does not have all the
required build tools (javac, javah, jar). My long-term goal would be to
use openembedded, but this will need much work, I think.
So, at the moment I cross compile from my x86 debian, which seems to
work fine except of the following problems with the debian packaging:
1. dh_strip -a (from x86) does not know, how to handle the arm binaries.
(I have disabled it with: DEB_BUILD_OPTIONS=nostrip)
2. dh_shlibdeps does not work, because the ldd (from the toolchain)
tries to use ld-linux.so.3 from my host instead from the rootstrap.
/home/asteban/maemo/toolchain/scratchbox/compilers/arm-linux-2006q3-27/arm-none-linux-gnueabi/libc/usr/bin/ldd:
line 166: /lib/ld-linux.so.3: No such file or directory
3. dpkg-architecture does not know 'arml'
It would be possible to hack a fix in the script, like the one in
scratchbox:
sub debian_arch_fix
{
local ($os, $cpu) = @_;
...
} elsif ("$os-$cpu" eq "gnueabi-linux-arm") {
return "armel";
...
}
The problem 2. is my biggest one. Any suggestions? Cleaner solutions?
My setup is as follows:
TOOLCHAIN=~/maemo/toolchain/scratchbox
ROOTSTRAP=~/maemo/toolchain/rootstrap
export
PATH=$TOOLCHAIN/compilers/arm-linux-2006q3-27/bin/:$TOOLCHAIN/compilers/arm-linux-2006q3-27/arm-none-linux-gnueabi/libc/usr/bin/:$PATH
export CC=`which arm-none-linux-gnueabi-gcc`
export LD=`which arm-none-linux-gnueabi-ld`
export AR=`which arm-none-linux-gnueabi-ar`
export PKG_CONFIG_PATH=$ROOTSTRAP/usr/lib/pkgconfig/
alias pkg-config='pkg-config --define-variable=prefix=$ROOTSTRAP/usr'
# no a nice soution
export DEB_BUILD_OPTIONS=nostrip
Then I simply run 'fakeroot dpkg-buildpackage -d'
Regards,
Sebastian
--
tarent Gesellschaft für Softwareentwicklung und IT-Beratung mbH
Heilsbachstr. 24, 53123 Bonn | Poststr. 4-5, 10178 Berlin
fon: +49(228) / 52675-0 | fon: +49(30) / 27594853
fax: +49(228) / 52675-25 | fax: +49(30) / 78709617
durchwahl: +49(228) / 52675-17 | mobil: +49(171) / 7673249
Geschäftsführer:
Boris Esser, Elmar Geese, Thomas Müller-Ackermann
HRB AG Bonn 5168
Ust-ID: DE122264941
- Previous message: Howto revert a gtk_widget_tap_and_hold_setup
- Next message: Cross compiling under debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
