khadas / android_build_soong

0 stars 0 forks source link

Problem with Android Pie image compilation for khadas edge-V #1

Closed TLogiviere closed 4 years ago

TLogiviere commented 4 years ago

Hello khadas team !

Khadas-V Pro owner here :)

From the (khadas doc) it appears that I need to compile android system image for khadas edge-V sbc to activate mipi-dsi + HDMI-A.

As I want to tinker with android IA APIs, I chose android Pie version and cloned the repo with python2 ~/.local/bin/android-repo init -u https://github.com/khadas/android_manifest.git -b khadas-edge-pie and python2 ~/.local/bin/android-repo sync got me the latest revision of the code for the branch project build/soong/ a5471138c51014e1cfa84a50bf3c7da26e5a06cb

Then android build process produced this error:

android $ make -j4

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=rk3399pro
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a15
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.1.21-1-MANJARO-x86_64-Manjaro-Linux
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190505.002
OUT_DIR=out

[1/1] out/soong/.minibootstrap/minibp out/soong/.bootstrap/build.ninja
[55/56] glob prebuilts/ndk/stl.bp
[80/80] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
SurfaceFlinger want to conditional Compile
librga want to conditional Compile
libstagefright want to conditional Compile
TARGET_PRODUCT: rk3399pro
out/build-rk3399pro-cleanspec.ninja is missing, regenerating...
out/build-rk3399pro.ninja is missing, regenerating...
Saved manifest to commit_id.xml
[4/1049] including bootable/recovery/Android.mk ...
bootable/recovery/Android.mk:104: warning: *** Redirect log to UART
[25/1049] including development/build/Android.mk ...
development/build/build_android_stubs.mk:43: warning: android_stubs_current 
development/build/build_android_stubs.mk:43: warning: metalava_android_stubs_current metalava_android_stubs_current
development/build/build_android_stubs.mk:43: warning: android_system_stubs_current 
development/build/build_android_stubs.mk:43: warning: android_test_stubs_current 
development/build/build_android_stubs.mk:43: warning: metalava_android_system_stubs_current metalava_android_system_stubs_current
development/build/build_android_stubs.mk:43: warning: metalava_android_test_stubs_current metalava_android_test_stubs_current
[400/1049] including hardware/rockchip/omx_il/Android.mk ...
tools/hooks .git/hooks
[581/1049] including system/sepolicy/Android.mk ...
system/sepolicy/Android.mk:79: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
[1049/1049] including vendor/rockchip/root/SuperSU/Android.mk ...
build/make/core/aapt2.mk:33: warning: overriding commands for target `out/target/common/obj/APPS/Bluetooth_intermediates/flat-res/device/rockchip/common/overlay/packages/apps/Bluetooth/res/values_config.arsc.flat'
build/make/core/aapt2.mk:33: warning: ignoring old commands for target `out/target/common/obj/APPS/Bluetooth_intermediates/flat-res/device/rockchip/common/overlay/packages/apps/Bluetooth/res/values_config.arsc.flat'
build/make/core/Makefile:28: warning: overriding commands for target `out/target/product/rk3399pro/vendor/lib/libjpeghwenc.so'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `out/target/product/rk3399pro/vendor/lib/libjpeghwenc.so'
build/make/core/Makefile:28: warning: overriding commands for target `out/target/product/rk3399pro/vendor/lib/libjpeghwdec.so'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `out/target/product/rk3399pro/vendor/lib/libjpeghwdec.so'
build/make/core/Makefile:28: warning: overriding commands for target `out/target/product/rk3399pro/vendor/lib64/libjpeghwenc.so'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `out/target/product/rk3399pro/vendor/lib64/libjpeghwenc.so'
[ 99% 1405/1406] glob tools/tradefederation/core/python-lib/tradefed_py/*.py
[  0% 599/99123] build out/target/common/obj/JAVA_LIBRARIES/core-oj_intermediates/annotated/timestamp
WARNING: duplicate annotation of type libcore.util.NonNull
WARNING: duplicate annotation of type libcore.util.NonNull
Found class java.io.PrintWriter, but unable to insert @libcore.util.NonNull:
  @libcore.util.NonNull (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at outermost type, RETURN_TYPE=ReturnTypeCriterion for method: append(C)Ljava/io/Writer;, IN_METHOD=in method 'append(C)Ljava/io/Writer;', IN_CLASS=In class 'java.io.PrintWriter' (exactly)}
Found class java.io.PrintWriter, but unable to insert @libcore.util.NonNull:
  @libcore.util.NonNull (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at outermost type, RETURN_TYPE=ReturnTypeCriterion for method: append(C)Ljava/lang/Appendable;, IN_METHOD=in method 'append(C)Ljava/lang/Appendable;', IN_CLASS=In class 'java.io.PrintWriter' (exactly)}
Found class java.io.PrintWriter, but unable to insert @libcore.util.NonNull:
  @libcore.util.NonNull (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at outermost type, RETURN_TYPE=ReturnTypeCriterion for method: append(Ljava/lang/CharSequence;)Ljava/io/Writer;, IN_METHOD=in method 'append(Ljava/lang/CharSequence;)Ljava/io/Writer;', IN_CLASS=In class 'java.io.PrintWriter' (exactly)}
Found class java.io.PrintWriter, but unable to insert @libcore.util.Nullable:
  @libcore.util.Nullable (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at outermost type, PARAM=ParamCriterion for method: append(Ljava/lang/CharSequence;) at position: 0, IN_METHOD=in method 'append(Ljava/lang/CharSequence;)Ljava/io/Writer;', IN_CLASS=In class 'java.io.PrintWriter' (exactly)}
Found class java.io.PrintWriter, but unable to insert @libcore.util.NonNull:
  @libcore.util.NonNull (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at outermost type, RETURN_TYPE=ReturnTypeCriterion for method: append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;, IN_METHOD=in method 'append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;', IN_CLASS=In class 'java.io.PrintWriter' (exactly)}
Found class java.io.PrintWriter, but unable to insert @libcore.util.Nullable:
  @libcore.util.Nullable (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at outermost type, PARAM=ParamCriterion for method: append(Ljava/lang/CharSequence;) at position: 0, IN_METHOD=in method 'append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;', IN_CLASS=In class 'java.io.PrintWriter' (exactly)}
Found class java.io.PrintWriter, but unable to insert @libcore.util.NonNull:
  @libcore.util.NonNull (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at outermost type, RETURN_TYPE=ReturnTypeCriterion for method: append(Ljava/lang/CharSequence;II)Ljava/io/Writer;, IN_METHOD=in method 'append(Ljava/lang/CharSequence;II)Ljava/io/Writer;', IN_CLASS=In class 'java.io.PrintWriter' (exactly)}
Found class java.io.PrintWriter, but unable to insert @libcore.util.Nullable:
  @libcore.util.Nullable (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at outermost type, PARAM=ParamCriterion for method: append(Ljava/lang/CharSequence;II) at position: 0, IN_METHOD=in method 'append(Ljava/lang/CharSequence;II)Ljava/io/Writer;', IN_CLASS=In class 'java.io.PrintWriter' (exactly)}
Found class java.io.PrintWriter, but unable to insert @libcore.util.NonNull:
  @libcore.util.NonNull (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at outermost type, RETURN_TYPE=ReturnTypeCriterion for method: append(Ljava/lang/CharSequence;II)Ljava/lang/Appendable;, IN_METHOD=in method 'append(Ljava/lang/CharSequence;II)Ljava/lang/Appendable;', IN_CLASS=In class 'java.io.PrintWriter' (exactly)}
Found class java.io.PrintWriter, but unable to insert @libcore.util.Nullable:
  @libcore.util.Nullable (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at outermost type, PARAM=ParamCriterion for method: append(Ljava/lang/CharSequence;II) at position: 0, IN_METHOD=in method 'append(Ljava/lang/CharSequence;II)Ljava/lang/Appendable;', IN_CLASS=In class 'java.io.PrintWriter' (exactly)}
Found class java.util.HashMap, but unable to insert @libcore.util.NonNull:
  @libcore.util.NonNull (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at ( [TYPE_ARGUMENT(0)] ), RETURN_TYPE=ReturnTypeCriterion for method: entrySet()Ljava/util/Set;, IN_METHOD=in method 'entrySet()Ljava/util/Set;', IN_CLASS=In class 'java.util.HashMap' (exactly)}
Found class java.util.HashMap, but unable to insert @libcore.util.NullFromTypeParam:
  @libcore.util.NullFromTypeParam (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at ( [TYPE_ARGUMENT(0), TYPE_ARGUMENT(0)] ), RETURN_TYPE=ReturnTypeCriterion for method: entrySet()Ljava/util/Set;, IN_METHOD=in method 'entrySet()Ljava/util/Set;', IN_CLASS=In class 'java.util.HashMap' (exactly)}
Found class java.util.HashMap, but unable to insert @libcore.util.NullFromTypeParam:
  @libcore.util.NullFromTypeParam (nl=false) @ {GENERIC_ARRAY_LOCATION=GenericArrayLocationCriterion at ( [TYPE_ARGUMENT(0), TYPE_ARGUMENT(1)] ), RETURN_TYPE=ReturnTypeCriterion for method: entrySet()Ljava/util/Set;, IN_METHOD=in method 'entrySet()Ljava/util/Set;', IN_CLASS=In class 'java.util.HashMap' (exactly)}
[  2% 2851/99123] target  C: libmtdutils <= bootable/recovery/mtdutils/rk29.c
bootable/recovery/mtdutils/rk29.c:66:51: warning: unused parameter 'len' [-Wunused-parameter]
int rk_make_ext4fs(const char *filename,long long len, const char *mountpoint)
                                                  ^
1 warning generated.
+
+++++++++++++++++++++++++
+Some useless processing+
+++++++++++++++++++++++++
+
[  9% 8596/94302] build TAs
make: Entering directory '/home/git/gits/android/external/rk_tee_user'
make[1]: Entering directory '/home/git/gits/android/external/rk_tee_user/ta'
make[2]: Entering directory '/home/git/gits/android/external/rk_tee_user/ta/testapp'
  CLEAN   .
make[2]: Leaving directory '/home/git/gits/android/external/rk_tee_user/ta/testapp'
make[2]: Entering directory '/home/git/gits/android/external/rk_tee_user/ta/testapp_storage'
  CLEAN   .
make[2]: Leaving directory '/home/git/gits/android/external/rk_tee_user/ta/testapp_storage'
make[1]: Leaving directory '/home/git/gits/android/external/rk_tee_user/ta'
make: Leaving directory '/home/git/gits/android/external/rk_tee_user'
make: Entering directory '/home/git/gits/android/external/rk_tee_user'
make[1]: Entering directory '/home/git/gits/android/external/rk_tee_user/ta'
make[2]: Entering directory '/home/git/gits/android/external/rk_tee_user/ta/testapp'
  /home/git/gits/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-gcc      /home/git/gits/android/external/rk_tee_user/ta/testapp/testapp_ta.o
  /home/git/gits/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-gcc      /home/git/gits/android/external/rk_tee_user/ta/testapp/user_ta_header.o
  CPP     /home/git/gits/android/external/rk_tee_user/ta/testapp/ta.lds
  LD      /home/git/gits/android/external/rk_tee_user/ta/testapp/8cccf200-2450-11e4-abe20002a5d5c52c.elf
  OBJDUMP /home/git/gits/android/external/rk_tee_user/ta/testapp/8cccf200-2450-11e4-abe20002a5d5c52c.dmp
  OBJCOPY /home/git/gits/android/external/rk_tee_user/ta/testapp/8cccf200-2450-11e4-abe20002a5d5c52c.stripped.elf
  SIGN    /home/git/gits/android/external/rk_tee_user/ta/testapp/8cccf200-2450-11e4-abe20002a5d5c52c.ta
  SIGN KEY /home/git/gits/android/external/rk_tee_user/export-user_ta/keys/oem_privkey.pem
make[2]: Leaving directory '/home/git/gits/android/external/rk_tee_user/ta/testapp'
make[2]: Entering directory '/home/git/gits/android/external/rk_tee_user/ta/testapp_storage'
  /home/git/gits/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-gcc      /home/git/gits/android/external/rk_tee_user/ta/testapp_storage/testapp_storage_ta.o
  /home/git/gits/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-gcc      /home/git/gits/android/external/rk_tee_user/ta/testapp_storage/user_ta_header.o
  CPP     /home/git/gits/android/external/rk_tee_user/ta/testapp_storage/ta.lds
  LD      /home/git/gits/android/external/rk_tee_user/ta/testapp_storage/8dddf200-2450-11e4-abe20002a5d5c53d.elf
  OBJDUMP /home/git/gits/android/external/rk_tee_user/ta/testapp_storage/8dddf200-2450-11e4-abe20002a5d5c53d.dmp
  OBJCOPY /home/git/gits/android/external/rk_tee_user/ta/testapp_storage/8dddf200-2450-11e4-abe20002a5d5c53d.stripped.elf
  SIGN    /home/git/gits/android/external/rk_tee_user/ta/testapp_storage/8dddf200-2450-11e4-abe20002a5d5c53d.ta
  SIGN KEY /home/git/gits/android/external/rk_tee_user/export-user_ta/keys/oem_privkey.pem
make[2]: Leaving directory '/home/git/gits/android/external/rk_tee_user/ta/testapp_storage'
make[1]: Leaving directory '/home/git/gits/android/external/rk_tee_user/ta'
make: Leaving directory '/home/git/gits/android/external/rk_tee_user'
[  9% 9255/94302] //external/selinux/checkpolicy:checkpolicy lex policy_scan.l [linux_glibc]
FAILED: out/soong/.intermediates/external/selinux/checkpolicy/checkpolicy/linux_glibc_x86_64/gen/lex/external/selinux/checkpolicy/policy_scan.c 
prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/soong/.intermediates/external/selinux/checkpolicy/checkpolicy/linux_glibc_x86_64/gen/lex/external/selinux/checkpolicy/policy_scan.c external/selinux/checkpolicy/policy_scan.l
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
[  9% 9258/94302] //system/libhidl/base:libhidlbase clang++ HidlSupport.cpp
ninja: build stopped: subcommand failed.
16:39:59 ninja failed with: exit status 1

#### failed to build some targets (31:26 (mm:ss)) ####

So I symlinked flex to a newer version present on my system (ln -s /usr/bin/flex-2.6.4 prebuilts/misc/linux-x86/flex/flex-2.5.39) allowing the build to go further but fail at:

[ 51% 50887/99123] //frameworks/compile/mclinker/lib/Sc...rameworks/compile/mclinker/lib/Script/ScriptScanner.cpp
FAILED: out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/obj/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.o 
PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++ -c -Iframeworks/compile/mclinker/include -Iframeworks/compile/mclinker/include/mcld/Script -Iframeworks/compile/mclinker/lib/Script  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -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 -Wno-zero-as-null-pointer-constant -fdebug-prefix-map=$PWD/= -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -march=armv8-a -mcpu=cortex-a53 -Iout/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/yacc/frameworks/compile/mclinker/lib/Script -Iexternal/llvm/include -Iexternal/llvm/device/include -Iout/soong/.intermediates/external/llvm/llvm-gen-attributes/gen -Iout/soong/.intermediates/external/llvm/llvm-gen-intrinsics/gen -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/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Ilibnativehelper/include_jni -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -fomit-frame-pointer -Wall -W -Wno-cast-qual -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers -Wwrite-strings -Werror -Dsprintf=sprintf -Wno-error=unused-lambda-capture -Wno-error=user-defined-warnings -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -DANDROID_STRICT -fPIC -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 -Wno-gnu-include-next -fvisibility-inlines-hidden -Wno-sign-promo -std=c++11 -Wall -Wno-unused-parameter -Wno-unused-private-field -Wno-unused-const-variable -Werror -Woverloaded-virtual -fno-rtti  -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch -MD -MF out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/obj/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.o.d -o out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/obj/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.o out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:1487:8: error: member reference type 'std::istream *' (aka 'basic_istream<char> *') is a pointer; did you mean to use '->'?
                        yyin.rdbuf(std::cin.rdbuf());
                        ~~~~^
                            ->
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:1490:9: error: member reference type 'std::ostream *' (aka 'basic_ostream<char> *') is a pointer; did you mean to use '->'?
                        yyout.rdbuf(std::cout.rdbuf());
                        ~~~~~^
                             ->
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2274:50: error: member reference type 'std::istream *' (aka 'basic_istream<char> *') is a pointer; did you mean to use '->'?
                        YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf();
                                                                  ~~~~^
                                                                      ->
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2389:2: error: cannot initialize a member subobject of type 'std::istream *' (aka 'basic_istream<char> *') with an rvalue of type 'basic_streambuf<std::__1::basic_ios<char, std::__1::char_traits<char> >::char_type, std::__1::basic_ios<char, std::__1::char_traits<char> >::traits_type> *' (aka 'basic_streambuf<char, std::__1::char_traits<char> > *')
        yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()),
        ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2390:2: error: cannot initialize a member subobject of type 'std::ostream *' (aka 'basic_ostream<char> *') with an rvalue of type 'basic_streambuf<std::__1::basic_ios<char, std::__1::char_traits<char> >::char_type, std::__1::basic_ios<char, std::__1::char_traits<char> >::traits_type> *' (aka 'basic_streambuf<char, std::__1::char_traits<char> > *')
        yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf())
        ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2392:2: error: use of undeclared identifier 'ctor_common'
        ctor_common();
        ^
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2397:14: error: out-of-line definition of 'yyFlexLexer' does not match any declaration in 'yyFlexLexer'
yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ):
             ^~~~~~~~~~~
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:22:25: note: expanded from macro 'yyFlexLexer'
    #define yyFlexLexer yyFlexLexer
                        ^~~~~~~~~~~
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2388:27: note: type of 1st parameter of member declaration does not match definition ('std::istream *' (aka 'basic_istream<char> *') vs 'std::istream &' (aka 'basic_istream<char> &'))
yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ):
                          ^
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2398:2: error: cannot initialize a member subobject of type 'std::istream *' (aka 'basic_istream<char> *') with an rvalue of type 'basic_streambuf<std::__1::basic_ios<char, std::__1::char_traits<char> >::char_type, std::__1::basic_ios<char, std::__1::char_traits<char> >::traits_type> *' (aka 'basic_streambuf<char, std::__1::char_traits<char> > *')
        yyin(arg_yyin.rdbuf()),
        ^    ~~~~~~~~~~~~~~~~
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2399:2: error: cannot initialize a member subobject of type 'std::ostream *' (aka 'basic_ostream<char> *') with an rvalue of type 'basic_streambuf<std::__1::basic_ios<char, std::__1::char_traits<char> >::char_type, std::__1::basic_ios<char, std::__1::char_traits<char> >::traits_type> *' (aka 'basic_streambuf<char, std::__1::char_traits<char> > *')
        yyout(arg_yyout.rdbuf())
        ^     ~~~~~~~~~~~~~~~~~
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2401:2: error: use of undeclared identifier 'ctor_common'
        ctor_common();
        ^
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2406:19: error: out-of-line definition of 'ctor_common' does not match any declaration in 'yyFlexLexer'
void yyFlexLexer::ctor_common()
                  ^~~~~~~~~~~
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2444:19: error: out-of-line definition of 'switch_streams' does not match any declaration in 'yyFlexLexer'
void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out )
                  ^~~~~~~~~~~~~~
frameworks/compile/mclinker/include/mcld/Script/FlexLexer.h:133:31: note: type of 1st parameter of member declaration does not match definition ('std::istream *' (aka 'basic_istream<char> *') vs 'std::istream &' (aka 'basic_istream<char> &'))
  virtual void switch_streams(FLEX_STD istream* new_in,
                              ^
frameworks/compile/mclinker/include/mcld/Script/FlexLexer.h:62:18: note: expanded from macro 'FLEX_STD'
#define FLEX_STD std::
                 ^
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2448:41: error: no viable conversion from 'std::istream' (aka 'basic_istream<char>') to 'std::istream *' (aka 'basic_istream<char> *')
        yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE  ) );
                                               ^~~~~~
frameworks/compile/mclinker/include/mcld/Script/FlexLexer.h:125:62: note: passing argument to parameter 's' here
  struct yy_buffer_state* yy_create_buffer(FLEX_STD istream* s, int size);
                                                             ^
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2451:7: error: member reference type 'std::ostream *' (aka 'basic_ostream<char> *') is a pointer; did you mean to use '->'?
        yyout.rdbuf(new_out.rdbuf());
        ~~~~~^
             ->
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2459:12: error: assigning to 'std::istream *' (aka 'basic_istream<char> *') from incompatible type 'std::istream **' (aka 'basic_istream<char> **'); remove &
                new_in = &yyin;
                         ^~~~~
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2463:13: error: assigning to 'std::ostream *' (aka 'basic_ostream<char> *') from incompatible type 'std::ostream **' (aka 'basic_ostream<char> **'); remove &
                new_out = &yyout;
                          ^~~~~~
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2466:17: error: no viable conversion from 'std::istream' (aka 'basic_istream<char>') to 'std::istream *' (aka 'basic_istream<char> *')
        switch_streams(*new_in, *new_out);
                       ^~~~~~~
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2456:49: note: passing argument to parameter 'new_in' here
void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
                                                ^
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2475:11: error: member reference type 'std::istream *' (aka 'basic_istream<char> *') is a pointer; did you mean to use '->'?
        if ( yyin.eof() || yyin.fail() )
             ~~~~^
                 ->
out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_cortex-a53_core_static/gen/lex/frameworks/compile/mclinker/lib/Script/ScriptScanner.cpp:2475:25: error: member reference type 'std::istream *' (aka 'basic_istream<char> *') is a pointer; did you mean to use '->'?
        if ( yyin.eof() || yyin.fail() )
                           ~~~~^
                               ->
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[ 51% 50890/99123] //frameworks/compile/mclinker/lib/Sc...frameworks/compile/mclinker/lib/Script/ScriptParser.cpp
ninja: build stopped: subcommand failed.
19:24:09 ninja failed with: exit status 1

#### failed to build some targets (02:34:28 (hh:mm:ss)) ####

Here I am, without any idea of what to do with some of these errors... Should I try to exclude this particular piece from the build process ? Should I try to tinker with the code with my 2cents of knowledge about c++ ?

Ewww any help will be greatly appreciated !

Théophane

TLogiviere commented 4 years ago

Hello, Any help on this issue please ?

TLogiviere commented 4 years ago

The solution is to also symlink the header FlexLexer.h Hence on my system it follows that doing: ln -s /usr/include/FlexLexer.h frameworks/compile/mclinker/include/mcld/Script/FlexLexer.h allows the build to continue...