Try to build Android 7 on ArchLinux - needs help

174 views
Skip to first unread message

Denis Ciocca

unread,
Oct 24, 2016, 12:50:11 PM10/24/16
to Android Building
Hi guys,

I know. It is not supported. But...I like to use my arch linux and I don't want to switch every time to use ubuntu just to build android.
I'm trying to compile Android 7. I installed virtualenv2 and all libraries needed. As soon as I try to compile for hikey I get:

[  0% 12/43703] build out/target/product/hikey/boot_fat.uefi.img
FAILED: /bin/bash -c "(dd if=/dev/zero of=out/target/product/hikey/boot_fat.uefi.img bs=512 count=98304 ) && (mkfs.fat -n \"boot\" out/target/product/hikey/boot_fat.uefi.img ) && (mcopy -i
out/target/product/hikey/boot_fat.uefi.img out/target/product/hikey/kernel ::Image ) && (mcopy -i out/target/product/hikey/boot_fat.uefi.img out/target/product/hikey/hi6220-hikey.dtb ::hi62
20-hikey.dtb ) && (mcopy -s -i out/target/product/hikey/boot_fat.uefi.img device/linaro/hikey/bootloader/* :: ) && (mcopy -i out/target/product/hikey/boot_fat.uefi.img out/target/product/hi
key/ramdisk.img ::ramdisk.img )"
98304+0 records in
98304+0 records out
50331648 bytes (50 MB, 48 MiB) copied, 0.274155 s, 184 MB/s
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
mkfs.fat 4.0 (2016-05-06)
Total number of sectors (98304) not a multiple of sectors per track (63)!
Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
[  0% 12/43703] host C++: libadb <= system/core/adb/transport.cpp

[  0% 12/43703] Docs droiddoc: out/target/common/docs/api-stubs
DroidDoc took 41 sec. to write docs to out/target/common/docs/api-stubs
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:149: ninja_wrapper] Error 


Anyone have experience building on arch? Anyone can help me how to check and read ninja log output?

Thanks a lot,
Denis

Chih-Wei Huang

unread,
Oct 28, 2016, 1:54:00 AM10/28/16
to Android Building
Just run the fail commands to see what error it is exactly.
I suspect you didn't install mcopy?

Denis Ciocca於 2016年10月25日星期二 UTC+8上午12時50分11秒寫道:

Denis Ciocca

unread,
Oct 29, 2016, 12:24:08 PM10/29/16
to Android Building
Hi Chih-Wei,

thanks for your answer. Following your suggestion, I finally find out that this makefile break the build:

in fact if I remove it I'm able to build the code.
What it's strange is that if I type the command directly in the command line it's actually working...

So maybe it is related with return code from bash?

Thanks,
Denis
Reply all
Reply to author
Forward
0 new messages