New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 608995 link

Starred by 2 users

Issue metadata

Status: Verified
Owner: ----
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocked on:
issue 610908



Sign in to add a comment

Can't Build Linux Chromium OS on Ubuntu 16.04

Project Member Reported by afakhry@chromium.org, May 4 2016

Issue description

I recently upgraded my personal machine from Ubuntu 14.04 to 16.04, but after that I failed to build the Chromium OS Linux build, with the following errors:

[Error 1]:
[66/20531] SOLINK lib/libprotobuf_lite.so
FAILED: lib/libprotobuf_lite.so lib/libprotobuf_lite.so.TOC 
if [ ! -e lib/libprotobuf_lite.so -o ! -e lib/libprotobuf_lite.so.TOC ]; then /home/ahmed/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/media/ahmed/work/chromium/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 -Wl,--icf=all -o lib/libprotobuf_lite.so -Wl,-soname=libprotobuf_lite.so @lib/libprotobuf_lite.so.rsp && { readelf -d lib/libprotobuf_lite.so | grep SONAME ; nm -gD -f p lib/libprotobuf_lite.so | cut -f1-2 -d' '; } > lib/libprotobuf_lite.so.TOC; else /home/ahmed/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/media/ahmed/work/chromium/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 -Wl,--icf=all -o lib/libprotobuf_lite.so -Wl,-soname=libprotobuf_lite.so @lib/libprotobuf_lite.so.rsp && { readelf -d lib/libprotobuf_lite.so | grep SONAME ; nm -gD -f p lib/libprotobuf_lite.so | cut -f1-2 -d' '; } > lib/libprotobuf_lite.so.tmp && if ! cmp -s lib/libprotobuf_lite.so.tmp lib/libprotobuf_lite.so.TOC; then mv lib/libprotobuf_lite.so.tmp lib/libprotobuf_lite.so.TOC ; fi; fi
/media/ahmed/work/chromium/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: /usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../x86_64-linux-gnu/crti.o: unsupported reloc 42 against global symbol __gmon_start__
/media/ahmed/work/chromium/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: /usr/lib/gcc/x86_64-linux-gnu/5.3.1/crtbeginS.o: unsupported reloc 42 against global symbol _ITM_deregisterTMCloneTable
/media/ahmed/work/chromium/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: /usr/lib/gcc/x86_64-linux-gnu/5.3.1/crtbeginS.o: unsupported reloc 42 against global symbol _ITM_registerTMCloneTable
/media/ahmed/work/chromium/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: /usr/lib/gcc/x86_64-linux-gnu/5.3.1/crtbeginS.o: unsupported reloc 42 against global symbol _Jv_RegisterClasses
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../x86_64-linux-gnu/crti.o(.init+0x7): error: unsupported reloc 42
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/crtbeginS.o(.text+0x1e): error: unsupported reloc 42
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/crtbeginS.o(.text+0x6b): error: unsupported reloc 42
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/crtbeginS.o(.text+0xeb): error: unsupported reloc 42
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1063/20526] CXX obj/v8/src/v8_base.objects.o


----->>> To fix this error I added the following arguments to my GYP_DEFINES: linux_use_bundled_gold=0 linux_use_gold_flags=0. After that, I didn't get that error anymore, however I got the following error:

[ERROR 2]:
[4276/18738] SOLINK lib/libbase.so
FAILED: lib/libbase.so lib/libbase.so.TOC 
if [ ! -e lib/libbase.so -o ! -e lib/libbase.so.TOC ]; then /home/ahmed/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -Wl,--disable-new-dtags -Wl,-uIsHeapProfilerRunning,-uProfilerStart -Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi -Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl -Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv -Wl,--export-dynamic -pthread -m64 -Wl,--icf=all -o lib/libbase.so -Wl,-soname=libbase.so @lib/libbase.so.rsp && { readelf -d lib/libbase.so | grep SONAME ; nm -gD -f p lib/libbase.so | cut -f1-2 -d' '; } > lib/libbase.so.TOC; else /home/ahmed/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -Wl,--disable-new-dtags -Wl,-uIsHeapProfilerRunning,-uProfilerStart -Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi -Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl -Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv -Wl,--export-dynamic -pthread -m64 -Wl,--icf=all -o lib/libbase.so -Wl,-soname=libbase.so @lib/libbase.so.rsp && { readelf -d lib/libbase.so | grep SONAME ; nm -gD -f p lib/libbase.so | cut -f1-2 -d' '; } > lib/libbase.so.tmp && if ! cmp -s lib/libbase.so.tmp lib/libbase.so.TOC; then mv lib/libbase.so.tmp lib/libbase.so.TOC ; fi; fi
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/atomic_base.h:362: error: undefined reference to '__atomic_is_lock_free'
clang: error: linker command failed with exit code 1 (use -v to see invocation)


----->>> To fix this error, I had to manually change the ldflags here [1] in src/build/common.gypi to include '-latomic'.

Could anyone please help triage this issue? I know developing on Ubuntu 16.04 might not be supported at the moment, but this bug is to track the issue and to give the workaround I found to others who may encounter the same problem.

[1]: https://code.google.com/p/chromium/codesearch#chromium/src/build/common.gypi&q=ldflags%20f:src/build/common.gypi&sq=package:chromium&l=3586
 
Building with GN had the same errors too.
Cc: llozano@chromium.org
Components: Build
Labels: Build-Toolchain
Not high priority right now, but + llozano@ since this appears to be toolchain related.

This is fixed by replacing ld.gold from package with ld.gold from 2.26 from Ubuntu itself. Please upgrade binutils x64 package to 2.26.

Comment 5 Deleted

Cc: krasin@chromium.org
What about the "-latomic" ldflag that I had to add?

Also, I found this CL: https://codereview.chromium.org/1910283002/

Could this be a fix?
I don't think so. That CL landed 2 weeks ago, i.e. before I ran into the issue.

Comment 8 by krasin@chromium.org, May 11 2016

Yeah, my CL only resolved just basic issues, like renamed or removed packages.

re: updating binutils. Filed  https://crbug.com/610908 .

Comment 9 by thakis@chromium.org, May 11 2016

Is this better now?
Blockedon: 610908
Yes, I can do the build just fine with 2.26.
Status: Fixed (was: Untriaged)
cool.
Thank you very much!
Bulk verified
Status: Verified (was: Fixed)
bulk verified

Sign in to add a comment