Installing PX4 on bebop 2: c++ library error

Hello there,

For a school project we are using the parrot bebop 2 drone, for which we aim to develop a specific ground control system using PX4. When following the tutorial at Building the Code · PX4 Developer Guide we ran into two problems:

  1. Instead of a px4 file appearing in the /usr/bin folder, a px4.stripped file appears. In our local build folder (before doing make posix_bebop_default upload) we do have a px4 file, but it does not get uploaded to the drone.
  2. When following the rest of the tutorial using px4.stripped /home/root/px4.config, we get this error: /lib/libstdc++.so.6: version 'GLIBCXX_3.4.21' not found (required by ./px4). If we understand this error correctly, this means that the compiler had more c++ libraries available than there are installed on the drone. Indeed, only GLIBCXX libraries up to 19 or 20 are installed on the drone. Is it possible to either install these libraries on the drone (using telnet or adb or another method) or either compile the files without using the libraries so the built product works on the drone?

Any help is highly appreciated, thank you.

EDIT: We used the gcc-arm-linux-gnueabihf and g++-arm-linux-gnueabihf toolchains when building.

any updates on this? I’m having the same problem

I am trying to use v1.8.0 on bebop2 and see that it is px4.stripped, not px4 file that gets copied. px4 seem to be much bigger than px4.stripped, so I assume stripped means ‘stripped down version’.

when i run px4.stripped i see this glibc error mentioned above.

did anyone solve this?

I tried to adb push the “px4” file and I actually ran out of device space on the bebop 2.

In the issue above they tried to solve this problem by using strip, but I think that’s where something went wrong. I’m going to try to find a working commit instead of trying to configure the bebop to use the compilers you said.

well, I think the problem is that Ubuntu upgraded gcc cross compiler for ARM recently and it now uses libc of higher version than the one available on Bebop 2. I see other projects reporting same issue with the library version. unfortunately i cannot see how to downgrade crosscompiler on Ubuntu to match bebop library version. and I am not sure how to upgrade Bebop to have more up to date glibc. if anyone has a fix, will be glad to hear!

do you know where the glibc library is located on the bebop 2? I can’t seem to find it

addressed the issue