ARM Cross Compiling with Mac OS X

The article refers mainly to cross compile on Mac OS X, but all described below can also be applied on Linux.

ARM Toolchain for Mac OS X

Let’s start first with toolchain.  So no one has to compile the toolchain again,  I have provided them as binaries:

All versions are in the Package Manager Format as Installer. After the installation, you can find the toolchains in the following directories:

  • /usr/local/linaro/arm-linux-gnueabihf  – BeagleBone Black
  • /usr/local/linaro/arm-linux-gnueabihf-raspbian  – Raspberry Pi

Now you can already start with the cross compiling:

Enter the most popular code:

Save the file, exit nano [ctrl + x] and then compile it:

Test if everything works:

If everything works fine,  you might as well go over to Eclipse. But at the moment we only have a „prebuild sysroot“. This means we can only generate code using standard C and C++. If you want to use Linux libraries, like Glib etc., you have to compile this first, to get an advanced sysroot.

Advanced Sysroot

There are a lot of Linux libraries, in the following I use the most popular or which I think they are popular. I do not explain here configuration like:

I have create a shell script which creates the extended Sysroot automatically. At the beginning,  I wanted to use only the libraries Glib, Qt embedded and OpenCV. However, they have so many dependencies, so that the Sysroot now includes the following libraries:

  • Image Libraries:
    • libjpeg – Independent JPEG Group’s JPEG runtime library
    • limping – PNG library
    • libtiff – Tag Image File Format library
    • libraw – raw image decoder library
    • liblcms2 – Little CMS 2 color management library development headers
    • imagemagick – image manipulation library
  • Audio and Video Libraries:
    • gstreamer – pipeline-based multimedia framework
    • gst-plugins-base – GStreamer libraries from the „base“ set
    • gst-plugins-good – GStreamer development files for libraries from the „good“ set
    • alsa – Advanced Linux Sound Architecture
    • liboog – Ogg bitstream library
    • libvorbis – Vorbis General Audio Compression Codec
    • libtheora – Theora Video Compression Codec
    • libvisual – Audio visualization framework
    • wavpack – Audio codec (lossy and lossless) encoder and decoder
    • lib – Open source audio and video processing tools
  • Compression Libraries:
    • zlib – Compressing File-I/O Library
    • bzip2 – High-quality block-sorting file compressor
    • liblzma – XZ-format compression library
  • Markup Language Libraries:
    • expat – XML parsing C library
    • libxml2 – GNOME XML library
  • Hardware Libraries:
    • tslib – Abstraction layer for touchscreen
    • i2c-tools – Heterogeneous set of I2C tools for Linux
    • bluez – Bluetooth protocol stack library
    • libusb – userspace USB programming library
    • wiringPi – GPIO Interface library for the Raspberry Pi (Raspberry Pi only)
  • Communication:
    • libmodbus – Library for the Modbus protocol
    • curl – Command line tool for transferring data with URL syntax
  • Mathematic and Scientific Libraries:
    • gsl – GNU Scientific Library
    • gmp – Multi precision arithmetic library developers tools
    • mpfr – Multiple precision floating-point computation developers tools
    • opencv – Open Source Computer Vision Library
      (no idea why, but can only compile on my iMac and not on my Mac Book Pro.)
  • Database:
    • sqlite – Database management system libraries
  • Framework and System Libraries:
    • Qt – Qt 4 development files and development programs for host
    • glib – GLib development library
    • dbus – Simple interprocess messaging system
    • libffi – Foreign function interface library
    • ncurses – text-based user interfaces library
    • readline – GNU readline and history libraries
    • cryptodev – Access to Linux kernel cryptographic drivers
    • openssl – Secure Sockets Layer toolkit
    • liborc – Library of Optimized Inner Loops Runtime Compiler
    • freetype – FreeType 2 font engine
    • fontconfig – Generic font configuration library
    • cairo – The Cairo 2D vector graphics library
    • liblqr – Converts plain array images into multi-size representation
    • libssh2 – SSH2 client-side library
    • libdirectfb – Direct frame buffer graphics library
    • libconfig – Configuration File Library
  • X11 Libraries:
    • libX11 – X11 client-side library
    • libXext – X11 miscellaneous extensions library
    • pixman – pixel-manipulation library for X
    • xtrans – X transport library
    • xproto
    • xextproto
    • inputproto
    • xcb-proto – X C Binding
    • libpthread-stubs – pthread stubs not provided by native libc
    • libXau – X11 authorisation library
    • libgpg-error – Library for common error values and messages in GnuPG components
    • libgcrypt – LGPL Crypto library
    • libxslt – XSLT 1.0 processing library
    • libxcb – X C Binding
    • videoproto – X11 Video extension wire protocol
    • kbproto – X11 XKB extension wire protocol
    • libXv – X11 Video extension library

First, the script must be downloaded from Github. I use a folder called „Development“ which is placed in my home directory. Each target has their own directory in „Development“. As this continues within the article here a short explanation:

  • The user directory  /Users/USER_NAME  has the following the acronym  $HOME.
  • The working directory for the BeagelBone Black is:  $HOME/Development/BeagleBone
  • The working directory for the Raspberry Pi is:  $HOME/Development/Raspi

The installation of the advanced sysroot for the BeagleBone Black is then as follows:

After the repository has been cloned, you have to set up the configuration file:

The following configuration file shows the default settings for the BeagleBone Black:

If all parameters are correct, you can start compiling the Sysroot:

Creating now takes some time, so you have two or three hours rest. It is useful to disable Time Machine, otherwise all source files get backed up.

If you will build the advanced sysroot for Raspberry Pi and BeagleBone Black you have to do this twice. Because the architecture of both systems are not compatible. This is also the reason why there are two compiler.

Cross Compiling with Eclipse CDT

Open Eclipse CDT. If Eclipse is not installed, install Eclipse Kepler CDT 32Bit now. First you have to specify the target. In the Menu „Window“  select → „Open Prespective“ → „Other“.



Goto the dialog and select „Remote System Explorer“ (RSE). Confirm the dialog with OK. If you close the Welcome Screen, you will see the RSE on the left side. Right click into the RSE to open the context menu and select „New Connection“.


  • Select „Linux“ and click „Next“.
  • Enter the host name or IP address and click „Next“.
  • Files: „Configuration“ choose „ssh.files“ and click „Next“.
  • Processes: „Configuration“ choose „“ and click „Next“.
  • Shells: „Configuration“ choose „ssh.shells“ and click „Next“.
  • SSH Terminals: „Configuration“ choose „ssh.terminals“ and click „Next“.

Change into the Perspective C/C++ (icon at the top right) and create a new C++ Project (e.g. hello).


As Project Typ choose „Executable“ → „Empty Project“ and as Toolchain „Cross GCC“, click „Next“ to proceed. The following dialog can be skipped.


In Cross GCC Command add:

  • Cross Compiler Prefix: „arm-linux-gnueabihf-„
  • Cross Compiler Path:
    • /usr/local/linaro/arm-linux-gnueabihf  – BeagleBone Black
    • /usr/local/linaro/arm-linux-gnueabihf-raspbian  – Raspberry Pi

Close the dialog with „Finish“. Create a new cpp (e.g. hello.cpp) and add the source code below:

Select the menu „Project“  → „Build Project“ oder press [cmd+b] to compile the source code. To run the program on the target, select „Run“ → „Run Configurations“, right click on „C/C++ Remote Application“ and select „New“ from the context menu. Under „Main“ add the „Remote Absolute File Path for C/C++ Application“ for example „/root/hello“. Click „Apply“ and „Run“ to execute you program on the target.

To start the Debugger select „Run“ → „Debug Configurations“. Under „Main“ add the „Remote Absolute File Path for C/C++ Application“. Goto the tab „Debugger“ and for „GDB debugger“ type „/usr/local/linaro/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gdb“ (/usr/local/linaro/arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gdb for Raspberry Pi). Click „Apply“ and „Debug“ to execute your program in debug mode on the target. Here, you can now run the program line by line (do not use step into compiled library functions).

This is now based on all standard C/C++. The effort with the Sysroot does not apply yet. To build the same source like bevor with Glib, we have to tell Eclipse where the advanced sysroot is to find. Right click on your Project and select „Properties“. Goto „C/C++ General“ → „Path and Symbols“. Under „Includes“ click the button „Add“ and add the following paths:

  • „%HOME/Development/BeagleBone/sysroot/include“
  • „%HOME/Development/BeagleBone/sysroot/include/glib-2.0“
  • „%HOME/Development/BeagleBone/sysroot/lib/glib-2.0/include“

Click „Add to all Languages“ and „OK“. Goto „Library Path“ (repeat it for each path).

Select the path to the Sysroot Libraries:

  • „%HOME/Development/BeagleBone/sysroot/lib“

Goto „Libraries“ and add them (without -l and without lib):

  • glib-2.0
  • pthread

Close the Properties dialog and replace the source code with the code below:

For the example the effort does not make sense, this effect is only relevant for large projects.

Cross Compiling with Qt Creator

Fierst we need to install Qt Creator. Even the Qt in the sysroot is in version 4.8.6, we can use the actual Qt Creator 3.2.1 for Mac. After the installation, goto „Qt Creator“ → „Properties“.

So my problem now is, Max OS X is a comfortable and ergonomic Operation System and Qt Creator try to follow them. Means everything is in German. I’m trying to translate the dialogues and commands, but it may be that they are different in the English version.

Select „Devices“ in the left menu and push the button „Add…“ on top right.


Select „Generic Linux Device“ and press „Start Wizard“:


Add the Connection setup for your target click „Continue“:


Confirm the following dialog with „Finish“ and start the test procedure.  After the test is completed successfully click on „Close“.


Click „Apply“ (bottom left) to save your changes. Goto „Build & Run“ and select the tab „Compilers“. Push the button „Add“ and chose „GCC“:

  • Name:  You can assign a name of your choice.
  • Compiler Pfad:
    • /usr/local/linaro/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++  – BeagleBone Black
    • /usr/local/linaro/arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++  – Raspberry Pi

Click „Apply“ (bottom left) to save your changes. Select the tab „Qt Versions“ and push the „Add“ button:

  • Path ([cmd+shift+h] shows hidden files):
    • /usr/local/Trolltech/Qt-4.8.6-beaglebone/bin/qmake  – BeagleBone
    • /usr/local/Trolltech/Qt-4.8.6-raspi/bin/qmake  – Raspberry Pi

Select the tab „Debugger“ and push the „Add“ button:

  • Name:  You can assign a name of your choice.
  • Path ([cmd+shift+h] shows hidden files):
    • /usr/local/linaro/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gdb  – BeagleBone
    • /usr/local/linaro/arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gdb  – Raspberry Pi

Finally select the tab „Kits“ and push the „Add“ button, to set the parameters previously taken, as shown below using the example of an BeagleBone Black.


Before we can create a program and run it on the target, we still need to be made some modifications of the target.

Preparation of the target for Qt

In order to understand, the Qt version that we have compiled is embedded Qt version with its own frame buffer. The Qt version in the Debian/Raspbian repositories requires a window manager. This means you can not install Qt from the package source, you have to copy the compiled libraries to the target. In the following the example of the BeagleBone Black (Raspberry Pi is placed in Qt-4.8.6-raspi):

To find the libraries we have to add the path in the environment variable:

Extend in the file, the row 5 and 7, the path with „/usr/local/Trolltech/Qt-4.8.6-beaglebone/lib“.


I was not able to configure libffi 5 on Mac OS X, so libffi was installed in version 6. So we have to copy these libraries too:

As on a freshly installed BeagleBone Black und and Raspberry Pi has already a window manager running, it must be removed.

The target is now ready for use.

Test Qt on the Target

Now a new project can be created. Open „File“ → „New File or Project“, select „Application“ → „Qt Widgets Application“ and press „Choose“. Create a subfolder with the same name as your project and save the project into it. A nice feature on Qt Creator is, you can create one and the same project for different targets and also for the host PC and change within this. Continue to the next screen.


Give the Class a name and press continue to the next screen. It now appears our main window where you already have a windows application. By pressing the hammer, this can be compiled.


If this works, the program can be transferred and executed, by pressing the green arrow, on the target. But before you have to setup the project file, in order like this:

In addition, a command line argument has to be passed. Click the icon „Projects“, goto „Build & Run“ and click „Run“ below the Target. Go to the section „Run“ and pass „-qws“ in the „Arguments“ field.


If you now press „Run“, the application should be appears on the screen of the target, if you have one.


I work with this setup for several months. Since then, I have not started my virtual Linux machine. The last time that I have used Linux (private, as an embedded developer I use it everyday), was to check if the advanced sysroot works also on Linux.


  • it fails to run on BBB with the following error:

    hafez2. Februar 2015
  • /home/ubuntu/NewDCU.elf: /usr/lib/arm-linux-gnueabihf/ version `CXXABI_1.3.8′ not found (required by /home/ubuntu/NewDCU.elf)

    hafez2. Februar 2015
  • Hi Hafez,
    maybe this will help to solve your issue : How do I insure that the dynamically linked library will be found?.
    I didn’t test it on Ubuntu, on Debian it runs without problems.

    Knut2. Februar 2015
  • Viele Danke !
    This is great, I had troubles under debian in a virtual machine, will try your solution.
    I will try and hopefully succeed at cross compiling Qt5.

    Cedric3. Februar 2015
  • Hallo!

    When preparing BeagleBone Black for QT on MAC,  I enter this on Terminal –

    But I get this –

    I tried every possible password of the computer as well as BeagleBone & also tried it in this form (publickey,password) but n’thing happens.

    Can you tell me what is this publickey and how to prepare it and as well as whose password it is asking for, Macbook or BeagleBone.

    Thanks in advance


    Prabhat Narang23. März 2015
  • Hi,
    between the @ symbol and the IP address is blank. But it is my fault, I mistyped above.

    The truth is:
    scp -r /usr/local/Trolltech/Qt-4.8.6-beaglebone/plugins/ root@

    I hope this helps

    Knut23. März 2015
  • Hi,

    Thank you so much for helping me. But I have some confusions-

    1) In the #nano /etc/profile I cant understand what and where I need make to changes. Can u help me in this with some better example?

    2) I have BBB running Angstrom image and waveshare LCD + Touchscreen cape is attached to the board for GUI. Angstrom, LCD and Touchscreen are working properly but I don’t know how to remove lightdm in Angstrom. I tried this-

    but it shows –

    While searching for solution in Internet i found this but still showing some errors-

    Please help me to resolve these issues so that I can do some further development with the board.

    Thanks again for the help




    Prabhat Narang24. März 2015
  • Hi Prabhat,

    hm Angstrom… the only experience with Angstrom on BBB was for me to replace it with the Debian Image.

    But I think you can do similar what Derek describes in his Blog.

    The other solution is to replace Angstrom with Debian. But I am not sure if the waveshare LCD runs with Debian. On the other hand you can try to boot via SD card.


    Knut24. März 2015
  • Hi

    I have removed the GUI from Angstrom. I made a project, Beaglebone. I successfully compiled it but when I press the run button, QT Creator shows the following error-

    I tried to make directory named Beaglebone through Terminal but it shows-

    Can you help me?



    Prabhat Narang26. März 2015
  • hi Thanks for this tutorial and scripts.


    I just need to play simple audio wav or mp3 file from QT 4.8 on Raspberry Pi.(cross compile)

    Please help me


    qasem30. März 2015
  • Hi Prabhat,
    which gcc version do you use?
    On BBB with Debian use gcc-4.8 on BBB with Ubuntu you can use gcc-4.9. On angstrom I don’t know.

    But 127 is returned if the command is not found.
    Do you have tried to execute your program from shell?
    $ /root/Beaglebone/PROGRAM_NAME -qws

    Knut30. März 2015
  • Hi,

    I have disabled Qt phonon at the moment.
    But you can try alsa or gstreamer.
    Maybe this will help you:

    Knut30. März 2015
  • Hi,

    I have some trouble with trying to compile WT for Rapsberry with your toolchain… the error that I get is:Linking CXX executable test.http
    /usr/local/linaro/arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.9.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find /lib/arm-linux-gnueabihf/
    /usr/local/linaro/arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.9.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find /usr/lib/arm-linux-gnueabihf/libpthread_nonshared.a
    collect2: error: ld returned 1 exit status
    make[2]: *** [test/test.http] Error 1
    make[1]: *** [test/CMakeFiles/test.http.dir/all] Error 2

    Doing somo googling I found that the problem are absolute paths in file, but I wasn’t able to find the correct archive.

    I don’t know if I have to compile again making this changes on the files contained in a folder with path /libc/usr/lib/etc… and if I’m correct, can you help me out how can I do that, or if you have other solution for me I’ll be very thankful.






    Andres21. April 2015
  • Hi Andres,

    did you tried to run make with „-DBUILD_TESTS=OFF“.
    The problem are not the absolute paths, I think it is the cmake search path of the libraries.
    I have no time now but maybe in the next days.

    Knut22. April 2015
  • Thanks! That worked perfectly.

    And making more research I found out that the problem with was not with the toolchain but with the Rasbian distribution, so I edited the file on the Rapsberry, and everything worked fine.

    Thanks for your help, time and patience.


    Andres24. April 2015
  • hi

    When I try to run the debugger I get the message box
    „The selected build of GDB does not support Python scripting“

    i set config

    GDB debugger type /usr/local/linaro/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gdb


    qasem26. April 2015
  • I do not understand the problem. I need some more information.
    What language do you want to debug?
    How do you use the debugger?
    Which version of toolchain do you use?
    What is running on the target?

    Knut26. April 2015
  • Hi!

    Thank for this great tutorial that works fine on Xcode.

    The only problem I’m facing is when trying to debug. arm-linux-gnueabihf-gdb asks for dl-fini.c and rtld.c.

    Performing arm-linux-gnueabihf-gcc -v mentions —with-sysroot=/Users/knut/Development/cross-tools/cross-build/install/arm-linux-gnueabihf/libc. How to generate the /Users/knut/Development/cross-tools/cross-build folder with all its sub-folders?

    Rei Vilo19. Mai 2015
  • Hi,

    this is an issue of crosstools-ng. If you try the same with the Linaro Linux Build, you will get the same Message.
    Performing arm-linux-gnueabihf-gcc -v mentions –with-sysroot=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc.
    The crosstools-ng script copy the prebuilt sysroot into that folder and does not link the debug symbols.

    How ever I solve this issue where I do not use the „step into“ button but use the „stepp over“ button in Eclipse for default C/C++ functions.

    Knut22. Mai 2015
  • @Knut

    Thank you very much for your answer.

    Now the next challenge is to build crosstool-NG with Yosemite… Maybe are you considering another post on this topic?

    Rei Vilo27. Mai 2015
  • Hi!!

    I´m having some trouble with the advanced sysroot… The problem is with Glib… the log file at the end states:

    Making all in tests
    GEN      giotypefuncs.c
    GEN      gdbus-test-codegen-generated.h
    /Applications/  all-recursive
    Making all in gdbus-object-manager-example
    /Applications/  all-am
    make[7]: Nothing to be done for all-am'.
    Making all in services
    make[6]: Nothing to be done for
    Making all in modules
    make[6]: Nothing to be done for all'.
    make[6]: Nothing to be done for
    Making all in po
    make[2]: Nothing to be done for all'.
    Making all in docs
    Making all in reference
    Making all in glib
    make[4]: Nothing to be done for
    Making all in gobject
    make[4]: Nothing to be done for all'.
    Making all in gio
    Making all in gdbus-object-manager-example
    make[5]: Nothing to be done for
    make[5]: Nothing to be done for all-am'.
    make[4]: Nothing to be done for
    make[3]: Nothing to be done for `all-am‘.
    Making all in tests
    /Applications/  all-recursive
    Making all in gobject
    GEN      stamp-testmarshal.h

    (process:80227): GLib-Genmarshal-WARNING **: unknown type: VARIANT
    make[4]: *** [stamp-testmarshal.h] Error 1
    make[3]: *** [all-recursive] Error 1
    make[2]: *** [all] Error 2
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2


    I’m using Yosemite with homebrew and I’m trying to make this for Raspberry.

    Thanks for the help.

    Andrés I

    Andres3. Juni 2015
  • Thanks for sharing this, very helpful.

    The 3 following appear to have broken links:

    mpfr, Lame, libvisual

    Downloading manually and re-running sysroot -b worked well.


    Alan12. Juli 2015
  • Can you please explain when the advance sysroot is needed?  I skipped that step in my installation, but was able to build the hello world app and successfully debug it on the RPi (cross compile and cross debug).

    Does the advance sysroot still support libc?

    Can I just copy the RPi libraries to my mac and link against them when building?  I realize they probably don’t have debug symbols, but in many cases, that is ok.

    Thank you in advance.

    Robert27. Juli 2015
  • You have to cross compile all these libraries to get an suitable Qt creator.
    If you do not need Qt you can copy all libs.

    Knut29. Juli 2015
  • Thank you!  We’re working on a Raspberry Pi port of our „8th“ development tool (, and have been looking for OS X ports of the RPI tools.

    Ron Aaron2. August 2015
  • I used to compile for the Raspberry PI on OSx. It compiles.

    Hello World does not Run on the PI though. The error meesage says „segmentation fault“ I have configured eclipse to use the tool chain. Idea’s about how to solve his ?

    piet vanden donker16. August 2015
  • Could you post your Pi model or just post the result of “uname -a”.

    Knut19. August 2015
  • You indicated that need to install Eclipse Kepler CDT 32Bit.

    But can i use Eclipse Mars R 64 Bit to cross compiling for BeagleBone ?

    Ivan20. August 2015
  • Hi Ivan,

    at the moment I use Eclipse Luna 64 Bit. I do not know if Mars does, but I think so.

    Knut20. August 2015
  • When i start installing Advanced Sysroot : ./sysroot –build

    I see an error :

    Download mpfr-3.1.2.tar.bz2… ######################################################################## 100,0%


    HTTP Status 404:

    Can not download:

    *** Error in mpfr ***

    Cleanup build directory:

    Unmount source image… done

    Renove source image… done


    How to solve this problem?

    Ivan20. August 2015
  • Hi,

    mpfr has changed the link location.
    The easiest way ist to open the file „formula/“ and change the line 3:
    – GV_url=“″
    + GV_url=“″

    Knut21. August 2015
  • Hello Knut

    Thank you very much for your answers.

    But i have also two question. 🙂 (Sorry i am beginner )

    1) Could you explain more  detail this step:

    Goto “Libraries” and add them (without -l and without lib):


    I dont’t understand what i have to add in the tab “Libraries”

    2) I compile my project in Eclips, and run on the beaglebone black all ok.

    But when i try to run in Debug mode i see this message:

    Can’t find a source file at „/Users/knut/Development/cross-tools/cross-build/build/src/eglibc-linaro-2.19-2014.05/elf/dl-fini.c“
    Locate the file or edit the source lookup path to include its location.

    and debug failed.

    I can’t understand where Eclips take this path and how to solve this problem.


    Ivan21. August 2015
  • Dear Knut,

    How do you get this /usr/local/Trolltech/Qt-4.8.6-beaglebone version of Qt on your Mac?

    Georgi20. September 2015
  • Hi

    First, thank you for the great tutorial. It help me a lot. I have a couple of questions:

    1) Could you provide me a non-default values of the „config.cfg“ file? I tried to build it however it didn’t found compiler with the default values.

    2) Do you know how to link the OpenCV library in Eclipse Mars? It’s fundamental for my project.

    Also, The compilation worked in Eclipse Mars.

    Thanks in advantaje.

    data: I use Yosemite in MacBook Pro and cross-compilation target is Raspberry-Pi2

    Laura22. September 2015
  • Hello, and very big thanks for your ready to use tool chain. I have tried several cross compilers to build Qt 5 for Raspberry Pi on Mac OS X but your one is best of all for this task. Using it I successfully cross compiled qt5.4 and qt5.5 on Mac OS X. I used as sysroot the modified version of the official image of Raspbian but anyway I’m happy that I have now working environment. Using it was able to compile even QtWebkit and QML modules without any problem.

    Dmitry24. September 2015
  • Hallo Knut,

    When building the sysroot, I receive an error:

    Download libxslt-1.1.27.tar.gz… alredy loaded

    Extract libxslt-1.1.27.tar.gz… donne

    Configure libxslt… donne

    Make libxslt… 

    *** Error in libxslt ***

    See ‚/Users/jens/Development/Raspi/arm-cross-sysroot/log/libxslt.log‘ for more details

    Details in log file are:

    /usr/local/linaro/arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.9.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -licucore
    collect2: error: ld returned 1 exit status
    make[2]: *** [] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2

    Is there any work around to correct this.


    Jens17. Oktober 2015
  • Thank you. i ran to a problem:

    Extract libsoup-2.40.3.tar.xz… donne

    Configure libsoup…

    *** Error in libsoup ***

    I looked at the problem at Raspi/arm-cross-sysroot/log/libsoup.log

    #define HAVE_STDINT_H 1

    #define HAVE_UNISTD_H 1

    #define HAVE_DLFCN_H 1

    #define LT_OBJDIR „.libs/“

    configure: exit 2

    I have no idea of what went wrong. any suggestions? thanks.

    john31. Oktober 2015
  • I have build all libs except following:

    1) has error, skipping by commenting out configure, make, install and finish install
    2) „“, „“ could not be downloaded, I download it from other source, create .gz file by gzip, find its sha1 by sha1sum in Linux, and put to downloaded dir, comment out downloading in the sh files
    4) could not download i2c-tools-3.1.1.tar.bz2, use i2c-tools_3.1.1.orig.tar.bz2 from other source
    5) is removed from settings.cfg due to a build error. it is really puzzling me here. please help. it says „make uninstall/install“ is not working. i really want this work since i need to use GPIO.
    6) is removed from settings.cfg due to a build error

    john31. Oktober 2015
  • Thank you very much for the posting. I have made it work on Eclipse using sysroot. One minor notice: in addition to „pthread“ and „glib-2.0“ in the libraries, i have to add „rt“ as well.

    john1. November 2015
  • Thank you very very much! you are a master!!


    Manuel1. November 2015
  • Hello, thank you very much for the tutorial.

    I was able to get everything working but the debugger… It shows me segmentation error always, as well as „No source available for „address“ „. Even with a simple „Hello World“.

    Compiler is set to -O0 and -g.

    I have gdbserver running on my beaglebone as well as in my computer.

    I think it should be a problem of precompiled libraries, the strange thing is it can’t even reach the main routine…

    I would be grateful for any help!

    Best regards,



    Manuel12. November 2015
  • Hi,

    I’m trying to use these instructions and finding a lot of issues building sysroot. I managed to get to libxslt but in the log the error is

    CC security.lo
    /usr/local/linaro/arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -licucore
    collect2: error: ld returned 1 exit status
    make[2]: *** [] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2

    How can I get around this?

    Pete16. November 2015
  • Hello,

    thank you for the tutorial. I really appreciate it. I followed the steps and everything went right until it came to Advanced Sysroot. First problem comes when making libxslt-1.1.27. Here is the log of the problem:

    /usr/local/linaro/arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.9.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -licucore

    Does anyone had some similar problem? Could anyone please help me to make the sysroot working so I can finally start programming.

    Thank you in advance.


    Petr26. November 2015
  • Hey,

    Many thanks for the OS X toolchains and the tutorial.

    I’ve managed to install the BeagleBone toolchain and cross-compile a simple program, however I’m now trying to use the advanced sysroot so that I can use the ALSA library.

    How can I link to the sysroot using the command line? For example, I’m attempting to compile a Maximilian demo project with the following command:

    /usr/local/linaro/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -Wall -D__LINUX_ALSA__ -o maximilian main.cpp RtAudio.cpp player.cpp maximilian.cpp -lasound -lpthread

    But what do I add so that it can find the ALSA headers and lib files in my sysroot directory?


    Liam Lacey14. Januar 2016
  • Hi,

    g++ [options] [source files] [object files] [-Idir] [-Ldir] -llibname [-o outfile]

    [-Idir]: is -I/your-sysroot-dir/include
    [-Ldir]: is -L/your-sysroot-dir/lib

    Knut16. Januar 2016
  • Hello all,

    I had trouble running a simple Qt app on the BeagleBoneBlack running Debian 8.2. It was complaining about not having, even though I had the $PATH variable set up, and pointing to /usr/local/Trolltech/Qt-4.8.6-beaglebone/lib on the BeagleBone itself. To fix this,

    ssh root@

    nano /etc/profile

    add write the next two lines just below the line  „export PATH“:

    LD_LIBRARY_PATH=“/usr/lib:/usr/local/Trolltech/Qt-4.8.6-beaglebone/lib“export LD_LIBRARY_PATH

    I hope it helps in case you have the same issue..

    Austin Simpson16. Januar 2016
  • Hi,

    I’ve tried to build sysroot for Raspberry Pi, but I it gives me an error when building „WiringPi“… the log info is show below. Any clues?


    wiringPi Build script

    fgrep: /proc/cpuinfo: No such file or directory

    WiringPi Library
    uninstall file_urls …

    Cilo1. Februar 2016
  • Hi !

    I’m unable to run the sysroot script because of that error:

    sysroot: line 29: cd: sysroot: Not a directory
    Error: The configuration file could not be found!“
    I did everything you explained but there still is this problem…
    Can you please help me ? Do i have to change some path or whatever ?

    Lachaisel28. Februar 2016
  • Hello and thanks for all your work.

    I’m trying to test my new config with an „Open Sankoré“ compile and it tells me that QTWebkit seems no to be there. Is that normal ?

    Thanks for your reply.

    Lachaisel3. März 2016
  • Actual the libsoup files seems to not exist, currently I found this version

    So makes sense to adopt the script

    Carsten Harnisch4. März 2016