Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors


Development - Building Packages

1. Introduction

This document is a tiny guide about how to build packages using cross compilation. The fact is that you could try to build packages natively on your device, but at practice in most cases they have not enough memory or processor to do it within a reasonable time. That's for what you will want to cross compile packages instead of compile them natively.

2. Requeriments

To build cross compiled packages you'll need to read and complete these steps:

3. Configure the environment for building packages

Check the config file for pkgmk-cross (by default: /devel/crux-arm/pkgutils-cross/pkgmk-cross.conf) an adjust the paths to your toolchain

 # Both vars must point to your clfs path
 export CLFS="/devel/crux-arm/toolchain/clfs"
 export CROSSTOOLS="/devel/crux-arm/toolchain/crosstools"
 export CTARGET="arm-crux-linux-gnueabihf"

4. Checkout git sources for port repositories

 $ mkdir /devel/crux-arm/ports
 $ cd /devel/crux-arm/ports
 $ git clone git://
 $ cd crossrootfs
 $ git branch 3.5 origin/3.5
 $ git checkout 3.5

5. Build ports

For example, to build ncurses:

 $ cd /devel/crux-arm/ports/crossrootfs/ncurses
 $ export PATH=/devel/crux-arm/pkgutils-cross:$PATH
 $ sudo pkgmk-cross -d
 $ sudo pkgadd-cross </path/to/package_dep>
 # Crosscompiling rules to avoid libtool issues
 # with the hardcoded libdir variable
 INSTALL         .*\.la                  NO
 UPGRADE         .*\.la                  NO