Error compiling: unsupported reloc 43 against global symbol

3.627 visualitzacions
Ves al primer missatge no llegit

Dimitrios Pappas

no llegida,
2 de març 2016, 8:44:272/3/16
a Android-x86
Building on Arch Linux. Both x86 and x86_64 give me following error:

external/libunwind/src/x86/Gos-linux.c:301: warning: warning: sigreturn is not implemented and will always fail
external/libunwind/src/x86/Gos-linux.c:301: warning: warning: sigreturn is not implemented and will always fail
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/SHARED_LIBRARIES/libnativehelper_intermediates/JNIHelp.o: unsupported reloc 43 against global symbol std::string::_Rep::_S_empty_rep_storage
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/SHARED_LIBRARIES/libnativehelper_intermediates/JNIHelp.o: unsupported reloc 43 against global symbol std::string::_Rep::_S_empty_rep_storage
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/SHARED_LIBRARIES/libnativehelper_intermediates/JNIHelp.o: unsupported reloc 43 against global symbol std::string::_Rep::_S_empty_rep_storage

....


prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/SHARED_LIBRARIES/libnativehelper_intermediates/JniInvocation.o: unsupported reloc 43 against global symbol JniInvocation::jni_invocation_
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/SHARED_LIBRARIES/libnativehelper_intermediates/JniInvocation.o: unsupported reloc 43 against global symbol JniInvocation::jni_invocation_
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8//x86_64-linux/include/c++/4.8/bits/basic_string.h:275: error: unsupported reloc 43
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8//x86_64-linux/include/c++/4.8/bits/basic_string.h:275: error: unsupported reloc 43
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8//x86_64-linux/include/c++/4.8/bits/basic_string.h:240: error: unsupported reloc 43
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8//x86_64-linux/include/c++/4.8/bits/basic_string.h:240: error: unsupported reloc 43
libnativehelper/JNIHelp.cpp:310: error: unsupported reloc 43
libnativehelper/JNIHelp.cpp:311: error: unsupported reloc 43
libnativehelper/JNIHelp.cpp:332: error: unsupported reloc 43
libnativehelper/JNIHelp.cpp:322: error: unsupported reloc 43
libnativehelper/JNIHelp.cpp:338: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:89: error: unsupported reloc 43
libnativehelper/JniConstants.cpp:90: error: unsupported reloc 43

...

libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:44: recipe for target 'out/host/linux-x86/obj32/lib/libnativehelper.so' failed
make: *** [out/host/linux-x86/obj32/lib/libnativehelper.so] Error 1


Is this some problem with the toolchain? I just synced the lollipop-x86 branch and tried to compile it with
. /build/envsetup.sh
lunch (select either 8 or 11 for userdebug)
make -j4 iso_img

Thanks in advance

Carlos Zicos

no llegida,
13 de març 2016, 21:35:5813/3/16
a Android-x86
Hello,

I'm facing the same problem. I tried several things like using gcc instead of clang, downgrading gcc with no success.
Did you get some clues ?

Thanks in advance

Dimitrios Pappas

no llegida,
15 de març 2016, 20:34:5415/3/16
a Android-x86
I just skipped the lollipop-x86 branch and synced marshmallow-x86. This one compiles without errors. However, you have to disable host clang as described here: http://review.cyanogenmod.org/#/c/120824/. Otherwise you will run into problems while compiling ART.

Carlos Zicos

no llegida,
16 de març 2016, 7:19:4916/3/16
a Android-x86
Thanks for ypur suggestion. Actually I was already trying this (eg GCC instead CLANG) but finally got other problems later during compilation (and needed to remove some cflags unknown by gcc...).
I also first tried marsmallow, which compiled effortlessly but currently I just need lollipop for some project.

I think I found some problem : in lollipop tree, prebuilt clang is elf-32, but elf-64 in marshmallow tree. Because I'm building 64 bits android (on 64 bit system), the 64 bits objects (*.o) are problems for the elf-32 linker.
To be confirmed...

Le mercredi 2 mars 2016 14:44:27 UTC+1, Dimitrios Pappas a écrit :

TheKit

no llegida,
16 de març 2016, 21:52:2516/3/16
a Android-x86
So far I was able to compile Lollipop on Arch Linux only using Ubuntu 14.04 chroot. The same problem with "unsupported reloc" otherwise. It seems latest version of something on host (GCC/binutils?) clashes with Android build.

среда, 16 марта 2016 г., 19:19:49 UTC+8 пользователь Carlos Zicos написал:

jiaya...@intel.com

no llegida,
26 de maig 2016, 6:40:5826/5/16
a Android-x86
Please check your gcc version following the Wiki here : https://source.android.com/source/initializing.html.  Try 
Even though Ubuntu is not necessary, but it do save you a lot of time. 


Respon a tots
Respon a l'autor
Reenvia
0 missatges nous