Issue metadata
Sign in to add a comment
|
Linux: linker segmentation fault building swiftshader with debian_jessie_i386-sysroot |
||||||||||||||||||||
Issue descriptionChrome Version: Chromium version 59.0.3071.82 OS: Ubuntu 14.04 64-bit host What steps will reproduce the problem? (1) Build a Chromium-derived product using the following GN configuration (which uses debian_jessie_i386-sysroot): dcheck_always_on=true is_component_build=false is_debug=false is_official_build=true symbol_level=1 target_cpu="x86" use_allocator="none" use_sysroot=true What is the expected result? Build should succeed. What happens instead? Build fails with the following error: [12:12:17][Step 6/8] [9191/28537] SOLINK swiftshader/libGLESv2.so [12:12:17][Step 6/8] FAILED: swiftshader/libGLESv2.so swiftshader/libGLESv2.so.TOC swiftshader/libGLESv2.so.map.gz [12:12:17][Step 6/8] python "/var/build/chromium/src/build/toolchain/gcc_solink_wrapper.py" --readelf="readelf" --nm="nm" --sofile="swiftshader/libGLESv2.so" --tocfile="swiftshader/libGLESv2.so.TOC" --map-file "swiftshader/libGLESv2.so.map.gz" --output="swiftshader/libGLESv2.so" -- ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,--version-script=../../third_party/swiftshader/src/OpenGL/libGLESv2/exports.map -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../../third_party/binutils/Linux_x64/Release/bin -Wl,--threads -Wl,--thread-count=4 -Wl,--icf=all -m32 -pthread -Wl,-O1 -Wl,--gc-sections --sysroot=../../build/linux/debian_jessie_i386-sysroot -L/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/lib/i386-linux-gnu -Wl,-rpath-link=/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/lib/i386-linux-gnu -L/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/usr/lib/i386-linux-gnu -Wl,-rpath-link=/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/usr/lib/i386-linux-gnu -L/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/lib/i586-linux-gnu -Wl,-rpath-link=/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/lib/i586-linux-gnu -L/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/usr/lib/i586-linux-gnu -Wl,-rpath-link=/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/usr/lib/i586-linux-gnu -L/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/usr/lib/gcc/i486-linux-gnu/4.6 -Wl,-rpath-link=/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/usr/lib/gcc/i486-linux-gnu/4.6 -L/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/usr/lib -Wl,-rpath-link=/var/build/chromium/src/build/linux/debian_jessie_i386-sysroot/usr/lib -Werror -Wl,--hash-style=both -Wl,--gc-sections -o "swiftshader/libGLESv2.so" -Wl,-soname="libGLESv2.so" @"swiftshader/libGLESv2.so.rsp" [12:12:17][Step 6/8] /proc/cpuinfo: Bad address [12:12:17][Step 6/8] ../../third_party/binutils/Linux_x64/Release/bin/ld.gold: internal error in get_section_contents, at icf.cc:467 [12:12:17][Step 6/8] clang: error: linker command failed with exit code 1 (use -v to see invocation) Please use labels and text to provide additional information. The problem does not reproduce with M58 which uses the debian_wheezy_i386-sysroot. However, M58 also does not include the swiftshader library. Likely related to issue #535356 and https://sourceware.org/bugzilla/show_bug.cgi?id=20642.
,
Jun 5 2017
Correct, this is a 32-bit Linux build on a 64-bit Linux host. I believe using the i386 sysroot (use_sysroot=true target_cpu="x86") is the preferred/supported method for creating 32-bit Linux builds currently. According to [1] we no longer distribute official 32-bit Linux builds of Google Chrome for desktop but will continue to support the 32-bit Linux configuration for Chromium. [1] https://groups.google.com/a/chromium.org/d/msg/chromium-dev/FoE6sL-p6oU/mVlwyh02AgAJ
,
Jun 5 2017
Thanks for pointing that out. Got it reproduced and taking a closer look.
,
Jun 5 2017
The following revision refers to this bug: https://swiftshader.googlesource.com/SwiftShader.git/+/0f7d4279d19249e890457387e8249eb146d91fba commit 0f7d4279d19249e890457387e8249eb146d91fba Author: Nicolas Capens <capn@google.com> Date: Mon Jun 05 17:31:24 2017 Work around gold linker bug for 32-bit code. Bug chromium:729532 Change-Id: Ie10edb39fdc61557f394cddca981f55e89b63cc4 Reviewed-on: https://swiftshader-review.googlesource.com/9950 Reviewed-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <capn@google.com> Tested-by: Nicolas Capens <capn@google.com> [modify] https://crrev.com/0f7d4279d19249e890457387e8249eb146d91fba/BUILD.gn
,
Jun 5 2017
Thanks for the quick fix! :)
,
Jun 5 2017
Applying the change from comment#4 to my local M59 Chromium checkout I now get the following error:
$ gn gen out/Chromium
ERROR at //third_party/swiftshader/BUILD.gn:92:11: Undefined identifier
if (use_gold && target_cpu == "x86") {
^-------
See //BUILD.gn:398:15: which caused the file to be included.
deps += [ "//third_party/swiftshader" ]
^--------------------------
We probably also need to add this line in BUILD.gn to get the use_gold definition:
import("//build/config/compiler/compiler.gni")
,
Jun 5 2017
Yes, for some reason I missed that. Already fixed it: https://swiftshader-review.googlesource.com/9951 I'm currently working on doing a DEPS roll.
,
Jun 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dc765076992fe39ab135745b332c9838f3e777bd commit dc765076992fe39ab135745b332c9838f3e777bd Author: capn <capn@chromium.org> Date: Thu Jun 08 16:27:47 2017 Roll SwiftShader 2b6ac18..7c0d347 https://swiftshader.googlesource.com/SwiftShader.git/+log/2b6ac18..7c0d347 BUG= 729532 TBR=kbr@chromium.org TEST=bots CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel Change-Id: I98278c78eea9038f479d95a1c475db7cc71e889f Review-Url: https://codereview.chromium.org/2929833002 Cr-Commit-Position: refs/heads/master@{#477992} [modify] https://crrev.com/dc765076992fe39ab135745b332c9838f3e777bd/DEPS
,
Jun 8 2017
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by capn@chromium.org
, Jun 5 2017Status: Assigned (was: Untriaged)