flipperzero-firmware
flipperzero-firmware copied to clipboard
build fails when using ./fbt
Describe the bug.
subprocess.CalledProcessError: Command '['git', 'rev-parse', '--short', 'HEAD']' returned non-zero exit status 128. CC lib/ST25RFAL002/source/st25r3916/st25r3916_led.c CC lib/ST25RFAL002/source/custom_analog_config.c scons: *** [build/f7-firmware-D/toolbox/version.inc.h] Error 1 ********** ERRORS ********** Failed building build/f7-firmware-D/toolbox/version.inc.h: Error 1
Reproduction
runing the ./fbt
Target
No response
Logs
No response
Anything else?
No response
How did you get the source code? GIt clone or zip archive?
I git cloned it using the following command:
$ git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git
Can you show the output of git rev-parse --short HEAD
in repo root dir?
And the return code after running it manually, echo $?
On running git rev-parse --short HEAD
, I get 9a9abd59
May I know which return code you are looking for?
I'm looking for that command's return code. It can be displayed by running echo $?
after it.
For some reason, that command fails when it's being invoked by fbt. Let's make sure its return code is 0 when running in normal shell.
After that, please spawn fbt shell (by executingsource scripts/toolchain/fbtenv.sh
in your terminal) and re-run git command and return code check.
Hi, On running git rev-parse --short HEAD, I get 9a9abd59 in both cases. Also, the return code is 0 in both cases.
Same problem. Return code is 0 in both cases.
On which platform you guys trying to build?
I have the same issue. I use VirtualBox with Ubuntu.
Distributor ID: Ubuntu Description: Ubuntu 22.10 Release: 22.10 Codename: kinetic
git rev-parse --short HEAD
Result:
27921e42
source scripts/toolchain/fbtenv.sh
Result:
Please source this script from [u]fbt root directory, or specify 'SCRIPT_PATH' variable manually
Example:
SCRIPT_PATH=lang/c/flipperzero-firmware source lang/c/flipperzero-firmware/scripts/fbtenv.sh
If current directory is right, type 'unset SCRIPT_PATH' and try again
I tired this. Nothing changed.
unset scripts/toolchain/fbtenv.sh
source scripts/toolchain/fbtenv.sh
UPD:
I removed everything and I again git clone --recursive
into different folder. Everything works now.
Tried multiple system configurations, couldn't reproduce. Maybe it's caused by incomplete/corrupted repo clone. Closing for now, reopen if you can provide additional logs or debugging info.