When compiling Android Automotive OS on Arch Linux using this guide you might get an error like this on the last stage of compiling:

FAILED: out/target/product/generic_x86_64/system-qemu.img
/bin/bash -c "(export SGDISK=out/host/linux-x86/bin/sgdisk SIMG2IMG=out/host/linux-x86/bin/simg2img;      device/generic/goldfish/tools/mk_combined_img.py -i out/target/product/generic_x86_64/system-qemu-config.txt -o out/target/product/generic_x86_64/system-qemu.img)"
  File "device/generic/goldfish/tools/mk_combined_img.py", line 48
    print "'%s' cannot be converted to int" % (line[2])
          ^
SyntaxError: invalid syntax
1

There are 1 answers

2
Baby Yoda On

If you are getting this error when compiling AOSP on Arch linux, you need to go to the file /android/device/generic/goldfish/tools/mk_combined_img.py and change the first line: #!/usr/bin/python to #!/usr/bin/python2

It should compile fine now...