Firmware build fails after forking and integrating sitl_gazebo fork

Hi All,
I’ve made a fork of px4 Firmware repository and sitl_gazebo repository. I’ve repointed the sitl_gazebo in Firmware respository to my fork. When I try to build after this change I get an error. I’d like to know how to do this correctly to avoid the error.

$make px4_sitl gazebo_xe4t
[5/561] Generating git version header
FAILED: src/lib/version/build_git_version.h
cd /home/albert/gitgkk/Firmware && /usr/bin/python3 /home/albert/gitgkk/Firmware/src/lib/version/px_update_git_header.py /home/albert/gitgkk/Firmware/build/px4_sitl_default/src/lib/version/build_git_version.h --validate
Traceback (most recent call last):
File “/home/albert/gitgkk/Firmware/src/lib/version/px_update_git_header.py”, line 41, in
stderr=subprocess.STDOUT).decode(‘utf-8’).strip()
File “/usr/lib/python3.6/subprocess.py”, line 356, in check_output
**kwargs).stdout
File “/usr/lib/python3.6/subprocess.py”, line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘git’, ‘describe’, ‘–always’, ‘–tags’, ‘–dirty’]’ returned non-zero exit status 128.
[7/561] Building C object platforms/common/work_queue/CMakeFiles/work_queue.dir/sq_remfirst.c.o
ninja: build stopped: subcommand failed.
Makefile:205: recipe for target ‘px4_sitl’ failed

Thanks,
Kashyap

This problem usually occurs when the locale on your system is not set correctly.

What does locale output?

Hello @JulianOes
Here’s the output:
LANG=en_IN
LANGUAGE=en_IN:en
LC_CTYPE=“en_IN”
LC_NUMERIC=“en_IN”
LC_TIME=“en_IN”
LC_COLLATE=“en_IN”
LC_MONETARY=“en_IN”
LC_MESSAGES=“en_IN”
LC_PAPER=“en_IN”
LC_NAME=“en_IN”
LC_ADDRESS=“en_IN”
LC_TELEPHONE=“en_IN”
LC_MEASUREMENT=“en_IN”
LC_IDENTIFICATION=“en_IN”
LC_ALL=

Aha, the other thing could be that you don’t have the version tags. Make sure to do a git fetch and check that all tags are available if you do git tag or check git log.

1 Like

Hi @JulianOes git fetch solved the issue.

Thanks,
Kashyap

1 Like