You are not logged in.

#1 2016-03-04 13:50:07

mrcmunir
Member
Registered: 2016-03-04
Posts: 2

Android 6.0 problem toolchain unsupported relloc 42/43..

Mounth ago you compile perfectly Android 6.0  but no longer compile without error ¿New regresion?

Broken toolchain prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8//x86_64-linux/bin/ld: error: unsupported reloc  42/43 against global symbol Always crash in aleatory code and never finish compile code without error
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How Fix it?

My HOST_OS is Linux-4.4.3-1-ARCH-x86_64-with-glibc2.2.5

Thanks.

Offline

#2 2016-03-05 11:03:36

zivziv
Member
From: Florida, USA
Registered: 2010-02-05
Posts: 49
Website

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

Same here:

...
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: 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_
...
out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o:function art_quick_instrumentation_exit: error: unsupported reloc 42
out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/arch/x86_64/quick_entrypoints_x86_64.o:function art_quick_deoptimize: error: unsupported reloc 42
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Offline

#3 2016-03-06 10:17:12

zivziv
Member
From: Florida, USA
Registered: 2010-02-05
Posts: 49
Website

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

I was able to resolve my issue with this patch: http://review.cyanogenmod.org/#/c/12082 … n_build.mk

Offline

#4 2016-03-06 16:32:23

mrcmunir
Member
Registered: 2016-03-04
Posts: 2

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

it's partially solved  because you when run compiled libart.so always crash loop

Won't work anymore underr archlinux.

Offline

#5 2016-03-08 12:42:19

sleeping
Member
Registered: 2016-01-09
Posts: 53

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

I am having the same issue with v8:

https://bbs.archlinux.org/viewtopic.php … 4#p1610654

Offline

#6 2016-03-10 15:20:31

zivziv
Member
From: Florida, USA
Registered: 2010-02-05
Posts: 49
Website

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

mrcmunir
Have you tried the cheat described at https://bbs.archlinux.org/viewtopic.php … 5#p1610715?
I've replaced prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld with the symlink to /usr/bin/ld.gold, and this fixed the compilation issue. I'm _not_ sure if the result is actually working, however.

Last edited by zivziv (2016-03-19 15:15:11)

Offline

#7 2016-03-18 13:56:12

ov3r1oad
Member
Registered: 2016-03-18
Posts: 3

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

zivziv wrote:

mrcmunir
Have you tried the cheat described at https://bbs.archlinux.org/viewtopic.php … 5#p1610715?
I've replaced prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld with the symlink to /usr/bin/ld.gold, and this fixed the compilation issue. I'm sure if the result is actually working, however.

Did you try it with Android 6.0? Because it doesn't work for Lollipop for me.

Offline

#8 2016-03-18 14:04:14

zivziv
Member
From: Florida, USA
Registered: 2010-02-05
Posts: 49
Website

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

ov3r1oad wrote:
zivziv wrote:

mrcmunir
Have you tried the cheat described at https://bbs.archlinux.org/viewtopic.php … 5#p1610715?
I've replaced prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld with the symlink to /usr/bin/ld.gold, and this fixed the compilation issue. I'm sure if the result is actually working, however.

Did you try it with Android 6.0? Because it doesn't work for Lollipop for me.

Yes, I tried it with 6.0. And the compiled binaries are indeed working - I've checked them.

Offline

#9 2016-03-19 13:24:57

MreDD
Member
From: Orange County, USA
Registered: 2007-08-26
Posts: 175
Website

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

zivziv wrote:

mrcmunir
Have you tried the cheat described at https://bbs.archlinux.org/viewtopic.php … 5#p1610715?
I've replaced prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld with the symlink to /usr/bin/ld.gold, and this fixed the compilation issue. I'm sure if the result is actually working, however.

this worked for me. Thanks


...MikereDD
:Go Away & Give My Pillow Back!!:
aur pkgbuilds - mostly fortune-mod's & fonts

Offline

#10 2016-05-02 16:41:12

PunkUnity
Member
Registered: 2016-05-02
Posts: 2

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

Hate to dig up old threads, but there is a patch by CM.
http://review.cyanogenmod.org/#/c/120824/2

Offline

#11 2016-05-02 18:18:54

zivziv
Member
From: Florida, USA
Registered: 2010-02-05
Posts: 49
Website

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

PunkUnity wrote:

Hate to dig up old threads, but there is a patch by CM.
http://review.cyanogenmod.org/#/c/120824/2

I've also tried this patch (see reply #3) but the binaries built with it did not seem to be actually working.

Offline

#12 2016-05-09 03:40:11

PunkUnity
Member
Registered: 2016-05-02
Posts: 2

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

So this is still broken? It doesn't happen on CM, but it does happen on other roms, and for various devices. I am currently helping maintain around 26 ROMs for one device with a group of people, and this is one of a few annoying new errors becoming prevalent across many ROMs.

Offline

#13 2016-09-23 06:48:18

cohen
Member
Registered: 2016-09-23
Posts: 1

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

Hi

Problems comes from an incompatible change in binutils: some section were added. Some build platform have the new binutils and android build tree have old one. The bug comes from clang invocation variables definitions. These doesn't tell clang to use the provided build chain. Then clang uses the native build platform binutils (here /usr/bin/as instead the prebuilts provided as). Then the fix imply applying this patch https://android-review.googlesource.com … _common.mk and then removing all binaries produced by the toolchain (according to where the error appears this could change but removing all STATIC_LIBRARIES/SHARED_LIBRARIES/EXECUTABLES etc dirs in out tree should do it. Could also remove entire out dir). Also remove the ccache cache (if U use it as it stores .o) then rebuild. Fixes consisting in replacing the prebuilt toolchain ld by the native ld is not a solution, just a workaround and could be dangerous (mixing section number is not good).
Other fix consisting in not building libart is also not a fix. The problem may still occur. Keep clang ART in the platform.
Hope it willl help.

Last edited by cohen (2016-09-23 06:51:34)

Offline

#14 2016-10-06 17:22:35

4javier
Member
From: Italia
Registered: 2010-12-01
Posts: 115

Re: Android 6.0 problem toolchain unsupported relloc 42/43..

I'm working on Lollipop. As you can see that file on 5.1 is quite different
https://android.googlesource.com/platfo … _common.mk
I added the line linked by cohen https://android-review.googlesource.com … _common.mk into the ASFLAGS array, but also commented out the line

 -no-integrated-as

that's not present in Marshmallow, and that I think would invalidate the patch. I commented out this line also into the other arrays in that file (but didn't added the line, because the patch left untouched them). Now I get this errors:
http://pastebin.com/9Bm6vt4A

Ideas?

Offline

Board footer

Powered by FluxBB