You are not logged in.

#1 2017-10-19 02:12:58

rednoah
Member
Registered: 2017-10-19
Posts: 1

android7.1.1 building error "ninja: build stopped: subcommand failed."

Hi all, I am using arch64 for building android 7.1.1. There is a building error that seems related to python. Could anyone help? Thanks.

My arch64bit on x86

[root@lucia ~]# uname -a
Linux lucia 4.13.7-1-ARCH #1 SMP PREEMPT Sat Oct 14 20:13:26 CEST 2017 x86_64 GNU/Linux

the android 7.1.1 source is supplied by a customer and it can be built on ubuntu 16.04.

git clone http://116.247.69.94:8082/LA.UM.5.6_CUSTOMER

I use python2 and openjdk8.The "virtualenv2 venv" has been done once before the following, so it is ignored:

[root@lucia ~]# cd ~/android
[root@lucia android]# . venv/bin/activate
(venv) [root@lucia android]# echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk
(venv) [root@lucia LA.UM.5.6_CUSTOMER]# which python|xargs ls -l
lrwxrwxrwx 1 root root 7 Oct 18 16:42 /root/android/venv/bin/python -> python2

the building process is
. build/envsetup.sh
lunch msm8937_64-userdebug
their outputs:

(venv) [root@lucia LA.UM.5.6_CUSTOMER]# . build/envsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/qcom/common/vendorsetup.sh
including vendor/forge/vendorsetup.sh
FORGE_VERSION ==> 1B62.1BA8CD2E8D.171019.100.V01.T01
FORGE_AP_VERSION ==> SLM757MG_EQ0_1BA8CD2E8D_171019_100_V01_T01
including vendor/qcom/proprietary/common/vendorsetup.sh
including sdk/bash_completion/adb.bash

(venv) [root@lucia LA.UM.5.6_CUSTOMER]# lunch msm8937_64-userdebug

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.1
TARGET_PRODUCT=msm8937_64
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.7-1-ARCH-x86_64-with-glibc2.2.5
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NMF26F
OUT_DIR=out
============================================

then make
ninja error occurs soon after lk building's complete:

ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:149: ninja_wrapper] Error 1

and the error context is:

No private recovery resources for TARGET_DEVICE msm8937_64
Starting build with ninja
ninja: Entering directory `.'
[  0% 1/74805] build emmc_appsbootldr_clean
[  0% 2/74805] build out/target/product/msm8937_64/emmc_appsboot.mbn
make: Entering directory '/root/LA.UM.5.6_CUSTOMER/bootable/bootloader/lk'
make[1]: Entering directory '/root/LA.UM.5.6_CUSTOMER/bootable/bootloader/lk'
including app/aboot dev/fbcon dev/gcdb/display dev/keys dev/pmic/fgsram dev/pmic/pm8x41 dev/pmic/pmi8994 dev/qpnp_haptic dev/qpnp_wled dev/vib lib/debug lib/heap lib/libc lib/libfdt lib/openssl lib/ptable
including lib/openssl/crypto lib/zlib_inflate
generating ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/config.h
generating ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/system-onesegment.ld
linking ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/lk
../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-ld: warning: /root/LA.UM.5.6_CUSTOMER/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/../lib/gcc/arm-eabi/4.8/libgcc.a(bpabi.o) uses 32-bit enums yet the output is to use variable-size enums; use of enum values across objects may fail
../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-ld: warning: /root/LA.UM.5.6_CUSTOMER/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/../lib/gcc/arm-eabi/4.8/libgcc.a(_divdi3.o) uses 32-bit enums yet the output is to use variable-size enums; use of enum values across objects may fail
../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-ld: warning: /root/LA.UM.5.6_CUSTOMER/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/../lib/gcc/arm-eabi/4.8/libgcc.a(_udivdi3.o) uses 32-bit enums yet the output is to use variable-size enums; use of enum values across objects may fail
generating image: ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/lk.bin
generating listing: ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/lk.lst
   text	   data	    bss	    dec	    hex	filename
 355800	 215184	  67704	 638688	  9bee0	../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/lk
../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-objcopy -O binary ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/lk ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/lk.bin
generating listing: ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/lk.debug.lst
generating symbols: ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/lk.sym
generating size map: ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/lk.size
generating stripped elf: ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/lk_s.elf
cp -f ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/build-msm8952/lk_s.elf ../../../out/target/product/msm8937_64/obj/EMMC_BOOTLOADER_OBJ/../../emmc_appsboot.mbn
make[1]: Leaving directory '/root/LA.UM.5.6_CUSTOMER/bootable/bootloader/lk'
make: Leaving directory '/root/LA.UM.5.6_CUSTOMER/bootable/bootloader/lk'
[  0% 3/74805] Generating signed appsbl using secimage tool for msm8937
FAILED: /bin/bash -c "(rm -rf out/target/product/msm8937_64/signed ) && (SECIMAGE_LOCAL_DIR=vendor/qcom/proprietary/common/scripts/SecImage USES_SEC_POLICY_MULTIPLE_DEFAULT_SIGN=1 USES_SEC_POLICY_DEFAULT_SUBFOLDER_SIGN= USES_SEC_POLICY_INTEGRITY_CHECK=1 python vendor/qcom/proprietary/common/scripts/SecImage/sectools_builder.py -i out/target/product/msm8937_64/emmc_appsboot.mbn -t vendor/qcom/proprietary/common/scripts/SecImage/signed -g appsbl --config=vendor/qcom/proprietary/common/scripts/SecImage/config/integration/secimage.xml --install_base_dir=out/target/product/msm8937_64 > out/target/product/msm8937_64/secimage.log 2>&1 ) && (echo Completed secimage signed appsbl \\(logs in out/target/product/msm8937_64/secimage.log\\) )"
ninja: build stopped: subcommand failed.

[0;31m#### make failed to build some targets (44 seconds) ####[00m

I checked the secimage.log and its content is:

[33mWARNING: Openssl: Not Found[39m
Traceback (most recent call last):
  File "vendor/qcom/proprietary/common/scripts/SecImage/sectools_builder.py", line 29, in <module>
    from sectools.features.isc.builder import scons_secimage_builder
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/__init__.py", line 26, in <module>
    from sectools.features.isc import defines, stager
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/stager/__init__.py", line 89, in <module>
    from image_paths_stager import ImagePathsStager
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/stager/image_paths_stager.py", line 19, in <module>
    from sectools.features.isc.cfgparser import ConfigParser
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/cfgparser/__init__.py", line 20, in <module>
    import defines as defines
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/cfgparser/defines.py", line 22, in <module>
    from sectools.features.isc.parsegen.config.defines import CONFIG_KEY_IMAGE_TYPE, \
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/parsegen/__init__.py", line 44, in <module>
    from sectools.features.isc.parsegen import bin
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/parsegen/bin.py", line 14, in <module>
    from sectools.features.isc.parsegen.base import SecParseGenBase
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/parsegen/base.py", line 20, in <module>
    from sectools.common.crypto import ecdsa as ecdsa_functions
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/common/crypto/__init__.py", line 24, in <module>
    from sectools.common.crypto import functions
ImportError: cannot import name functions

Last edited by rednoah (2017-10-19 09:21:03)

Offline

#2 2017-10-19 02:17:50

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: android7.1.1 building error "ninja: build stopped: subcommand failed."

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-11-16 12:01:10

justin_wu
Member
Registered: 2017-11-16
Posts: 9

Re: android7.1.1 building error "ninja: build stopped: subcommand failed."

hi, I had met this error, too.
anybody can help us ??

I am sure had install scons at the system.

pip list | grep scon
scons (3.0.0)

pacman -Ss scons
extra/scons 3.0.0-3 [已安装]
    Extensible Python-based build utility

Offline

#4 2017-11-17 12:42:37

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: android7.1.1 building error "ninja: build stopped: subcommand failed."

[33mWARNING: Openssl: Not Found[39m

Ubuntu 16.04 probably comes with openssl pre-1.1 .
Try installing the openssl-1.0 package .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2017-11-18 02:11:33

justin_wu
Member
Registered: 2017-11-16
Posts: 9

Re: android7.1.1 building error "ninja: build stopped: subcommand failed."

Lone_Wolf wrote:
[33mWARNING: Openssl: Not Found[39m

Ubuntu 16.04 probably comes with openssl pre-1.1 .
Try installing the openssl-1.0 package .


you are right.

I debug the python script at yestoday.
the script find openssl at "usr/lib/python2.7/site-packages/OpenSSL",
but openssl locate at "/usr/bin",
so it can not find the program "openssl"
then I create a sort link at "usr/lib/python2.7/site-packages/OpenSSL".

another reason. the script maybe have a error:

OPENSSL_VERSION_MIN = '1.0.1'
    def is_supported_version(cls, openssl_bin):
        '''Returns True if the version of the openssl is supported
        '''
        # Get the version info
        try:
            version = cls.get_version(openssl_bin)
        except Exception as e:
            logger.debug2(str(e))
            return False

        # Check if version is less than minimum
        openssl_version_min = OPENSSL_VERSION_MIN.split('.')
        if (int(openssl_version_min[0]) > int(version[0]) or  # Major
            int(openssl_version_min[1]) > int(version[1]) or  # Minor
            int(openssl_version_min[2]) > int(version[2])):   # Patch
            return False
        return True


the archlinux use newest openssl "1.1.0f",use "is_supported_version " to checked,it return false.
#openssl version
OpenSSL 1.1.0f  25 May 2017

Offline

#6 2017-11-22 12:06:08

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: android7.1.1 building error "ninja: build stopped: subcommand failed."

OpenSSL 1.1 changed many things, programs designed to work with openssl 1.0.x will fail.

Install the openssl-1.0 package and figure out how to point the andorid code to use that instead of the latest openssl .

Last edited by Lone_Wolf (2017-11-22 12:06:27)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB