ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Unable to build px4 using rb5-flight-px4-build-docker

    Ask your questions right here!
    1
    2
    69
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Gary HolmgrenG
      Gary Holmgren
      last edited by

      So I followed the step to build the px4 docker here with quite the hassle of installing hexigon 4.1.0.4 in a fresh ubuntu 20.04LTS VM. then tar that into the px4-docker project and build.

      I cloned the voxl-px4 projec to run my new docker image

      rb5-flight-px4-build-docker   latest    0510293c3675   2 hours ago     8.09GB
      rb5-flight-px4-build-docker   v1.5      0510293c3675   2 hours ago     8.09GB
      base-px4-build-docker         v1.4      3095b633bdc3   21 months ago   2.03GB
      

      as they built successfully.

      when checking out a stable release say v1.14.0-2.0.85 to test this new build and of course using git submodule update --init --recursive followed by ./run-docker.sh >/clean.sh >./build.sh I end up with a failed build and am greeted with these errors.

      root@0fcde4b59dca:/usr/local/workspace# ./build.sh 
      *** Starting build ***
      
      Setting up the Hexagon SDK environment locally
      HEXAGON_SDK_ROOT is : /home/4.1.0.4
      Setting up the QAIC binary for the platform
      make: Entering directory '/home/4.1.0.4/ipc/fastrpc/qaic'
      make: 'bin/qaic' is up to date.
      make: Leaving directory '/home/4.1.0.4/ipc/fastrpc/qaic'
      Could not find Androd ndk at /home/4.1.0.4/tools/android-ndk-r19c
      
      Please refer to /home/4.1.0.4/docs/tools/setup.html for installing the missed components
      
      *** Starting dependencies build ***
      -- The C compiler identification is GNU 7.5.0
      -- The CXX compiler identification is GNU 9.4.0
      -- Check for working C compiler: /home/4.1.0.4/tools/linaro64/bin/aarch64-linux-gnu-gcc
      -- Check for working C compiler: /home/4.1.0.4/tools/linaro64/bin/aarch64-linux-gnu-gcc -- works
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Check for working CXX compiler: /usr/bin/c++
      -- Check for working CXX compiler: /usr/bin/c++ -- works
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /usr/local/workspace/px4-firmware/boards/modalai/voxl2/libfc-sensor-api/build
      Scanning dependencies of target fc_sensor
      [ 50%] Building C object CMakeFiles/fc_sensor.dir/src/fc_sensor_stub.c.o
      [100%] Linking C shared library libfc_sensor.so
      [100%] Built target fc_sensor
      *** End of dependencies build ***
      *** Starting apps processor build ***
      -- PX4 version: v1.14.0-2.0.85-dev (1.14.0)
      -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") 
      -- PX4 config file: /usr/local/workspace/px4-firmware/boards/modalai/voxl2/default.px4board
      -- PLATFORM posix
      -- LINUX_TARGET y
      -- TOOLCHAIN aarch64-linux-gnu
      -- ROMFSROOT px4fmu_common
      -- ROOTFSDIR /data/px4
      -- PX4 config: modalai_voxl2_default
      -- PX4 platform: posix
      -- PX4 lockstep: disabled
      -- The CXX compiler identification is GNU 7.5.0
      -- The C compiler identification is GNU 7.5.0
      -- The ASM compiler identification is GNU
      -- Found assembler: /home/4.1.0.4/tools/linaro64/bin/aarch64-linux-gnu-gcc
      -- Check for working CXX compiler: /home/4.1.0.4/tools/linaro64/bin/aarch64-linux-gnu-g++
      -- Check for working CXX compiler: /home/4.1.0.4/tools/linaro64/bin/aarch64-linux-gnu-g++ -- works
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Check for working C compiler: /home/4.1.0.4/tools/linaro64/bin/aarch64-linux-gnu-gcc
      -- Check for working C compiler: /home/4.1.0.4/tools/linaro64/bin/aarch64-linux-gnu-gcc -- works
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- cmake build type: RelWithDebInfo
      -- ccache enabled (export CCACHE_DISABLE=1 to disable)
      -- Skipping pwm file path /usr/local/workspace/px4-firmware/src/drivers/linux_pwm_out/module.yaml for VOXL2
      -- Skipping pwm file path /usr/local/workspace/px4-firmware/src/drivers/pca9685_pwm_out/module.yaml for VOXL2
      -- Skipping pwm file path /usr/local/workspace/px4-firmware/src/drivers/pwm_out/module.yaml for VOXL2
      -- Skipping pwm file path /usr/local/workspace/px4-firmware/src/modules/simulation/pwm_out_sim/module_hil.yaml for VOXL2
      -- Skipping pwm file path /usr/local/workspace/px4-firmware/src/modules/simulation/pwm_out_sim/module_sim.yaml for VOXL2
      -- ROMFS: ROMFS/px4fmu_common
      Architecture:  amd64
      ==> CPACK_INSTALL_PREFIX = @DEB_INSTALL_PREFIX@
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /usr/local/workspace/px4-firmware/build/modalai_voxl2_default
      [0/562] git submodule src/modules/microdds_client/Micro-XRCE-DDS-Client
      [6/562] git submodule src/drivers/gps/devices
      [10/562] git submodule src/modules/mavlink/mavlink
      [269/562] Performing configure step for 'libmicroxrceddsclient_project'
      -- libmicroxrceddsclient_project configure command succeeded.  See also /usr/local/workspace/px4-firmware/build/modalai_voxl2_default/src/modules/microdds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-configure-*.log
      [383/562] Performing build step for 'libmicroxrceddsclient_project'
      -- libmicroxrceddsclient_project build command succeeded.  See also /usr/local/workspace/px4-firmware/build/modalai_voxl2_default/src/modules/microdds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-build-*.log
      [427/562] Performing install step for 'libmicroxrceddsclient_project'
      -- libmicroxrceddsclient_project install command succeeded.  See also /usr/local/workspace/px4-firmware/build/modalai_voxl2_default/src/modules/microdds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-install-*.log
      [562/562] Linking CXX executable bin/px4
      
      /* Auto Magically Generated file */
      /* Do not edit! */
      #pragma once
      
      #define PX4_GIT_VERSION_STR "039064b897cf0a123bc1badb269e352186c8946d"
      #define PX4_GIT_VERSION_BINARY 0x039064b897cf0a12
      #define PX4_GIT_TAG_STR "v1.14.0-2.0.85-dev"
      #define PX4_GIT_BRANCH_NAME ""
      
      #define PX4_GIT_OEM_VERSION_STR  ""
      
      #define PX4_GIT_TAG_OR_BRANCH_NAME "v1.14.0-2.0.85-dev" // special variable: git tag, release or master branch
      
      #define MAVLINK_LIB_GIT_VERSION_STR  "3ee5382d0c96134b0e1c250d8c2d54bfed0166fa"
      #define MAVLINK_LIB_GIT_VERSION_BINARY 0x3ee5382d0c96134b
      
      #define NUTTX_GIT_VERSION_STR  "3f77354c0dc88793a47ff3b57595195ab45f7ba9"
      #define NUTTX_GIT_VERSION_BINARY 0x3f77354c0dc88793
      #define NUTTX_GIT_TAG_STR  "v11.0.0"
      *** End of apps processor build ***
      *** Starting qurt slpi build ***
      -- PX4 version: v1.14.0-2.0.85-dev (1.14.0)
      -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") 
      -- PX4 config file: /usr/local/workspace/px4-firmware/boards/modalai/voxl2-slpi/default.px4board
      -- PLATFORM qurt
      -- TOOLCHAIN qurt
      -- ROMFSROOT px4fmu_common
      -- PX4 config: modalai_voxl2-slpi_default
      -- PX4 platform: qurt
      -- The CXX compiler identification is Clang 10.0.0
      -- The C compiler identification is Clang 10.0.0
      -- The ASM compiler identification is unknown
      -- Found assembler: /home/4.1.0.4/tools/HEXAGON_Tools/8.4.05/Tools/bin/hexagon-clang
      -- Check for working CXX compiler: /home/4.1.0.4/tools/HEXAGON_Tools/8.4.05/Tools/bin/hexagon-clang++
      -- Check for working CXX compiler: /home/4.1.0.4/tools/HEXAGON_Tools/8.4.05/Tools/bin/hexagon-clang++ -- broken
      CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message):
        The C++ compiler
      
          "/home/4.1.0.4/tools/HEXAGON_Tools/8.4.05/Tools/bin/hexagon-clang++"
      
        is not able to compile a simple test program.
      
        It fails with the following output:
      
          Change Dir: /usr/local/workspace/px4-firmware/build/modalai_voxl2-slpi_default/CMakeFiles/CMakeTmp
          
          Run Build Command(s):/usr/bin/ninja cmTC_05fc1 && [1/2] Building CXX object CMakeFiles/cmTC_05fc1.dir/testCXXCompiler.cxx.o
          [2/2] Linking CXX executable cmTC_05fc1
          FAILED: cmTC_05fc1 
          : && /home/4.1.0.4/tools/HEXAGON_Tools/8.4.05/Tools/bin/hexagon-clang++  -Wno-inconsistent-missing-override -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__ -mv66 -G0 -O3   -Wno-inconsistent-missing-override -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__ -mv66 -G0 -O3  -Wno-inconsistent-missing-override -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__ -mv66 -G0 -O3 -Wno-inconsistent-missing-override -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__ -mv66 -G0 -O3  -mv66 -mG0lib -G0 -fpic -shared -Wl,-Bsymbolic -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=realloc -Wl,--wrap=memalign -Wl,--wrap=__stack_chk_fail -Wl,/home/4.1.0.4/tools/HEXAGON_Tools/8.4.05/Tools/target/hexagon/lib/v66/G0/pic/libc++.a -lc -mv66 -mG0lib -G0 -fpic -shared -Wl,-Bsymbolic -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=realloc -Wl,--wrap=memalign -Wl,--wrap=__stack_chk_fail -Wl,/home/4.1.0.4/tools/HEXAGON_Tools/8.4.05/Tools/target/hexagon/lib/v66/G0/pic/libc++.a -lc CMakeFiles/cmTC_05fc1.dir/testCXXCompiler.cxx.o  -o cmTC_05fc1   && :
          hexagon-clang++: error: unable to execute command: Executable "hexagon-link" doesn't exist!
          hexagon-clang++: error: hexagon-link command failed with exit code 1 (use -v to see invocation)
          ninja: build stopped: subcommand failed.
          
          
      
        
      
        CMake will not be able to correctly generate this project.
      Call Stack (most recent call first):
        CMakeLists.txt:219 (project)
      
      
      -- Configuring incomplete, errors occurred!
      See also "/usr/local/workspace/px4-firmware/build/modalai_voxl2-slpi_default/CMakeFiles/CMakeOutput.log".
      See also "/usr/local/workspace/px4-firmware/build/modalai_voxl2-slpi_default/CMakeFiles/CMakeError.log".
      Error: /usr/local/workspace/px4-firmware/build/modalai_voxl2-slpi_default is not a directory
      make: *** [Makefile:232: modalai_voxl2-slpi] Error 1
      cat: build/modalai_voxl2-slpi_default/src/lib/version/build_git_version.h: No such file or directory
      *** End of qurt slpi build ***
      /usr/local/workspace
      User ID is 1000
      Group ID is 1000
      *** End of build ***
      

      So as i followed the guides as EXACTLY as they described I am not sure whats going on with it and the tweaks I am trying are not working. Please let me know what I am missing here. Thanks!

      Gary HolmgrenG 1 Reply Last reply Reply Quote 0
      • Gary HolmgrenG
        Gary Holmgren @Gary Holmgren
        last edited by

        @Gary-Holmgren Was able to fix it with bash chmod +x /home/4.1.0.4/tools/HEXAGON_Tools/8.4.05/Tools/bin/ld.qcld (while in the docker image of course)
        It appeared hexagon-link was a symbolic link and making it executable fixed the target not having permissions. Hope this helps someone with a similar issue.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB | Contributors