You are not logged in.

#1 2016-03-08 11:57:45

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

v8 fails to compile - 'unsupported reloc 42'

[413/706] LINK mksnapshot
FAILED: /mytmp/yaourt-tmp-bart/aur-v8/src/v8/third_party/llvm-build/Release+Asserts/bin/clang++ -Wl,-O1,--sort-common,--as-needed,-z,relro -B/mytmp/yaourt-tmp-bart/aur-v8/src/v8/third_party/binutils/Linux_x64/Release/bin -pthread -fuse-ld=gold -B/mytmp/yaourt-tmp-bart/aur-v8/src/v8/third_party/binutils/Linux_x64/Release/bin -fuse-ld=gold -B/mytmp/yaourt-tmp-bart/aur-v8/src/v8/third_party/binutils/Linux_x64/Release/bin -L/usr/lib -licui18n -licuuc -licudata -m64 -m64 -o mksnapshot -Wl,--start-group obj/src/snapshot/mksnapshot.mksnapshot.o obj/tools/gyp/libv8_base.a obj/tools/gyp/libv8_nosnapshot.a obj/tools/gyp/libv8_libplatform.a obj/tools/gyp/libv8_libbase.a -Wl,--end-group  -ldl -lrt -licui18n -licuuc -licudata
/mytmp/yaourt-tmp-bart/aur-v8/src/v8/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: /usr/lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib64/crti.o: unsupported reloc 42 against global symbol __gmon_start__
/mytmp/yaourt-tmp-bart/aur-v8/src/v8/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: /usr/lib/libc_nonshared.a(atexit.oS): unsupported reloc 42 against global symbol __dso_handle
/usr/lib64/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib64/crti.o(.init+0x7): error: unsupported reloc 42
/usr/lib/libc_nonshared.a(atexit.oS):function atexit: error: unsupported reloc 42
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[413/706] CXX obj/testing/gmock/src/gmock.gmock-matchers.o
ninja: build stopped: subcommand failed.

Any idea what the cause might be?
Trying to build https://aur.archlinux.org/packages/v8/

Same issue? https://bbs.archlinux.org/viewtopic.php?id=209698

Last edited by sleeping (2016-03-08 12:40:01)

Offline

#2 2016-03-08 17:22:50

SigmaDraconis
Member
Registered: 2015-08-17
Posts: 3

Re: v8 fails to compile - 'unsupported reloc 42'

The problem is that the binutils package version that V8 bundles with the 3rd party tools has a bug that was fixed in higher versions ( 2.26 doesn't have it).

So I cheated a little bit smile

mv ./build/v8-git-mirror-4.3.66/third_party/binutils/Linux_x64/Release/bin/ld.gold ./build/v8-git -mirror-4.3.66/third_party/binutils/Linux_x64/Release/bin/ld.gold.OLD

ln -s /usr/bin/ld.gold ./build/v8-git-mirror-4.3.66/third_party/binutils/Linux_x64/Release/bin/ld.gold

Run make (or make static, whatever you're using) and voilá.

Last edited by SigmaDraconis (2016-03-08 21:43:29)

Offline

#3 2016-03-09 10:07:41

marcs
Member
From: Italy
Registered: 2007-09-07
Posts: 63

Re: v8 fails to compile - 'unsupported reloc 42'

Interesting, I'll check on that.

Maybe forcing to use the system-wide binutils during compilation would fix also future problems.

[EDIT]

Setting: -Dlinux_use_bundled_gold=0 forced gyp to use system-wide ld.gold.

Thank you.

Last edited by marcs (2016-03-09 10:44:17)

Offline

#4 2016-03-09 12:10:52

SigmaDraconis
Member
Registered: 2015-08-17
Posts: 3

Re: v8 fails to compile - 'unsupported reloc 42'

Yes, that works too smile

Offline

#5 2016-04-23 22:09:17

cj360
Member
Registered: 2013-10-12
Posts: 67

Re: v8 fails to compile - 'unsupported reloc 42'

marcs wrote:

Interesting, I'll check on that.

Maybe forcing to use the system-wide binutils during compilation would fix also future problems.

[EDIT]

Setting: -Dlinux_use_bundled_gold=0 forced gyp to use system-wide ld.gold.

Thank you.

Where did you put the "-Dlinux_use_bundled_gold=0" ? Into art/build/Android.common_build.mk?

Offline

#6 2016-04-24 15:28:13

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,945

Re: v8 fails to compile - 'unsupported reloc 42'

check the latest version of the aur V8 package, that parameter was added to the "build/gypv_8" command


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB