flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

build fails when using ./fbt

Open jayashree505 opened this issue 2 years ago • 9 comments

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

jayashree505 avatar Oct 19 '22 21:10 jayashree505

How did you get the source code? GIt clone or zip archive?

hedger avatar Oct 19 '22 23:10 hedger

I git cloned it using the following command:

$ git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git

jayashree505 avatar Oct 19 '22 23:10 jayashree505

Can you show the output of git rev-parse --short HEAD in repo root dir? And the return code after running it manually, echo $?

hedger avatar Oct 20 '22 08:10 hedger

On running git rev-parse --short HEAD, I get 9a9abd59

May I know which return code you are looking for?

jayashree505 avatar Oct 20 '22 10:10 jayashree505

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.

hedger avatar Oct 20 '22 18:10 hedger

Hi, On running git rev-parse --short HEAD, I get 9a9abd59 in both cases. Also, the return code is 0 in both cases.

jayashree505 avatar Oct 20 '22 22:10 jayashree505

Same problem. Return code is 0 in both cases.

pavllan90 avatar Nov 22 '22 15:11 pavllan90

On which platform you guys trying to build?

skotopes avatar Dec 01 '22 17:12 skotopes

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.

steam3d avatar Dec 11 '22 09:12 steam3d

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.

hedger avatar Jan 11 '23 15:01 hedger