Changes between Version 22 and Version 23 of toolchain/install


Ignore:
Timestamp:
02/18/19 14:12:04 (5 years ago)
Author:
Sanahuja Guillaume
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • toolchain/install

    v22 v23  
    6464* ''OECORE_HOST_SYSROOT'': used by ground control station to retrieve maps provider plugins (for gps)
    6565* ''OECORE_HOST_NATIVE_SYSROOT'': used to retrieve host's cmake and doxygen tools.
    66 
    67 == Installation des drivers graphiques (maybe deprecated) ==
    68 
    69  * Si vous possédez une carte vidéo type nvidia, il faut copier les librairies dans la toolchain:
    70 {{{
    71 $ sudo cp -r /usr/lib/nvidia-340/* /opt/robomap3/1.7.3/core2-64/sysroots/core2-64-poky-linux/usr/lib
    72 }}}
    73 
    74  * Pour une carte vidéo de type ATI:
    75 {{{
    76 $ sudo cp -r /usr/lib/fglrx/* /opt/robomap3/1.7.3/core2-64/sysroots/core2-64-poky-linux/usr/lib
    77 }}}
    78 
    79  * For an Intel graphic card, it's a little bit more complicated, due to several versions and path for the libraries.
    80 The idea is that we're using the system video card driver since it's not included in robomap3.
    81 
    82 The driver itself (eg: i965_dri.so) 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.
    83 
    84 To debug this you should launch your 3D graphic program (eg: simulator) with the LIBGL_DEBUG environment variable set to verbose.
    85 For example
    86 {{{
    87 $ LIBGL_DEBUG=verbose ./LineFollower_simulator_nrt -n x4_0 -t x4 -a 127.0.0.1 -p 9000 -x setup_x4.xml (...)
    88 }}}
    89 Notice the line that look like {{{ libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/x86_64-linux-gnu/dri/i965_dri.so) }}}.
    90 This means that the local system driver needs a version of libstdc++.so.6 that defines the symbol CXXABI_1.3.9 (meaning application binary interface version 1.3.9).
    91 The version of libstdc++ included in robomap3 probably doesn't define this symbol. You can make sure with
    92 {{{
    93 strings /.../robomap3/1.7.3/core2-64/sysroots/core2-64-poky-linux/usr/lib/libstdc++.so.6 | grep CXXABI_
    94 }}}
    95 So we need to preload the libstdc++ library of the system to avoid robomap3 one to be loaded.
    96 To achieve this we need to set the LD_PRELOAD environment variable like this
    97 {{{
    98 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./LineFollower_simulator_nrt ...
    99 }}}
    100 
    101 
    102 Stopping here may be enough, but you then can see errors like {{{ i965_dri.so: undefined symbol: nouveau_drm_new }}}.
    103 
    104 Same problem: the driver needs a version of a library (here libdrm_nouveau.so.2) which defines a specific symbol that doesn't exist in robomap3 version (yet).
    105 
    106 Same solution: preload the local system library.
    107 Repeat this until all unresolved symbols are gone.
    108 
    109 On ubuntu 16.10 with robomap3 1.7.3, I ended up with the following
    110 {{{
    111 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/usr/lib/x86_64-linux-gnu/libdrm_intel.so.1:/usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2:/usr/lib/x86_64-linux-gnu/libdrm_radeon.so.1  ./LineFollower_simulator_nrt -n x4_0 -t x4 ...
    112 }}}
    113 To avoid setting this variable every time, you can modify the script used to launch the program (usually in build/bin, eg: simulator_xx.sh) and add this line __after__ the first one
    114 {{{
    115 export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/usr/lib/x86_64-linux-gnu/libdrm_intel.so.1:/usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2:/usr/lib/x86_64-linux-gnu/libdrm_radeon.so.1
    116 }}}