RB5 PX4 Debian Build Failing



  • Hello,

    I am having trouble getting the RB5 flight PX4 version to build. I have been following the steps here: https://gitlab.com/voxl-public/rb5-flight/rb5-flight-px4-build-docker

    And trying to build branch: v1.4.9-modalai-rb5-flight-alpha
    at https://github.com/modalai/px4-firmware

    So far I have:

    • Installed and run the correct Docker container: rb5-flight-px4-build-docker:v1.1

    • Installed, zipped, and unzipped Hexagon SDK 4.1.0.4 into the /home directory in the docker container

    • Cloned PX4 into /usr/local/workspace

    • Run source build-env.sh from /home to set toolchain variables

    • Run make modalai_rb5-flight_qurt

    Running this starts off with a cmake error saying that no gcc cross compiling toolchain has been found:

    -- PX4 version: v1.4.9-modalai-rb5-flight-alpha
    -- PX4 config file: /usr/local/workspace/px4-firmware/boards/modalai/rb5-flight/qurt.cmake
    -- *** Entering qurt.cmake ***
    CMake Error at boards/modalai/cmake_hexagon/toolchain/Toolchain-qurt.cmake:140 (message):
      No supported version of ARMv7hf GCC cross compiler found in /bin
    Call Stack (most recent call first):
      boards/modalai/rb5-flight/qurt.cmake:21 (include)
      CMakeLists.txt:144 (include)
    

    I found that boards/modalai/cmake_hexagon/toolchain/Toolchain-qurt.cmake
    Does not look for /home/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu

    https://github.com/modalai/px4-firmware/blob/v1.4.10-modalai-rb5-flight-alpha/boards/modalai/cmake_hexagon/toolchain/Toolchain-qurt.cmake#L123

    So I added the line:

    elseif (EXISTS "${HEXAGON_SDK_ROOT}/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu")
                    set(ARM_CROSS_GCC_ROOT "${HEXAGON_SDK_ROOT}/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu")
    

    And moved /home/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu to
    ${HEXAGON_SKD_ROOT}/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu

    After the Cmake error from above it continues to build the binaries and compile the source code and finishes with 100% compilation.

    However, when running:

    ./build-package.sh under px4-firmware/boards/modalai/rb5-flight

    The script complains about not finding libpx4.so so I know that my build process was incomplete.

    @Eric-Katzfey I see that you are a main contributor to these repositories and I am wondering if you could share your latest steps for building the px4 debian compilation. We want to incorporate your changes into our version of px4.

    I know this was a long post so I apologize, I am just attempting to be as detailed as possible. Thank you!


  • Dev Team

    @mrawding It appears that you may have missed some steps. There are really 2 separate parts to this. The first is to build the docker image needed for a px4 build. The second is to use the docker image to build px4. According to the instructions the first thing to do is to install and then archive the Hexagon SDK. But I don't see that in your steps above. It appears like you are running the base Docker image and then trying to install the Hexagon SDK directly into it. The only things done in the container are the 4 steps at the end that are prefaced with "In the Docker:". All of the rest of the steps are preparing a Docker image for those final 4 commands.



  • Sorry I see the step I missed! I'll give it a try soon. Thank you for clearing that up for me.


Log in to reply