PX4 / PX4-user_guide

PX4 User Guide

Home Page:https://docs.px4.io/main/en/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I ran into a problem running the command px4_sitl jmavsim

zhangshuaiqing opened this issue · comments

when I run command
make px4_sitl jmavsim
then return
-- PX4 version: 4b99bd2077
-- PX4 config file: /home/zsq/package/PX4_about/PX4-Autopilot/boards/px4/sitl/default.cmake
-- PX4 config: px4_sitl_default
-- PX4 platform: posix
-- PX4 lockstep: enabled
-- cmake build type: RelWithDebInfo
-- The CXX compiler identification is GNU 9.4.0
-- The C compiler identification is GNU 9.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- 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
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Building for code coverage
-- ccache enabled (export CCACHE_DISABLE=1 to disable)
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3")
Checked src/lib/ecl submodule, ACTION REQUIRED:

Different commits:

  • src/lib/ecl b3c1bd6...5d34d7a:
    Warn: src/lib/ecl doesn't contain commit b3c1bd6d40952a9d467497162f91f28400ae0a3d

  • IF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS): *
  • Hit 'u' and to update ALL submodules and resolve this. *
  • (performs git submodule sync --recursive *
  • and git submodule update --init --recursive ) *

Only for EXPERTS:
src/lib/ecl submodule is not in the recommended version.
Hit 'y' and to continue the build with this version. Hit to resolve manually.
Use git add src/lib/ecl && git commit -m 'Updated src/lib/ecl' to choose this version (careful!)

y
Continuing build with manually overridden submodule..
Checked src/lib/matrix submodule, ACTION REQUIRED:

Different commits:

  • src/lib/matrix 3679f7f...c8da796:
    Warn: src/lib/matrix doesn't contain commit 3679f7fd5160c7d2a8271b1134ca1e601f1a4254

  • IF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS): *
  • Hit 'u' and to update ALL submodules and resolve this. *
  • (performs git submodule sync --recursive *
  • and git submodule update --init --recursive ) *

Only for EXPERTS:
src/lib/matrix submodule is not in the recommended version.
Hit 'y' and to continue the build with this version. Hit to resolve manually.
Use git add src/lib/matrix && git commit -m 'Updated src/lib/matrix' to choose this version (careful!)

y
Continuing build with manually overridden submodule..
-- build type is RelWithDebInfo
-- PX4 ECL: Very lightweight Estimation & Control Library 5d34d7a
Checked src/drivers/gps/devices submodule, ACTION REQUIRED:

Different commits:

  • src/drivers/gps/devices c278eb4...f2eb62c:
    Warn: src/drivers/gps/devices doesn't contain commit c278eb48e1b57e6b789242324e28581caf9ccf96

  • IF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS): *
  • Hit 'u' and to update ALL submodules and resolve this. *
  • (performs git submodule sync --recursive *
  • and git submodule update --init --recursive ) *

Only for EXPERTS:
src/drivers/gps/devices submodule is not in the recommended version.
Hit 'y' and to continue the build with this version. Hit to resolve manually.
Use git add src/drivers/gps/devices && git commit -m 'Updated src/drivers/gps/devices' to choose this version (careful!)

y
Continuing build with manually overridden submodule..
Checked mavlink/include/mavlink/v2.0 submodule, ACTION REQUIRED:

Different commits:


  • IF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS): *
  • Hit 'u' and to update ALL submodules and resolve this. *
  • (performs git submodule sync --recursive *
  • and git submodule update --init --recursive ) *

Only for EXPERTS:
mavlink/include/mavlink/v2.0 submodule is not in the recommended version.
Hit 'y' and to continue the build with this version. Hit to resolve manually.
Use git add mavlink/include/mavlink/v2.0 && git commit -m 'Updated mavlink/include/mavlink/v2.0' to choose this version (careful!)

y
Continuing build with manually overridden submodule..
-- ROMFS: ROMFS/px4fmu_common
Checked Tools/sitl_gazebo submodule, ACTION REQUIRED:

Different commits:

  • Tools/sitl_gazebo 6b6f474...b195315 (1):

    Revert "Pr liftdrag coefficients (#690)" (#730)


  • IF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS): *
  • Hit 'u' and to update ALL submodules and resolve this. *
  • (performs git submodule sync --recursive *
  • and git submodule update --init --recursive ) *

Only for EXPERTS:
Tools/sitl_gazebo submodule is not in the recommended version.
Hit 'y' and to continue the build with this version. Hit to resolve manually.
Use git add Tools/sitl_gazebo && git commit -m 'Updated Tools/sitl_gazebo' to choose this version (careful!)

y
Continuing build with manually overridden submodule..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zsq/package/PX4_about/PX4-Autopilot/build/px4_sitl_default
[0/809] git submodule src/drivers/gps/devices
Checked src/drivers/gps/devices submodule, ACTION REQUIRED:

Different commits:

  • src/drivers/gps/devices c278eb4...f2eb62c:
    Warn: src/drivers/gps/devices doesn't contain commit c278eb48e1b57e6b789242324e28581caf9ccf96

  • IF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS): *
  • Hit 'u' and to update ALL submodules and resolve this. *
  • (performs git submodule sync --recursive *
  • and git submodule update --init --recursive ) *

Only for EXPERTS:
src/drivers/gps/devices submodule is not in the recommended version.
Hit 'y' and to continue the build with this version. Hit to resolve manually.
Use git add src/drivers/gps/devices && git commit -m 'Updated src/drivers/gps/devices' to choose this version (careful!)

y
Continuing build with manually overridden submodule..
[11/809] Generating git version header
FAILED: src/lib/version/build_git_version.h
cd /home/zsq/package/PX4_about/PX4-Autopilot && /usr/bin/python3 /home/zsq/package/PX4_about/PX4-Autopilot/src/lib/version/px_update_git_header.py /home/zsq/package/PX4_about/PX4-Autopilot/build/px4_sitl_default/src/lib/version/build_git_version.h --validate

Error: the git tag '4b99bd2077' does not match the expected format.

The expected format is 'v[-]'
: v..[-rc|-beta|-alpha|-dev]
: ..[-rc|-beta|-alpha|-dev]
Examples:
v1.9.0-rc3 (preferred)
v1.9.0-beta1
v1.9.0-1.0.0
v1.9.0-1.0.0-alpha2
See also https://dev.px4.io/master/en/setup/building_px4.html#firmware_version

[16/809] Generating uORB topic headers
ninja: build stopped: subcommand failed.
make: *** [Makefile:228: px4_sitl] Error 1

what should I do to fix this problem

This happens because you have submodules that don't match the precise build of PX4 that you are using. YOu may have changed branches or similar. THe fix is described here: https://docs.px4.io/main/en/contribute/git_examples.html#changing-source-trees

Essentially you need to clean your environment:

make distclean
make clean
make submodulesclean

Then you should be able to build without all those errors.