New issue
Advanced search Search tips

Issue 756253 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 724628



Sign in to add a comment

Chrome/ChromeOS - mksnapshot fails to link with libc++ on ARM32

Project Member Reported by manojgupta@chromium.org, Aug 16 2017

Issue description

I was trying to build Chrome with libc++ on ChromeOS and the build failed because of failure in linking v8_snapshot/mksnaphot

https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/release/builds/13811

Build logs:
https://luci-logdog.appspot.com/v/?s=chromeos%2Fbb%2Fchromiumos.tryserver%2Frelease%2F13811%2F%2B%2Frecipes%2Fsteps%2FBuildPackages__afdo_use_%2F0%2Fstdout

From the build logs, the failure is because linker had "-m32" option in command line. As a result, it couldn't libc++ libraries. 

chromeos-chrome-62.0.3187.0_rc-r1: [2/6432] LINK v8_snapshot/mksnapshot
chromeos-chrome-62.0.3187.0_rc-r1: FAILED: v8_snapshot/mksnapshot 
chromeos-chrome-62.0.3187.0_rc-r1: python "../../../../../../../home/chrome-bot/chrome_root/src/build/toolchain/gcc_link_wrapper.py" --output="v8_snapshot/mksnapshot" -- x86_64-pc-linux-gnu-clang++ -pie -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--no-as-needed -lpthread -Wl,--as-needed -fuse-ld=gold -B../../../../../../../home/chrome-bot/chrome_root/src/third_party/binutils/Linux_x64/Release/bin 
====================
-m32
====================
 -Wl,-rpath-link=v8_snapshot -Wl,--disable-new-dtags -Wl,-O1 -Wl,--gc-sections -o "v8_snapshot/mksnapshot" -Wl,--start-group @"v8_snapshot/mksnapshot.rsp"  -Wl,--end-group   -ldl -lpthread -lrt 

chromeos-chrome-62.0.3187.0_rc-r1: ../../../../../../../home/chrome-bot/chrome_root/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: warning: skipping incompatible /usr/lib/libc++.so while searching for c++
chromeos-chrome-62.0.3187.0_rc-r1: ../../../../../../../home/chrome-bot/chrome_root/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: cannot find -lc++

Interestingly, libc++ build with amd64 board is fine so this issue is limited to building arm32 (ChromeOS) on x86_64 host.

Is there a reason for passing -m32 to the host linker when building v8_snapshot/mksnapshot?
 

Comment 1 by thakis@chromium.org, Aug 17 2017

I believe this is correct and desired. mksnapshot runs on host, so it needs to codegen x86, but it generates files whose pointer width must match the target, so it must use 32-bit.

So I'm guessing you just need to provide an x86 libc++ in your sysroot?
Cc: llozano@chromium.org
Yup, I think what thakis@ wrote in #c1 is correct.
Owner: manojgupta@chromium.org
Thanks for confirmation, I just want wanted to ensure that passing -m32 is not an accident.

Summary: Chrome/ChromeOS - mksnapshot fails to link with libc++ on ARM32 (was: Chrome/ChromeOS Arm32 build uses -m32 for building mksnapshot)
Labels: libcxx
Status: Verified (was: Untriaged)

Sign in to add a comment