AOSP mk_combined_img error

568 views
Skip to first unread message

Nate Robbins

unread,
Sep 7, 2020, 5:44:23 PM9/7/20
to Android Building
Hi. I am building AOSP tag android-10.0.0_r45 for the sdk_phone_x86_64 target. When the build is almost complete, it fails with this error:

Starting ninja...
[ 99% 453/454] Create system-qemu.img now
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
[100% 454/454] build check-all-partition-sizes
The sum of sizes of [system vendor] is within BOARD_SUPER_PARTITION_SIZE:
1470169088+119820288 == 1589989376 <= 3229614080 == 3229614080
The sum of sizes of [system vendor] is within BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE:
1470169088+119820288 == 1589989376 <= 3221225472 == 3221225472
The sum of sizes of [emulator_dynamic_partitions] is within BOARD_SUPER_PARTITION_SIZE:
3221225472 == 3221225472 <= 3229614080 == 3229614080
ninja: build stopped: subcommand failed.
17:53:18 ninja failed with: exit status 1

[0;31m#### failed to build some targets (02:11 (mm:ss)) #### [00m

From what I've gathered searching, it's related to using the wrong version of python. However, I'm running the make command inside a python2 virtual environment, and so the command 'python -V' returns 2.7.18. 


Any help solving this issue would be greatly appreciated. Thanks :)

Nate Robbins

unread,
Sep 8, 2020, 10:54:27 AM9/8/20
to Android Building
I have also received the same error building the aosp_x86_64-eng target.

Nate Robbins

unread,
Sep 8, 2020, 10:54:31 AM9/8/20
to Android Building
I noticed that for the file in the master branch, it has brackets around the offending line, which I've also seen in commits for making this file compatible with Python3 (although I'm using Python2), and which apparently solve the issue. However, these brackets do not exist in the r45 tag version - why is this?

I expected AOSP to be buildable unmodified for default targets. Should I make the changes manually, or will they get updated soon?


Thanks :)
Reply all
Reply to author
Forward
0 new messages