Boost on the Nintendo DS

About
The following guide will help you to compile Boost for the Nintendo DS using devkitARM on linux. It assumes you have $DEVKITARM and $DEVKITPRO environment variables already set-up properly, and bjam, boost's special version of jam (similar to make), already installed. Thanks to davr for working with me to get boost compiling.

Some Environment Variables
First, you must set up some environment variables.

export GCC_ROOT_DIRECTORY=$DEVKITARM
export GCC=arm-eabi-gcc
export GXX=arm-eabi-g++
export PATH=$PATH:$DEVKITARM/arm-eabi/bin:$DEVKITARM/bin

Some Symlinks
Next, we have to set up some symlinks. I set up only objcopy and it seemed to work fine. Please contact me if you discover otherwise.

ln -s $DEVKITARM/bin/arm-eabi-objcopy $DEVKITARM/arm-eabi/bin/

Preparing Boost for Compilation
Next, we have to make sure that $OUTDIR exists and is writable. We can do that by creating one. In the root of the boost directory, do the following.

mkdir $DEVKITPRO/boost
export $OUTFILE=$DEVKITPRO/boost
bjam -sTOOLS=gcc --prefix=$OUTDIR install

In the End
Your compile should take a little while. Boost is quite big. Note that as the DS doesn't have an operating system to provide threads, anything that depends on threading will fail. In the end, you should get a message that looks similar to the following. Let me know if it turns out different for you.

...failed updating 822 targets...
...skipped 232 targets...
...updated 4283 targets...

Download

Comments

To compile for Boost 1.35.0

To compile for Boost 1.35.0:

edit your user-config.jam file, add this line:
using gcc : 4.1.2 : arm-eabi-g++ ;

you won't need to do these anymore:

export GCC_ROOT_DIRECTORY=$DEVKITARM
export GCC=arm-eabi-gcc
export GXX=arm-eabi-g++

but take note that you still need to do this:
export PATH=$PATH:$DEVKITARM/arm-eabi/bin:$DEVKITARM/bin

g++: CreateProcess: No such file or directory

if your build output shows something like this:

...failed gcc.compile.c++ c:\devkitPRO\devkitARM\boost\boost\bin.v2\libs\da
te_time\build\gcc-4.1.2\release\link-static\runtime-link-static\greg_month.o...
gcc.compile.c++ c:\devkitPRO\devkitARM\boost\boost\bin.v2\libs\date_time\bu
ild\gcc-4.1.2\release\link-static\runtime-link-static\greg_weekday.o
g++: CreateProcess: No such file or directory

chances are its because bjam can't find your arm-eabi-g++

I don't know how to solve this yet though. at least now you know what the problem is, instead of the cryptic "CreateProcess: No such file or directory" message that apparently g++ throws

bjam syntax

the newest bjam (3.1.16) has a different syntax:
bjam --toolset=gcc --stagedir=$DEVKITARM/boost --build-dir=$DEVKITARM/boost

in windows/mingw

in windows, using mingw, one should use this instead:

ln -s $DEVKITARM/bin/arm-eabi-objcopy.exe $DEVKITARM/arm-eabi/bin/objcopy.exe

(add '.exe')

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Use the special tag [adsense:format:group:channel] or [adsense:block:location] to display Google AdSense ads.

More information about formatting options