pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkgsrc cross compiling



First off, I am a NetBSD user....

That said, I've been playing around with WebOS (Palm) which is a Linux ARM derivative.

I can manually build source by this method:
DEVICEOPTS="-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
export WEBOS_PDK=/opt/PalmPDK
export PATH=$PATH:$WEBOS_PDK/arm-gcc/bin
export CPPFLAGS="-I/opt/PalmPDK/include"
export LDFLAGS="-L/opt/PalmPDK/device/lib -Wl,--allow-shlib-undefined"
export CXXFLAGS=$DEVICEOPTS

./configure --host=arm-none-linux-gnueabi --prefix=`pwd`/opt/WebOS_arm --without-icu --without-clucene --enable-static
make
make install

*works!*

I've always used pkgsrc to compile apps, and thought it would be fun to make this process more automated.

Information on architecture cross compiling is quite sparse. I found one chap who did it on FreeBSD http://lists.freebsd.org/pipermail/freebsd-embedded/2008-May/000456.html and I tried adapting his methodology, but have had little success.
I added to my mk.conf

USE_CROSS_COMPILE=      yes

.if defined(USE_CROSS_COMPILE) && !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
USE_DESTDIR=            yes
DEPENDS_TARGET=         package-install

CROSS_DESTDIR=               /opt/WebOS_arm

TARGET_ARCH=            arm
MACHINE_PLATFORM=       WebOS-arm
MACHINE_GNU_PLATFORM=   arm-none-linux-gnueabi


PKGSRC_COMPILER=       gcc
USE_PKGSRC_GCC=         no
USE_NATIVE_GCC=         yes

CC="/opt/PalmPDK/arm-gcc/bin/arm-none-linux-gnueabi-gcc"
CPP="/opt/PalmPDK/arm-gcc/bin/arm-none-linux-gnueabi-g++"

CPPFLAGS=-I/opt/PalmPDK/include
CFLAGS=$CPPFLAGS

LDFLAGS=-L/opt/PalmPDK/device/lib -Wl,--allow-shlib-undefined
.endif                  # end cross-compilation settings


After implementing his steps I get:

ERROR: This package has set PKG_FAIL_REASON:
ERROR: The cross-compiling root*/opt/WebOS_arm* is incomplete
*** Error code 1

What am I missing? What do I need to do to the destination directory to make it pleasing to pkgsrc?

- jam



Home | Main Index | Thread Index | Old Index