build environment Ubuntu 16.04

2,974 views
Skip to first unread message

Mario Holzinger

unread,
Aug 18, 2016, 6:25:42 AM8/18/16
to Android-rpi
Hi!

May I ask If some of you are working also with an updated Ubuntu version 16.05 and facing the same errors than I get.

mor in detail:
I have a build bot that makes my Android-x86 images and kodi dep's for the rpi on demand
Also I have downloaded the RPI2 & RPi3 Github sources to build the RPi androi images from source but without sucess

Android-x86 Marshmallow is building fine but Rpi3 Marschmallow sources for example always exit with reloc errors like

prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance

I googled a little bit and found aout that this is a common problem for AOSP sources on Ubuntu 16.04 but did not find a solution so far. :-(

Did some of you have a clue what can be modified to solve this??


output:
============================================
PLATFORM_VERSION_CODENAME
=REL
PLATFORM_VERSION
=6.0.1
TARGET_PRODUCT
=rpi3
TARGET_BUILD_VARIANT
=user
TARGET_BUILD_TYPE
=release
TARGET_BUILD_APPS
=
TARGET_ARCH
=arm
TARGET_ARCH_VARIANT
=armv7-a-neon
TARGET_CPU_VARIANT
=cortex-a7
TARGET_2ND_ARCH
=
TARGET_2ND_ARCH_VARIANT
=
TARGET_2ND_CPU_VARIANT
=
TARGET_GCC_VERSION
=5.3-linaro
HOST_ARCH
=x86_64
HOST_OS
=linux
HOST_OS_EXTRA
=Linux-4.4.0-34-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_BUILD_TYPE
=release
BUILD_ID
=MOB30M
OUT_DIR
=/home/sandman01/src/RaspberryPi/android-rpi3_mm/out
============================================
external
/libdrm/libkms/Android.mk:21: invalid GPU drivers: vc4
find
: "frameworks/base/docs/html-ndk": Datei oder Verzeichnis nicht gefunden
find
: "dummy": Datei oder Verzeichnis nicht gefunden
find
: "dummy": Datei oder Verzeichnis nicht gefunden
find
: "dummy": Datei oder Verzeichnis nicht gefunden
find
: "dummy": Datei oder Verzeichnis nicht gefunden
find
: "dummy": Datei oder Verzeichnis nicht gefunden
find
: "dummy": Datei oder Verzeichnis nicht gefunden
find
: "dummy": Datei oder Verzeichnis nicht gefunden
PRODUCT_COPY_FILES frameworks
/base/data/keyboards/Generic.kl:system/usr/keylayout/Generic.kl ignored.
PRODUCT_COPY_FILES system
/core/rootdir/init.usb.rc:root/init.usb.rc ignored.
PRODUCT_COPY_FILES hardware
/libhardware_legacy/audio/audio_policy.conf:system/etc/audio_policy.conf ignored.
Import includes file: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart-compiler_intermediates/import_includes
host
SharedLib: libart (/home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/lib/libart.so)
host C
++: libvixl <= external/vixl/src/vixl/a64/assembler-a64.cc
host C
++: libvixl <= external/vixl/src/vixl/a64/cpu-a64.cc
host C
++: libvixl <= external/vixl/src/vixl/a64/debugger-a64.cc
host C
++: libvixl <= external/vixl/src/vixl/a64/decoder-a64.cc
host C
++: libvixl <= external/vixl/src/vixl/a64/disasm-a64.cc
host C
++: libvixl <= external/vixl/src/vixl/a64/instructions-a64.cc
host C
++: libvixl <= external/vixl/src/vixl/a64/instrument-a64.cc
host C
++: libvixl <= external/vixl/src/vixl/a64/logic-a64.cc
host C
++: libvixl <= external/vixl/src/vixl/a64/macro-assembler-a64.cc
host C
++: libvixl <= external/vixl/src/vixl/a64/simulator-a64.cc
host C
++: libvixl <= external/vixl/src/vixl/code-buffer.cc
host C
++: libvixl <= external/vixl/src/vixl/compiler-intrinsics.cc
host C
++: libvixl <= external/vixl/src/vixl/utils.cc
Import includes file: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj32/SHARED_LIBRARIES/libart-compiler_intermediates/import_includes
host C
++: libart_32 <= art/runtime/base/hex_dump.cc
host C
++: libart_32 <= art/runtime/base/logging.cc
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_
prebuilts
/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: /home/sandman01/src/RaspberryPi/android-rpi3_mm/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o: unsupported reloc 42 against global symbol art::Runtime::instance_


Mario Holzinger

unread,
Aug 25, 2016, 12:12:36 PM8/25/16
to Android-rpi
Found a solution after further research by patching
build/core/clang/HOST_x86_common.mk

find also a patch in the attachments

regards
Mario from Austria
0001-Ubuntu-16.04-adaption.patch

tibi...@gmail.com

unread,
Aug 8, 2017, 12:19:15 PM8/8/17
to Android-rpi
Thanks this worked for me too on Ubuntu 16.04 x64! I had to git apply the patch you provided. I also had to delete the /out folder and clean my ccache to get passt the relocation error. Now, it's compiling well!

yane....@gmail.com

unread,
Aug 7, 2018, 8:51:37 PM8/7/18
to Android-rpi
Thank you!
This patch worked for me on Ubuntu 18.04 x64 and saved me a lot of time. :)

georgbo...@gmail.com

unread,
Dec 16, 2019, 4:17:18 AM12/16/19
to Android-rpi
Work also in 2019! :)  Thank you - I've change thease lines on my System Ubuntu 16.04 
Reply all
Reply to author
Forward
0 new messages