ninja failed with: exit status 1

4,297 views
Skip to first unread message

Carmelo Carbonara

unread,
Aug 17, 2018, 10:35:39 AM8/17/18
to Android-x86
Recommendation on how to fix recurring

 
ninja failed with: exit status 1


changed PROP_VALUE_MAX = 91 to 128 in   build/tools/post_process_props.py and in bionic/libc/include/sys/system_properties.h

build machine is debian 9.5 8 core 32GB memory

from the console

admin@vpcmgr3:~/buildOS/android-x86$ m -j8  iso_img
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=android_x86_64
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86_64
TARGET_ARCH_VARIANT=x86_64
TARGET_2ND_ARCH=x86
TARGET_2ND_ARCH_VARIANT=x86_64
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.17.0-0.bpo.1-amd64-x86_64-with-debian-9.5
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM6.171019.030.E1
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
No need to regenerate ninja file
[  0% 2/65646] Ensuring Jack server is installed and started
Jack server already installed in "/home/admin/.jack-server"
Server is already running
[  0% 7/65646] //frameworks/native/cmds/installd:installd clang++ installd.cpp
FAILED: out/soong/.intermediates/frameworks/native/cmds/installd/installd/android_x86_64_core/obj/frameworks/native/cmds/installd/installd.o 
PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-4053586/bin/clang++ -c -Iframeworks/native/cmds/installd  -fno-exceptions -Wno-multichar -O2 -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -ffunction-sections -fno-short-enums -fstrict-aliasing -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -O2 -g -fno-strict-aliasing -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -fdebug-prefix-map=$PWD/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -m64 -march=x86-64 -DUSE_SSSE3 -mssse3 -msse4 -msse4.1 -msse4.2 -mpopcnt -Iout/soong/.intermediates/frameworks/native/cmds/installd/installd/android_x86_64_core/gen/aidl -Isystem/core/base/include -Iout/soong/.intermediates/frameworks/native/libs/binder/libbinder/android_x86_64_static_core/gen/aidl -Iframeworks/native/libs/binder/include -Isystem/core/libcutils/include -Isystem/core/libutils/include -Isystem/core/libbacktrace/include -Isystem/core/liblog/include -Isystem/core/libsystem/include -Iout/soong/.intermediates/frameworks/native/libs/binder/libbinder/android_x86_64_shared_core/gen/aidl -Isystem/core/logwrapper/include -Iexternal/selinux/libselinux/include -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Isystem/core/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Ilibnativehelper/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include -isystem bionic/libc/arch-x86_64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-x86 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Ilibnativehelper/include_deprecated -Wall -Werror -target x86_64-linux-android -Bprebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin -DANDROID_STRICT -fPIE -D_USING_LIBCXX -std=gnu++14 -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -fno-rtti  -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF out/soong/.intermediates/frameworks/native/cmds/installd/installd/android_x86_64_core/obj/frameworks/native/cmds/installd/installd.o.d -o out/soong/.intermediates/frameworks/native/cmds/installd/installd/android_x86_64_core/obj/frameworks/native/cmds/installd/installd.o frameworks/native/cmds/installd/installd.cpp
frameworks/native/cmds/installd/installd.cpp:43:1: error: static_assert failed "Size mismatch."
static_assert(kPropertyValueMax == PROPERTY_VALUE_MAX, "Size mismatch.");
^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[  0% 14/65646] //frameworks/native/services/audiomanager:libaudiomanager clang++ IPlayer.cpp
ninja: build stopped: subcommand failed.
10:24:10 ninja failed with: exit status 1

#### failed to build some targets (11 seconds) ####



Carmelo Carbonara

unread,
Aug 17, 2018, 10:52:42 AM8/17/18
to Android-x86

this build is for
oreo-x86 
  • android_x86_64: for 64-bit x86_64 platform

Mauro Rossi

unread,
Aug 17, 2018, 7:04:52 PM8/17/18
to Android-x86
Hi Carmelo,
The static assert checks exactly equality with the variable you have changed

For what reason are you changing it?

In case you problem is the build id length exceeds 9x with userdebug build, it is better to just reduce the build id lenght,
with attached patch to be applied in build/core

Mauro
0001-Makefile-reduce-BUILD_FINGERPRINT-lenght-for-userdebug-builds.patch

Carmelo Carbonara

unread,
Aug 18, 2018, 5:41:07 PM8/18/18
to Android-x86

I just included what I did and deviated from in the build - based on the available building documentation

Why the change; so no science on my part; I had some errors that stopped the build referring to, 
"....build id length....PROP_VALUE_MAX exceeding 91..."



Several internet lookups recommended changing the value from 91/92 to 128 in the files build/tools/post_process_props.py and in bionic/libc/include/sys/system_properties.h and I found that property settings in those files on my local source tree



Now, ninja: build stopped: subcommand failed. 10:24:10 ninja failed with: exit status 1 keeps recurring after repeating m -j8  iso_img and slowly advancing..


a couple of questions if you would:

The patch file in your reply; is that now in the source tree? (If so I'll just repo sync and start over)

How do I apply your patch and which dir to cd to? (...or i can just modify the Makefile)

Thanks for your reply

Carmelo Carbonara

unread,
Aug 18, 2018, 10:19:33 PM8/18/18
to andro...@googlegroups.com
ok, yes the problem was with the  build id length exceeds 9x with userdebug build  so i applied your patch and restored build/tools/post_process_props.py and in bionic/libc/include/sys/system_properties.h to 91, 92 respectively
 

--
You received this message because you are subscribed to a topic in the Google Groups "Android-x86" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-x86/X0CCissgFz0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.

Mauro Rossi

unread,
Aug 19, 2018, 4:45:13 AM8/19/18
to Android-x86


Il giorno sabato 18 agosto 2018 23:41:07 UTC+2, Carmelo Carbonara ha scritto:

I just included what I did and deviated from in the build - based on the available building documentation

Why the change; so no science on my part; I had some errors that stopped the build referring to, 
"....build id length....PROP_VALUE_MAX exceeding 91..."



Several internet lookups recommended changing the value from 91/92 to 128 in the files build/tools/post_process_props.py and in bionic/libc/include/sys/system_properties.h and I found that property settings in those files on my local source tree



Now, ninja: build stopped: subcommand failed. 10:24:10 ninja failed with: exit status 1 keeps recurring after repeating m -j8  iso_img and slowly advancing..


a couple of questions if you would:

The patch file in your reply; is that now in the source tree? (If so I'll just repo sync and start over)

No, or you should not have seen the issue when building userdebug
 

How do I apply your patch and which dir to cd to? (...or i can just modify the Makefile)

Save the git formatted patch in build/core
then

git am [0001-*.patch file name]

If the build ID lenght when building userdebug is your problem, then the patch solves the problem
as I have been using it in the last two months

Mauro

Carmelo Carbonara

unread,
Aug 19, 2018, 2:10:21 PM8/19/18
to Android-x86

thanks Mauro that solved it
Reply all
Reply to author
Forward
0 new messages