Pandora Crosscompiler Toolchain Based On Openpandora.org Ipks


ivanovic

Active Member
Joined
Aug 4, 2006
Messages
784
New version available!
A new version of the stuff mentioned below (including changed/updated instructions) is available. Please go to this post for the latest version of this crosscompiler toolchain installer! In case that your browser is broken, the correct post has number 11!




Hi everybody!
Todays post is about yet another try on getting a nicely working toolchain setup that allows crosscompilation of pandora binaries on x86 based Linux systems. Here a short summary what this is meant to be (and later on what it is *not* meant to be!):
  • Rather easy to setup toolchain that allows compiling binaries for the pandora on a linux host.
  • Should support x86 as well as amd64 with multilib support.
  • Installable inside a users $HOME without root priviledges.
  • Completely based upon the packages that are also used on the pandora. It should use exactly the versions as shipped with the pandora and just those.
  • Includes all libs and headers that are also found on the pandora (even some useless progs) but only a small number of binaries that can't be run on the host architecture.
  • Should be rather easy to keep in sync with upsteam (aka openpandora.org) version changes.
What it is not meant to be:
  • An sdk that is able to build the official firmware image. For those you still need an OpenEmbedded based setup so that you can make use of the recipes directly.
  • It likely won't work on "pure" 64bit systems because the toolchain, things are based on (codesourcery), is plain x86.
  • It will not automatically get all the dependencies that you need to make things work for your distribution. You will have to make your system able to compile things (for itself) before you can start with this toolchain.
  • Some things like eg the gettext tools (for generation of translations used in the programs you compile with your toolchain) will have to be provided by your system. Stuff like msgfmt is *not* included!
  • This sdk is not meant to be installed systemwide with root priviledges. In my early tests I could have destroyed my whole system if I were using root privs. Those problems have likely be fixed, but better save than sorry, so: don't install with root privs (either logged in as root or using su -c or sudo)!!!
This toolchain is built upon the efforts and scripts provided by Cpasjuste as well as Hitnrun. Some of the scripts are (or were once) 1:1 copies of their scripts. What I mainly changed is removing stuff like sudo. The scripts should be 100% distribution independent.

The following part is outdated, please use this post further on for the correct information!!!
Pre start dependencies:
  • wget
  • bash
  • sed
  • md5sum
  • working compile env for host system
In case of a gentoo system all dependencies should already be met, on an Ubuntu system this command should install the required compile env, though I have no way to test this and can't be sure:
Code:
sudo apt-get install libtool git-core build-essential autoconf automake -y
Some notes regarding the scripts:
  • Make sure to change the variable PNDSDK_DIR in each script to match your system. It has to be exactly the same entry in each of the scripts! Make sure that your current user has permissions to write into this folder.
  • After installation the SDK itself requires about 2.0GB on your harddrive. During installation about 640MB are downloaded into a tmp/ folder created where you call the scripts from.
  • After installation is done and everything works you can remove the following files/folders:
    • all installation scripts (you should consider keeping the "last" script used for fixing the libs since you'll need it when running some updates!)
    • the folder "opkg-0.1.8/" (files created during building opkg for your host platform)
    • the folder "pkg-config-0.25/" (files created during building a pandora specific pkg-config for your host platform)
    • the folder "tmp/" (all downloaded files should have been stored here)
    • the file "packages.txt" (the list of packages that we have opkg install, it will get more packages since it also fetches the dependencies, but those are the
  • For the moment the files are hosted at a pastebin site. After downloading them there (clicking on "download" will get the job done) you should run "dos2unix" on the files to make sure that they work nicely for you.

Now to the most important part, the sdk itself:
Please run the scripts in the order as I list them here. The "topics" are directly the links to the respective scripts.
  1. toolchain.sh
    This will download and install the codesourcery toolchain. The current scripts rely on the version arm-2009q3-67 since I know it does work and a short test with arm-2010.09-50 resulted in me swearing because it was not working "right from the start". So better stay with this outdated version since it is working...
  2. install_opkg.sh
    Get and install opkg for your host system. This is the package manager that we later on rely on to get the packages from openpandora.org. This script does also provide default config files that rely on the official package feeds.
  3. install_libs.sh
    Get a list of all the lovely dev packages that are available in the openpandora.org feeds and install all those packages (as well as the -static packages) including their dependencies. This is the major step and will take "a while". It will also install a whole lot of useless things for the sdk itself (many ARM binaries), but this is some collateral damage that I know no way around for the moment. This this step you will see many error messages about missing dependencies. Those are irrelevant and you can just ignore them. The last line should read "Removing package libstdc++-dev from root...". If that is the case, everything is (probably) fine!
  4. fix_libs.sh
    Install a pkg-config for the crosscompiler we just setup. Also fix all the paths inside the .pc files as well as "many" libraries. This step is *vital* for a working sdk and has to be repeated whenever new packages are installed/updated using opkg.

After step '4' is completed you should have a working SDK installed. So far I tested this SDK on a single box (Gentoo amd64 "unstable"). I was able to compile Wesnoth with it (using cmake) as well as snes9x4p (building via a plain Makefile). Both binaries are working on the pandora, so it looks like a good basis to have others test, too.

The scripts are known to not be perfect and like I mentioned above could even damage your normal system if run as root (should not happen, but who knows...). I plan to further simplify things and shrink the number of scripts used as well as adding some messages when things are not installed on the host system that are required.

Please test this sdk and provide feedback what is working for you and what not. In case you are interested in building Wesnoth, this is the PandoraToolchain.cmake file used, the cmake invocation is the last line in the file.

EDIT1: Changed the file for step '3' to remove all broken symlinks inside the sdk and also remove all binary files for ARM architecture that can't be run on the host arch anyway.
EDIT2: New version available: openpandora_toolchain.sh 2011-01-30
EDIT3:
The first post is outdated, please use this post further on for the correct information!!! Yes, the correct post ist post 11 in this thread.
 
Last edited by a moderator:
I was wondering whatever happened to this; kudos :)

I think we're all behind this as an official sdk option, so everyone give it a workover! (for my part I still just use libs right off the pandora though .. Lazy me :)

Nominate for pinnage! This and a guide for what packages to install for onboard compile and good to go :)

Jeffphone
 
As you requested me, here are some environnement you should have set somewhere to ease the building process.

This is my current /usr/local/angstrom/arm/environment-setup file :
Code:
#!/bin/sh

# Where you store your pandora's projects
export PROJECTS_BASEDIR=~/Projects/Pandora
# Local storage for PNDs
export PND_TARGETDIR=$PROJECTS_BASEDIR/PNDs
# Build target and pnd moint point
export PND_BASEDIR=/mnt/utmp

export CMAKETOOLCHAINFILE="~/Projects/Pandora/setup/toolchain.cmake"

export SDK_PATH=/usr/local/angstrom/arm TARGET_SYS=arm-angstrom-linux-gnueabi
export CONFIG_SITE=$SDK_PATH/site-config
export PATH=$SDK_PATH/bin:$PATH:$SDK_PATH/$TARGET_SYS/usr/bin
export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$TARGET_SYS
export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$TARGET_SYS
export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS/usr/lib/pkgconfig
export CPATH="$SDK_PATH/$TARGET_SYS/usr/include:$CPATH" CFLAGS="-DPANDORA -O3 -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -ffast-math -fsingle-precision-constant" CXXFLAGS="-I$SDK_PATH/$TARGET_SYS/usr/include" LDFLAGS="-L$SDK_PATH/$TARGET_SYS/usr/lib -Wl,-rpath,$SDK_PATH/$TARGET_SYS/usr/lib"
export CPPFLAGS="$CFLAGS"

export CROSSTOOL="$SDK_PATH/bin/$TARGET_SYS"
export CXX=$CROSSTOOL-g++ CC=$CROSSTOOL-gcc AR=$CROSSTOOL-ar AS=$CROSSTOOL-as RANLIB=$CROSSTOOL-ranlib STRIP=$CROSSTOOL-strip
export HOST_CC=gcc HOST_CXX=g++

alias opkg="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH//etc/opkg-sdk.conf -o $SDK_PATH"
alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$TARGET_SYS/etc/opkg.conf -o $SDK_PATH/$TARGET_SYS"

unsetSDK() {
        unset SDK_PATH CONFIG_SITE LIBTOOL_SYSROOT_PATH PKG_CONFIG_PATH CPATH CFLAGS CXXFLAGS LDFLAGS CROSSTOOL CXX CC AR AS RANLIB HOST_CC HOST_CXX PRJ
}

setprj() {
        export PRJ=$1;
        export LDFLAGS="$LDFLAGS -L/mnt/utmp/$PRJ/lib" CXXFLAGS="$CXXFLAGS -I/mnt/utmp/$PRJ/include" PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/mnt/utmp/$PRJ/lib/pkgconfig" CPATH="/mnt/utmp/$PRJ/include:$SDK_PATH/$TARGET_SYS/usr/include"
        if [ -d $PROJECTS_BASEDIR/$PRJ ];then
                cd $PROJECTS_BASEDIR/$PRJ
        fi
}

# Help to configure stuff
#-------------------------

pndconfigure() {
        ./configure --host=$TARGET_SYS --with-gnu-ld --prefix=$PND_BASEDIR/$PRJ $@
}

pndcmake() {
        cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKETOOLCHAINFILE -DCMAKE_PREFIX=$PND_BASEDIR/$PRJ -DCMAKE_INSTALL_PREFIX=$PND_BASEDIR/$PRJ $@
}

# To build the pnd file
#-----------------------

pndmakeauto(){
        NAME=${1:-$PRJ}
        pnd_make -c -p $PND_TARGETDIR/$NAME.pnd -d $PND_BASEDIR/$NAME -i $PND_BASEDIR/$NAME/icon.png -x $PND_BASEDIR/$NAME/PXML.xml
}

_setprj ()
{
        local cur
        _get_comp_words_by_ref cur
        COMPREPLY=()
        if ls $PROJECTS_BASEDIR/${cur}* >/dev/null 2>&1;then
                COMPREPLY=( $(ls -1d $PROJECTS_BASEDIR/${cur}*|sed "s#$PROJECTS_BASEDIR/##") )
        fi
        return 0
} 
complete -F _setprj setprj

And I do have this happended in my bashrc file :
Code:
export PROJECTS_BASEDIR=~/Projects/Pandora

setprj() {
        . /usr/local/angstrom/arm/environment-setup;
        setprj $@
}

_setprj ()
{
        local cur
        _get_comp_words_by_ref cur
        COMPREPLY=()
        if ls $PROJECTS_BASEDIR/${cur}* >/dev/null 2>&1;then
                COMPREPLY=( $(ls -1d $PROJECTS_BASEDIR/${cur}*|sed "s#$PROJECTS_BASEDIR/##") )
        fi
        return 0
} 
complete -F _setprj setprj

The setprj function does the first file, and start the newer definition of itself.
So if you dont use that function, you environnement allow you to build for your host. Once started, you'll have all set to cross-compile, with even a few conveniant stuff to ease your process.
unsetSDK should revert setprj effect, But I dont use it : I just start a new terminal :D

Sure, you'll need to fix a few path, here and there ;)

EDIT : you might want to include my genpxml script too (as it generate PXML file out of the desktop files installed by make install), if so just bug me, you know how to find me ;)
 
My current TODO list for this SDK (not sure in which order I'll tackle things and when/if I'll get to them!):
  • Add default cmake toolchain file to generation. It is rather easy to create files like those, so why not just do it with the scripts... done
  • Gather scripts into a smaller number of scripts, possibly going as far as having everything in one single script that can be run with params once things are completed. done (no params yet, but everything in one file)
  • Provide more useful output about what the scripts are currently doing or at least trying to do. done
  • Adding useful "additional mini scripts" that make compilation eg via ./configure easier (sebt3 mentioned some env vars he sets automatically on his system for pandora related work, not sure what makes most sense which way yet).
  • Add checking for all required dependencies in those scripts to make sure that everything is available before things are actually started. done
  • Fix any issues with the SDK that users bring up in this thread or that I see mentioned in IRC. Okay, at least try to fix those issues, won't promise anything!
In general patches and suggestions how to improve the sdk installer are *very* welcome!

EDIT1: Marked some TODO entries 'done'.
 
Last edited by a moderator:
Just fyi I tried this on an ubuntu 10.10 64bit box and all sorts of errors. When I get back in from walking the dog I'll see if it's me being stupid or me being really stupid.
 
Bryce Leo said:
I'll see if it's me being stupid or me being really stupid.
Neither side as Ivanovic havent said one thing : this toolchain is 32bits...
You'll need to have a kernel that have the 32bits compatibility feature on, and the requiered 32bits libraries installed...
 
Last edited by a moderator:
sebt3 said:
Neither side as Ivanovic havent said one thing : this toolchain is 32bits...
You'll need to have a kernel that have the 32bits compatibility feature on, and the requiered 32bits libraries installed...
I have both of those already set up afaik.
 
Last edited by a moderator:
Heh, it was me being really stupid. I didn't watch carefully at all when I ran install_opkg.sh. I forgot to open a new terminal after I ran the installs for the libs so it never picked up curl or gpgme and in my rush to try and get "the big part" started before I took the dog out. If I run into some more issues I'll let you guys know. :)
 
Noob here. Well, from a Linux perspective anyway. My background is with Visual Studio on the Windows platform. I was pretty excited to play with Code::Blocks. But cross compiling is one thing I haven't yet had much luck with.

I'm excited to try this method. So far I've tried a few different ones that have been talked about, but with not much success. What has worked best for me is http://pandorawiki.org/Setting_up_a_cross-compiler. But even with this method, I wasn't able to download an arbitrary package, ./configure it then make it. I was able to compile single-file projects consisting of one .c file (e.g. DisplayImage example worked well).

I see there is no use of any chroot in this method. That somewhat removes a level of complexity. Or is that still being done, just not mentioned because it so ubiquitous?

Any words of encouragement, guidance and wisdom?
 
Okay, updated the script and made it all into a "one script to do it all" version. General notes:

Pre start dependencies:
  • wget
  • bash
  • sed
  • md5sum
  • working compile env for host system
In case of a gentoo system all dependencies should already be met, on an Ubuntu system this command should install the required compile env, though I have no way to test this and can't be sure:
Code:
sudo apt-get install libcurl4-openssl-dev libgpgme11-dev libtool build-essential
Some notes regarding the scripts:
  • Make sure to change the variable PNDSDK_DIR at the top of the script to match your system. Make sure that your current user has permissions to write into this folder.
  • After installation the SDK itself requires about 2.1GB on your harddrive. During installation about 700MB are downloaded into a tmp/ folder created where you call the scripts from. Those files can be removed after the script completed.
  • After installation is done and everything works you can remove the following files/folders:
    • the installation script itself
    • the folder "tmp/" (all downloaded files should have been stored here, as well as some folders used for temporary compilation)
  • For the moment the file is hosted at a pastebin site. After downloading it there (clicking on "download" will get the job done) you should run "dos2unix" on the file to make sure that they work nicely for you.

Now to the most important part, the sdk itself:
  1. Download the script
    Download the script openpandora_toolchain.sh. The installer script is still a single file but now available directly from the openpandora.org git repositories. To check the history of the file, please head over to git.openpandora.org/pandora-misc.git/sdk_installer.
  2. Fix line endings using "dos2unix"
    After downloading the script in the step before you should run "dos2unix" on the file to make sure that they work nicely for you.
    Code:
    dos2unix openpandora_toolchain.sh
  3. Make the script executable
    Code:
    chmod +x openpandora_toolchain.sh
  4. Check that everything is correctly setup
    Have a look into the script using a texteditor. If you want your toolchain installed somewhere else (aka "not in $HOME/pandora-dev") you have to change the variable PNDSDK_DIR in line 100. You should also read through the comments at the top since they might include some useful information.
  5. Execute the script
    Once everything else is done (and you got the dependencies installed!) execute the script:
    Code:
    ./openpandora_toolchain.sh
  6. In case of errors
    If you get an error message, you should try to fix those problems. They are likely related to you missing some dependencies for compiling opkg or pkg-config. Once you got the deps, rerun the step above.
  7. (optional) Remove temporary folder
    Now that the script has completed running you can remove the temporary folder. Have a look at the last output from the script, it should name the folder.
Once the script is done, enjoy the crosscompiler toolchain. This new version does directly ship helper files to use with cmake, qmake as well as configure. Using autotools based configure is still problematic though since there are no fixed settings to be used and every script can behave differently, so the wrapper might not work for you... If you encounter any problems, please tell me. If you have suggested improvements or patches for this script I do highly welcome them!

That should be it for the moment. I hope this toolchain works for you as well as it seems to for me.

EDIT1:
Updated toolchain installer file to install the latest codesourcery toolchain (Sourcery G++ Lite 2010.09-50). Had to fix some smaller parts for this to work (had some references to the "old" one still hardcoded in the script, those were fixed). Beside this now the compile folders for opkg and pkg-config are automatically removed before trying to extract those source tarballs, otherwise changes in the path setup would not register.


EDIT2:
Fixed "moving away" of libstdc++.so.6.0.14. Due to a change in the respective version shipped by the "new" sdk it was not moved correctly. The new way to move stuff around should not depend on explicit filenames anymore. Please fetch the new script and retry if you had problems executing the progs.


EDIT3:
Just another version of the scripts with many changes!
  • Create missing file usr/bin/libpng-config.
  • Create missing file usr/lib/pkgconfig/lua5.1.pc.
  • Simplify the section used during fixing libs. Commented out some parts that should not be required there since they were already covered by the stuff done before.
  • Supply more "useful files" and place them in a dir of their own (PNDSDK_DIR/sdk_utils/). List of files:
    • PandoraToolchain.cmake: useful for crosscompiling with cmake.
    • pandora_configure.sh: wrapper around ./configure that allows calling configure via this script and directly setting most vars that should be required to run it.
    • opkg-pandora.sh: script for calling opkg in a way that the stuff setup is used correctly.
    • fix-libs.sh: script to fix libs. Eg required after running some opkg update.
    • pnd_make.sh: script for packaging things into a .pnd.
    • genpxml.sh: script for generating some basic PXML.xml file.
Another tiny change after the last update:
  • Changed optimization level provided by extra files from -O3 to -Os. Reason: -O3 can be unsafe and -Os might even be faster in some situations on architectures that only got a small cache (like eg ARM).


EDIT4:
JayFoxRox requested some changes/additions in the script, here they are:
  • Added a symlink from all files in bin/ folders being named $TARGET_SYS-something (usually arm-none-linux-gnueabi-something) to pandora-something. This eg make accessing gcc by far easier. Instead of remembering arm-none-linux-gnueabi-gcc as binary name, you can just use pandora-gcc.
  • Added the environment variable $PNDSDK to ~/.bashrc. If you are using bash as login shell you will now have the variable set allowing you to easily access stuff from the toolchain. This way you can eg call the gcc of the toolchain by simply calling $PNDSDK/bin/pandora-gcc


EDIT5:
I tried getting qmake to work with the crosscompiler toolchain which resulting in me implementing some changes:
  • Added basic scripts for qmake support with the SDK. The files will end in $PNDSDK/../sdk_utils/qmake_linux-pandora-g++. With those you should be able to easily compile using qmake. Here is an example call that I used to compile smplayer:
    Code:
    make QMAKE="qmake -spec $PNDSDK/../sdk_utils/qmake_linux-pandora-g++"
  • Since qmake/smplayer required the Qt libs to be ending in ".so" instead of ".so.4" or even longer versions I added symlinks from all libQt*.so.4 files to libQt*.so. This way it is at least possible to compile SMPlayer.


EDIT6:
Thanks to yannick for pointing out a really strange issue with the crosscompiler toolchain installer:
The Qt libs were not installed automatically. Somehow it does only install all the required libs when rerunning the whole opkg update && opkg install part. In theory for just fixing the qt stuff a simple "opkg install libqtcore4" would be enough, but I prefer to be sure that no other things were missed, so rerunning the whole section that installs packages. This does of course significantly increase the installer runtime (about +5min on my Desktop system with decent harddrive and CPU), but since the packages are only downloaded once this should not be too much of a problem.


EDIT7:
It was again yannick who pointed out that the versions of genpxml.sh and pnd_make.sh shipped/created by the scripts were outdated. Updated those files in this latest revision.


EDIT8:
Finally a new version of the openpandora_toolchain.sh with some tiny updates:
  • This version is now based on the latest codesourcery toolchain which was released some weeks ago ("Sourcery G++ Lite 2011.03-41 for ARM GNU/Linux").
  • Updated pkg-config from 0.25 to 0.26.
  • Updated to latest version of pnd_make.sh from the openpandora git. This should fix any problems you had with the script so far.
  • Updated to latest version of genpxml.sh from the openpandora git.
  • Added PXML_schema.xsd from the openpandora git.
  • Don't install "mesa" packages, since they would offer headers for OpenGL which is not available on the pandora.
  • Created some symlinks in $PNDSDK/usr/include as recommended by sebt3. This should improve the ability of autotools/cmake/... to detect header files that were placed into a strange dir by angstrom.
Since this is a new version of the base toolchain, it will install itself into a different folder. You can remove the old folder arm-2010.09/ once you are confident this new toolchain is working nicely for you. It will also add a new entry in your .bashrc. You can remove the old line (referencing arm-2010.09/), if you want to.


EDIT9:
You can now download the script openpandora_toolchain.sh directly from the openpandora git repository. The installer script is still a single file. To check the history of the file, please head over to git.openpandora.org/pandora-misc.git/sdk_installer. Here is a list of the changes in this veryion:
  • This version is now based on the latest codesourcery toolchain which was released on 16 December 2011 ("Sourcery CodeBench Lite 2011.09-70 for ARM GNU/Linux "). The main change is that the compiler is now based upon GCC 4.6.1 instead of 4.5.x which might improve some optimization settings.
  • Removed "-fsingle-precision-constant" from the default flags in the provided helper files since, at least in case of Wesnoth it can lead to some problematic behaviour in those cases where double precision is actually required.
Since this is a new version of the base toolchain, it will install itself into a different folder. You can remove the old folders arm-2010.09/ and/or arm-2011.03/ once you are confident this new toolchain is working nicely for you. It will also add a new entry in your .bashrc. You can remove the old lines (referencing arm-2010.09/ and/or arm-2011.03/), if you want to.
 
this is really great! i'm going to try this out when/if i'm getting my/a pandora :)
 
Just some information for those interested:
Installation took about 20mins on my laptop (Core2Duo 1.5GHz) with a "not too fast" harddrive while a system update (gentoo!) was running in the background, so CPU was a little busy and the harddrive, too. Main time went for downloading all the files which took not too long with the 16MBit line I got access to.
Without the time required for downloading (aka "the tmp folder is already populated with all files") installation time is below 10mins, close to 5mins.

With "really slow" internet connections it will likely take "by far longer". But with broadband internet (>=3MBit) the time required for installing should be about an hour or less.
 
Another update to the toolchain linked in this post. Changelog:
  • Updated toolchain installer file to install the latest codesourcery toolchain (Sourcery G++ Lite 2010.09-50).
  • Fixed some references to the arm-2009q3 version of the toolchain that were still hardcoded in the script.
  • Now the compile folders for opkg and pkg-config are automatically removed before trying to extract those source tarballs, otherwise changes in the path setup would not register when rerunning the script with existing extracted folders in which configure was already run.

Because of a new GCC used (and possible differing libs!) this version does require some additional testing. Please report any issues you find, they *might* be related to the different toolchain from codesourcery. So far I tested the toolchain with Wesnoth-1.9.4 and snes9x4p, those were working nicely.
 
Last edited by a moderator:
I did a compile of pcsx-rearmed (with some assistance) of pcsx-rearmed with the 2010.09 and it seems to work no problem at all.

(Both r4 and r5 built no problems.)
 
In case you get some error like this one:

/home/nils/pandora-dev/arm-2010.09/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/ld: warning: libstdc++.so.6, needed by /home/nils/pandora-dev/arm-2010.09/usr/lib/libboost_regex-mt.so, not found (try using -rpath or -rpath-link)
Seems that something really strange is going on, but adding -rpath really fixes it. This is what the resulting line from the makefile looks like once fixed:

$(CXX) -g $(OPT) -L$(PREFIX)/usr/lib -Wl,-rpath=$(PREFIX)/usr/lib -D_GNU_SOURCE=1 -D_REENTRANT -Wnon-virtual-dtor -Wreturn-type -lSDLmain -lSDL -lGLES_CM -lGLUES_CM -lIMGegl -lEGL -lsrv_um -lX11 -lXau -lXdmcp -lSDL_image -lSDL_ttf -lSDL_mixer -lts -lpng12 -ljpeg -lz -lfreetype -lmad -ltiff -lboost_regex-mt -lboost_system-mt -fthreadsafe-statics $(objects) -o game
Basically adding -Wl,-rpath=$PNDSDK/usr/lib does the trick.
 
Another update to the toolchain linked in this post. Changelog:
  • Create missing file usr/bin/libpng-config.
  • Create missing file usr/lib/pkgconfig/lua5.1.pc.
  • Simplify the section used during fixing libs. Commented out some parts that should not be required there since they were already covered by the stuff done before.
  • Supply more "useful files" and place them in a dir of their own (PNDSDK_DIR/sdk_utils/). List of files:
    • PandoraToolchain.cmake: useful for crosscompiling with cmake.
    • pandora_configure.sh: wrapper around ./configure that allows calling configure via this script and directly setting most vars that should be required to run it.
    • opkg-pandora.sh: script for calling opkg in a way that the stuff setup is used correctly.
    • fix-libs.sh: script to fix libs. Eg required after running some opkg update.
    • pnd_make.sh: script for packaging things into a .pnd.
    • genpxml.sh: script for generating some basic PXML.xml file.
 
Last edited by a moderator:
just a quick question, which libs does this package include? for me gles, sdl(mixer) , ibvorbisfile and stuff like that are quite important... do you have a list ?
 
Back
Top