Pandora Crosscompiler Toolchain Based On Openpandora.org Ipks


Another update to the toolchain linked in this post:

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.
 
Last edited by a moderator:
Hi Ivanovic,

Thanks for all of your work on this toolchain.

I think I found a small issue with the fix-libs.sh script. Occasionally when building stuff that uses libtool I would get errors like these:

Code:
/usr/lib/libSDL.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status

I found what was causing this problem is the .la files in $PNDSDK/usr/lib contained lines like

Code:
libdir='/usr/lib'

The problem is that the sed command in fix-libs.sh was not taking into account the possibility of a single quote before the slash when doing the replacement.

Here is a patch that fixed the problem for me:
Code:
--- a/openpandora_toolchain.sh
+++ b/openpandora_toolchain.sh
@@ -852,7 +852,7 @@ _END_
 PNDSDK_DIR=$PNDSDK_DIR
 PNDSDK=$PNDSDK
 
-SEDCMD="s#/usr/local/pandora#\$PNDSDK_DIR#g;s#prefix=\/.*#prefix=\$PNDSDK/usr#g;s#includedir=\/.*#includedir=\$PNDSDK/usr/include#g;s#libdir=\/.*#libdir='\$PNDSDK/usr/lib'#;s# /usr/lib/lib([A-Z0-9a-z.-]*).la# \$PNDSDK/usr/lib/lib\1.la#g;s# /usr/lib# \$PNDSDK/usr/lib#g;s#-L/usr/lib#-L\$PNDSDK/usr/lib#g;s#-R/usr/lib#-R\$PNDSDK/usr/lib#g;s#-I/usr/include#-I\$PNDSDK/usr/include#g;s#-isystem\/.*\b##g"
+SEDCMD="s#/usr/local/pandora#\$PNDSDK_DIR#g;s#prefix=\/.*#prefix=\$PNDSDK/usr#g;s#includedir=\/.*#includedir=\$PNDSDK/usr/include#g;s#libdir='\?\/.*#libdir='\$PNDSDK/usr/lib'#;s# /usr/lib/lib([A-Z0-9a-z.-]*).la# \$PNDSDK/usr/lib/lib\1.la#g;s# /usr/lib# \$PNDSDK/usr/lib#g;s#-L/usr/lib#-L\$PNDSDK/usr/lib#g;s#-R/usr/lib#-R\$PNDSDK/usr/lib#g;s#-I/usr/include#-I\$PNDSDK/usr/include#g;s#-isystem\/.*\b##g"
 
 	echo "Fixing paths inside *la, *pc and files in usr/bin/"
 	for i in \$(find \$PNDSDK/usr/lib -name '*la'; find \$PNDSDK/usr/lib/pkgconfig -name '*pc';find \$PNDSDK/usr/bin -type f);do
 
Last edited by a moderator:
Getting an error trying to install this:

configure: error: pkg-config and glib-2.0 not found, please set GLIB_CFLAGS and GLIB_LIBS to the correct values
ERROR: Configure for pkg-config failed, please check the output above

I know next to nothing about Linux but I think pkg-config and glib-2.0 are installed, since I ran an apt-get install on both. But I've no idea where GLIB_CFLAGS and GLIB_LIBS are or what to set them to.

Can anyone help? I'm doing this in an Ubuntu virtual machine, if that's relevant.
 
Read up a bit on crosscompiling. Apt-get won't help as you don't need the hostlibs here, but the arm ones.
Maybe the version is not right, too.
 
Spectralist said:
Getting an error trying to install this:

configure: error: pkg-config and glib-2.0 not found, please set GLIB_CFLAGS and GLIB_LIBS to the correct values
ERROR: Configure for pkg-config failed, please check the output above

I know next to nothing about Linux but I think pkg-config and glib-2.0 are installed, since I ran an apt-get install on both. But I've no idea where GLIB_CFLAGS and GLIB_LIBS are or what to set them to.

Can anyone help? I'm doing this in an Ubuntu virtual machine, if that's relevant.

hi,

i've the same error message on xbuntu 11.04 and no idea how i can solve the problem (also not with mcobit tip).

any idea what goes wrong?

cheers

aitsch
 
Last edited by a moderator:
aitsch said:
hi,

i've the same error message on xbuntu 11.04 and no idea how i can solve the problem (also not with mcobit tip).

any idea what goes wrong?

cheers

aitsch
If you are not experienced with cross-compiling, I would rather recommand you my toolchain which will set many things for you.
 
Last edited by a moderator:
I gave this one a try. So far this seems to work nice for me. Downloaded sox-tarball for testing, configuration worked, installation did not overwrite my host-system (phew ;) ), but wrote to a testcase-directory since i specified that like mentioned in the comments of "pandora_configure.sh". However I have a question: I thought about simply letting the installation go to the sdk-directory, so the sox-libraries are found when configuring an application that depends on it. Do you recommend this? Or should i keep stuff separated and somehow specify the testcase-directory while configuring?
 
Lomaxx said:
I gave this one a try. So far this seems to work nice for me. Downloaded sox-tarball for testing, configuration worked, installation did not overwrite my host-system (phew ;) ), but wrote to a testcase-directory since i specified that like mentioned in the comments of "pandora_configure.sh". However I have a question: I thought about simply letting the installation go to the sdk-directory, so the sox-libraries are found when configuring an application that depends on it. Do you recommend this? Or should i keep stuff separated and somehow specify the testcase-directory while configuring?
Nice to hear that this toolchain works for you.

Regarding your question: Personally I'd separate your "self compiled" libs from the "mainline" libs. You could eg alter the script to list the correct paths for includes and linking. Or you could make sure to manually specify those when building something that requires the extra libs.

The main benefit of separating the stuff is that you can see more easily for which progs you'll have to package extra libs. Besides you can see what is available in the main system more easily if you are not 100% sure.
 
Last edited by a moderator:
Spectralist said:
Getting an error trying to install this:

configure: error: pkg-config and glib-2.0 not found, please set GLIB_CFLAGS and GLIB_LIBS to the correct values
ERROR: Configure for pkg-config failed, please check the output above

I know next to nothing about Linux but I think pkg-config and glib-2.0 are installed, since I ran an apt-get install on both. But I've no idea where GLIB_CFLAGS and GLIB_LIBS are or what to set them to.

Can anyone help? I'm doing this in an Ubuntu virtual machine, if that's relevant.

This is actually a "problem" with pkg-config-0.26 - it requires glibc to build, but glibc requires pkg-config to build. Previously the pkg-config tool included the source to an old (1.x) version of glibc in its source, however it has since been removed and migrated to glibc-2.0. I got around this problem by editing the openpandora_toolchain.sh to revert to using pkg-config-0.25:

Code:
PKGCONFIG_VERSION=pkg-config-0.25
PKGCONFIG_ARCHIVE_MD5=a3270bab3f4b69b7dc6dbdacbcae9745
#PKGCONFIG_VERSION=pkg-config-0.26
#PKGCONFIG_ARCHIVE_MD5=47525c26a9ba7ba14bf85e01509a7234

I haven't seen any issues with this approach yet, but use the older library at your own risk. Hope this helps.
 
Last edited by a moderator:
Spectralist said:
Getting an error trying to install this:

configure: error: pkg-config and glib-2.0 not found, please set GLIB_CFLAGS and GLIB_LIBS to the correct values
ERROR: Configure for pkg-config failed, please check the output above

I know next to nothing about Linux but I think pkg-config and glib-2.0 are installed, since I ran an apt-get install on both. But I've no idea where GLIB_CFLAGS and GLIB_LIBS are or what to set them to.

Can anyone help? I'm doing this in an Ubuntu virtual machine, if that's relevant.


I got around this with "sudo apt-get install libglib2.0-dev" then ran the script again
 
Last edited by a moderator:
Another update to the toolchain linked in this post:

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.
 
Last edited by a moderator:
Back
Top