The environment is :
Win7 x 64 host + Ubuntu14.04 x64 VM on VMWare Workstation 12
source is AOSP 9.0.0_r30
the build error is:
xargs:
/OpenSource/Build/Android-9.0.0_r30/src-9.0.0_r30/host/linux-x86/bin/hiddenapi:
terminated by signal 4
The right answer is here: https://github.com/sonyxperiadev/bug_tracker/issues/207
The reason is that my build host CPU(Q6600) doesn't support SSE4 instruction.
The project art require SSE4 because in
art\build\Android.bp
there are these cflags:
"-msse4.2",
"-mpopcnt",
and the sub project
art\tools\hiddenapi
inherit these cflags and so the output host executable "hiddenapi" will contain SSE4 instruction and trigger SIGILL during build.
according to the end of this page:https://superuser.com/questions/726395/how-to-check-if-a-binary-requires-sse4-or-avx-on-linux , you can verify this with:
objdump -d /OpenSource/Build/Android-9.0.0_r30/src-9.0.0_r30/host/linux-x86/bin/hiddenapi> ~/hiddenapi.asm
note:my OUT_DIR_COMMON_BASE is set to
/OpenSource/Build/Android-9.0.0_r30/
then
gawk '/\<(mpsadbw|phminposuw|pmulld|pmuldq|dpps|dppd|blendps|blendpd|blendvps|blendvpd|pblendvb|pblenddw|pminsb|pmaxsb|pminuw|pmaxuw|pminud|pmaxud|pminsd|pmaxsd|roundps|roundss|roundpd|roundsd|insertps|pinsrb|pinsrd|pinsrq|extractps|pextrb|pextrd|pextrw|pextrq|pmovsxbw|pmovzxbw|pmovsxbd|pmovzxbd|pmovsxbq|pmovzxbq|pmovsxwd|pmovzxwd|pmovsxwq|pmovzxwq|pmovsxdq|pmovzxdq|ptest|pcmpeqq|pcmpgtq|packusdw|pcmpestri|pcmpestrm|pcmpistri|pcmpistrm|crc32|popcnt|movntdqa|extrq|insertq|movntsd|movntss|lzcnt)\>/' ~/hiddenapi.asm
then you will see that it contains one SSE4 instruction...
After remove the above cflags the source will build successfully.But whether this will produce any bug is unknown now,though since the cflags seems to only affect host executable,the chance is low.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With