Version 20 (modified by Sanahuja Guillaume, 5 years ago) ( diff )


Installation des chaînes de compilation

La chaîne de compilation croisée permet de compiler sur votre ordinateur des programmes pour la cible. La chaîne de compilation permet de compiler sur votre ordinateur des programmes pour votre ordinateur. Les 2 chaînes de compilation ne supportent que les distributions 64 bits.

Les chaines ont été construites avec le projet robomap3.

Toolchain for x86_64 (mandatory)

You need at least this one, as it used for compiling FlairGCS and other tools.

$ cd ~
$ wget
$ chmod +x
$ sudo ./
$ rm

Cross toolchain for armv7a-neon (ardrone2, bebop, hds x8)

$ cd ~
$ wget
$ chmod +x
$ sudo ./
$ rm

Cross toolchain for armv5e (mambo)

$ cd ~
$ wget
$ chmod +x
$ sudo ./
$ rm

Environment variable

Toolchain installation scripts add variables in .bashrc. If you need to use it directly in the same terminal or an already opened one, reload your .bashrc

$ source ~/.bashrc

Installation des drivers graphiques (maybe deprecated)

  • Si vous possédez une carte vidéo type nvidia, il faut copier les librairies dans la toolchain:
    $ sudo cp -r /usr/lib/nvidia-340/* /opt/robomap3/1.7.3/core2-64/sysroots/core2-64-poky-linux/usr/lib 
  • Pour une carte vidéo de type ATI:
    $ sudo cp -r /usr/lib/fglrx/* /opt/robomap3/1.7.3/core2-64/sysroots/core2-64-poky-linux/usr/lib 
  • For an Intel graphic card, it's a little bit more complicated, due to several versions and path for the libraries.

The idea is that we're using the system video card driver since it's not included in robomap3.

The driver itself (eg: should be loaded automatically (from /usr/lib/x86_64-linux-gnu/dri/). But this driver may not succesfully load since it requires some specific library versions that may not match robomap3's.

To debug this you should launch your 3D graphic program (eg: simulator) with the LIBGL_DEBUG environment variable set to verbose. For example

$ LIBGL_DEBUG=verbose ./LineFollower_simulator_nrt -n x4_0 -t x4 -a -p 9000 -x setup_x4.xml (...)

Notice the line that look like version `CXXABI_1.3.9' not found (required by /usr/lib/x86_64-linux-gnu/dri/ . This means that the local system driver needs a version of that defines the symbol CXXABI_1.3.9 (meaning application binary interface version 1.3.9). The version of libstdc++ included in robomap3 probably doesn't define this symbol. You can make sure with

strings /.../robomap3/1.7.3/core2-64/sysroots/core2-64-poky-linux/usr/lib/ | grep CXXABI_ 

So we need to preload the libstdc++ library of the system to avoid robomap3 one to be loaded. To achieve this we need to set the LD_PRELOAD environment variable like this

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/ ./LineFollower_simulator_nrt ...

Stopping here may be enough, but you then can see errors like undefined symbol: nouveau_drm_new .

Same problem: the driver needs a version of a library (here which defines a specific symbol that doesn't exist in robomap3 version (yet).

Same solution: preload the local system library. Repeat this until all unresolved symbols are gone.

On ubuntu 16.10 with robomap3 1.7.3, I ended up with the following

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/  ./LineFollower_simulator_nrt -n x4_0 -t x4 ...

To avoid setting this variable every time, you can modify the script used to launch the program (usually in build/bin, eg: and add this line after the first one

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/
Note: See TracWiki for help on using the wiki.