account arrowhead-down arrowhead-up mobile-menu search sm-bold-x x-skinny-rounded x-skinny arrowhead-right social-facebook social-googleplus social-instagram social-linkedin social-pinterest social-qzone social-renren social-tencent social-twitter social-vkontakt social-weibo social-youku social-youtube

Please help us improve our website

Take our customer survey to evaluate your visit.

It should only take a few minutes to answer five quick questions. Just click the Launch survey button at the end of your visit to begin.

cancel
Showing results for 
Search instead for 
Did you mean: 
Welcome to the Open Devices community!

This is where we discuss open source and development related questions on our Open Devices initiative.

Error building AOSP

Highlighted
Apprentice
Message 1 of 3
1,058 Views
Message 1 of 3

Error building AOSP

So I've had lots of errors during the build of AOSP 8.0, but currently I got one which I don't know how to solve.
I tried with ubuntu 14.06 and now I'm trying with:

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

The exit in which I'm currently stuck is:

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPR3.170623.013
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
[  0% 1/3522] target StaticExecutable: charger (out/target/product/generic/obj/EXECUTABLES/charger_intermediates/LINKED/charger)
FAILED: out/target/product/generic/obj/EXECUTABLES/charger_intermediates/LINKED/charger 
/bin/bash -c "prebuilts/clang/host/linux-x86/clang-3859424/bin/clang++ -nostdlib -Bstatic -static -Wl,--gc-sections -o out/target/product/generic/obj/EXECUTABLES/charger_intermediates/LINKED/charger out/target/product/generic/obj/lib/crtbegin_static.o -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--icf=safe -Wl,--hash-style=gnu -Wl,--no-undefined-version -Wl,--fix-cortex-a8   -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -Wl,--exclude-libs,libunwind_llvm.a -Wl,--no-undefined out/target/product/generic/obj/EXECUTABLES/charger_intermediates/healthd_common.o out/target/product/generic/obj/EXECUTABLES/charger_intermediates/charger.o -Wl,--whole-archive  -Wl,--no-whole-archive out/target/product/generic/obj/STATIC_LIBRARIES/libhealthd_charger_intermediates/libhealthd_charger.a out/target/product/generic/obj/STATIC_LIBRARIES/libbatterymonitor_intermediates/libbatterymonitor.a out/target/product/generic/obj/STATIC_LIBRARIES/libbase_intermediates/libbase.a out/target/product/generic/obj/STATIC_LIBRARIES/libutils_intermediates/libutils.a out/target/product/generic/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a out/target/product/generic/obj/STATIC_LIBRARIES/liblog_intermediates/liblog.a out/target/product/generic/obj/STATIC_LIBRARIES/libm_intermediates/libm.a out/target/product/generic/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a out/target/product/generic/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a out/target/product/generic/obj/STATIC_LIBRARIES/libz_intermediates/libz.a out/target/product/generic/obj/STATIC_LIBRARIES/libc++_static_intermediates/libc++_static.a out/target/product/generic/obj/STATIC_LIBRARIES/libunwind_llvm_intermediates/libunwind_llvm.a out/target/product/generic/obj/STATIC_LIBRARIES/libm_intermediates/libm.a out/target/product/generic/obj/STATIC_LIBRARIES/libdl_intermediates/libdl.a out/target/product/generic/obj/STATIC_LIBRARIES/libhealthd.default_intermediates/libhealthd.default.a out/target/product/generic/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a -Wl,--start-group out/target/product/generic/obj/STATIC_LIBRARIES/libc_intermediates/libc.a out/target/product/generic/obj/STATIC_LIBRARIES/libc_intermediates/libc.a   out/target/product/generic/obj/STATIC_LIBRARIES/libatomic_intermediates/libatomic.a  out/target/product/generic/obj/STATIC_LIBRARIES/libgcc_intermediates/libgcc.a -Wl,--end-group out/target/product/generic/obj/lib/crtend_android.o"
system/core/healthd/healthd_mode_charger.cpp:671: error: undefined reference to 'healthd_board_mode_charger_set_backlight(bool)'
system/core/healthd/healthd_mode_charger.cpp:696: error: undefined reference to 'healthd_board_mode_charger_battery_update(android::BatteryProperties*)'
system/core/healthd/healthd_mode_charger.cpp:484: error: undefined reference to 'healthd_board_mode_charger_set_backlight(bool)'
system/core/healthd/healthd_mode_charger.cpp:494: error: undefined reference to 'healthd_board_mode_charger_set_backlight(bool)'
system/core/healthd/healthd_mode_charger.cpp:531: error: undefined reference to 'healthd_board_mode_charger_set_backlight(bool)'
system/core/healthd/healthd_mode_charger.cpp:412: error: undefined reference to 'healthd_board_mode_charger_draw_battery(android::BatteryProperties*)'
system/core/healthd/healthd_mode_charger.cpp:861: error: undefined reference to 'healthd_board_mode_charger_init()'
clang.real: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
build/core/main.mk:21: recipe for target 'run_soong_ui' failed

The device which I want to flash is Sony Xperia XZs G8232.


Can anyone help me here?
Thank you for your time

2 REPLIES 2
Developer World
Message 2 of 3
1,039 Views
Message 2 of 3

Re: Error building AOSP

Hi,

did you run the repo_update.sh script?

 

Thanks

Alin

 

Developer World
Message 3 of 3
1,038 Views
Message 3 of 3

Re: Error building AOSP

Hi,

can you please try to build the 8.1 build guide

Thanks

Alin