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

Issue 826067 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

SimpleChrome fails to build ppapi targets because of incorrect binutils

Project Member Reported by jordynass@chromium.org, Mar 26 2018

Issue description

Compile failing on ToT. The first text block below is my args, the second is an error in the compile (all the errors were the same):



use_ozone = true
custom_toolchain = "//build/toolchain/cros:target"
use_vaapi = true
blink_symbol_level = -1
ozone_platform_gbm = true
ozone_platform = "gbm"
cros_v8_snapshot_cc = "/usr/local/google/home/jordynass/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang"
cros_target_cxx = "x86_64-cros-linux-gnu-clang++ -B/usr/local/google/home/jordynass/chromium/.cros_cache/chrome-sdk/tarballs/eve+10503.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wno-unknown-warning-option"
use_system_libsync = true
use_v4lplugin = false
use_lld = false
cros_v8_snapshot_ar = "/usr/local/google/home/jordynass/chromium/src/third_party/binutils/Linux_x64/Release/bin/ar"
cros_host_cc = "/usr/local/google/home/jordynass/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang"
use_cups = true
use_cfi_cast = false
use_system_harfbuzz = true
use_evdev_gestures = true
use_goma = true
cros_host_ar = "/usr/local/google/home/jordynass/chromium/src/third_party/binutils/Linux_x64/Release/bin/ar"
cros_target_extra_cxxflags = "-pipe -pipe -pipe -march=corei7 -fno-split-dwarf-inlining -fdebug-info-for-profiling -D__google_stl_debug_vector=1 -Wno-unknown-warning-option -stdlib=libc++ -Wno-inline-asm"
cros_v8_snapshot_extra_cxxflags = " -Wno-unknown-warning-option"
cros_target_extra_cppflags = ""
clang_use_chrome_plugins = false
symbol_level = 2 
cros_host_extra_cppflags = ""
cros_host_is_clang = true
cros_target_extra_cflags = "-pipe -pipe -march=corei7 -fno-split-dwarf-inlining -fdebug-info-for-profiling -Wno-unknown-warning-option -Wno-inline-asm"
cros_v8_snapshot_extra_cflags = " -Wno-unknown-warning-option"
system_libdir = "lib64"
use_cras = true
use_jumbo_build = false
v8_snapshot_toolchain = "//build/toolchain/cros:v8_snapshot"
cros_v8_snapshot_cxx = "/usr/local/google/home/jordynass/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++"
is_clang = true
cros_v8_snapshot_is_clang = true
use_bundled_fontconfig = false
use_v4l2_codec = true
cros_host_extra_cflags = " -Wno-unknown-warning-option"
target_sysroot = "/usr/local/google/home/jordynass/chromium/.cros_cache/chrome-sdk/tarballs/eve+10503.0.0+sysroot_chromeos-base_chromeos-chrome.tar.xz"
host_toolchain = "//build/toolchain/cros:host"
use_xkbcommon = true
treat_warnings_as_errors = false
icu_use_data_file = true
use_system_libdrm = true
cros_v8_snapshot_extra_ldflags = ""
enable_nacl = true
linux_use_bundled_binutils = true
cros_v8_snapshot_ld = "/usr/local/google/home/jordynass/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++"
enable_remoting = true
ozone_auto_platforms = false
cros_target_ld = "x86_64-cros-linux-gnu-clang++ -B/usr/local/google/home/jordynass/chromium/.cros_cache/chrome-sdk/tarballs/eve+10503.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wno-unknown-warning-option"
target_os = "chromeos"
use_system_minigbm = true
cros_host_extra_cxxflags = " -Wno-unknown-warning-option"
cros_target_ar = "llvm-ar"
is_cfi = false
use_debug_fission = true
cros_host_extra_ldflags = ""
target_cpu = "x64"
remove_webcore_debug_symbols = false
cros_target_extra_ldflags = "-Wl,-O1 -Wl,-O2 -Wl,--as-needed -stdlib=libc++ "
host_pkg_config = "pkg-config"
is_asan = false
is_debug = false
cros_host_cxx = "/usr/local/google/home/jordynass/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++"
cros_host_ld = "/usr/local/google/home/jordynass/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++"
cros_v8_snapshot_extra_cppflags = ""
use_system_freetype = true
goma_dir = "/usr/local/google/home/jordynass/chromium/.cros_cache/common/goma+2"
cros_target_cc = "x86_64-cros-linux-gnu-clang -B/usr/local/google/home/jordynass/chromium/.cros_cache/chrome-sdk/tarballs/eve+10503.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wno-unknown-warning-option"
use_thin_lto = false
is_component_build = false
is_official_build = true
google_api_key = "AIzaSyB5xPRa167froOkV6d90414y0ETWm1PQkU"
google_default_client_id = "1005135349943.apps.googleusercontent.com"
google_default_client_secret = "hnK2HogwFa3XlWsMuBaUpp6D"






[1248/48819] CXX obj/remoting/client/display/display/gl_cursor_feedback.o
FAILED: obj/remoting/client/display/display/gl_cursor_feedback.o 
/usr/local/google/home/jordynass/chromium/.cros_cache/common/goma+2/gomacc x86_64-cros-linux-gnu-clang++ -B/usr/local/google/home/jordynass/chromium/.cros_cache/chrome-sdk/tarballs/eve+10503.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wno-unknown-warning-option -MMD -MF obj/remoting/client/display/display/gl_cursor_feedback.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"327688-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DOS_CHROMEOS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DGTEST_RELATIVE_PATH -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DCHROMEOS -I../.. -Igen -I../../third_party/khronos -I../../gpu -I../../third_party/libyuv/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/webrtc_overrides -I../../third_party/webrtc -fno-strict-aliasing -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -no-canonical-prefixes -m64 -march=x86-64 -Wall -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g2 -gsplit-dwarf -ggnu-pubnames -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -std=gnu++14 -fno-exceptions -fno-rtti --sysroot=../../../.cros_cache/chrome-sdk/tarballs/eve+10503.0.0+sysroot_chromeos-base_chromeos-chrome.tar.xz -fvisibility-inlines-hidden -pipe -pipe -pipe -march=corei7 -fno-split-dwarf-inlining -fdebug-info-for-profiling -D__google_stl_debug_vector=1 -Wno-unknown-warning-option -stdlib=libc++ -Wno-inline-asm -c ../../remoting/client/display/gl_cursor_feedback.cc -o obj/remoting/client/display/display/gl_cursor_feedback.o
In file included from ../../remoting/client/display/gl_cursor_feedback.cc:15:
In file included from ../../remoting/client/display/gl_render_layer.h:14:
../../remoting/client/display/sys_opengl.h:14:10: fatal error: 'GL/gl.h' file not found
#include <GL/gl.h>
         ^~~~~~~~~
1 error generated.
 
Cc: reve...@chromium.org ccameron@chromium.org danakj@chromium.org
Is Eve the host machine in this context? Or is this building an image for Eve?

Comment 3 by danakj@chromium.org, Mar 27 2018

This seems bisectable?
@scollyer: It's an image for Eve.
After a git pull and gclient sync I've been getting the following error instead:

[13096/62564] CXX obj/third_party/swiftshader/src/OpenGL/libEGL/swiftshader_libEGL/Surface.o
FAILED: obj/third_party/swiftshader/src/OpenGL/libEGL/swiftshader_libEGL/Surface.o 
/usr/local/google/home/jordynass/chromium/.cros_cache/common/goma+2/gomacc x86_64-cros-linux-gnu-clang++ -B/usr/local/google/home/jordynass/chromium/.cros_cache/chrome-sdk/tarballs/eve+10503.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wno-unknown-warning-option -MMD -MF obj/third_party/swiftshader/src/OpenGL/libEGL/swiftshader_libEGL/Surface.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"328575-1\" -DOS_CHROMEOS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DNO_SANITIZE_FUNCTION=__attribute__\(\(no_sanitize\(\"function\"\)\)\) -DANGLE_DISABLE_TRACE -DNDEBUG -DEGL_EGLEXT_PROTOTYPES -DEGLAPI=__attribute__\(\(visibility\(\"default\"\)\)\)\ __attribute__\(\(no_sanitize\(\"function\"\)\)\) -I../../third_party/swiftshader/include -I../../third_party/swiftshader/src -I../../third_party/swiftshader/src/OpenGL -I../.. -Igen -fno-strict-aliasing -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -no-canonical-prefixes -m64 -march=x86-64 -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g2 -gsplit-dwarf -ggnu-pubnames -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize -std=c++11 -fno-exceptions -fno-operator-names -ffunction-sections -fdata-sections -fomit-frame-pointer -Os -m64 -fPIC -march=x86-64 -mtune=generic -Wno-sign-compare -std=gnu++14 -fno-exceptions -fno-rtti --sysroot=../../../.cros_cache/chrome-sdk/tarballs/eve+10503.0.0+sysroot_chromeos-base_chromeos-chrome.tar.xz -fvisibility-inlines-hidden -pipe -pipe -pipe -march=corei7 -fno-split-dwarf-inlining -fdebug-info-for-profiling -D__google_stl_debug_vector=1 -Wno-unknown-warning-option -stdlib=libc++ -Wno-inline-asm -c ../../third_party/swiftshader/src/OpenGL/libEGL/Surface.cpp -o obj/third_party/swiftshader/src/OpenGL/libEGL/swiftshader_libEGL/Surface.o
In file included from ../../third_party/swiftshader/src/OpenGL/libEGL/Surface.cpp:30:
../../third_party/swiftshader/src/Main/libX11.hpp:19:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
         ^~~~~~~~~~~~
1 error generated.

Both last night and this morning I has been spitting out 2 errors continuously:

/tmp/ccVxXu9y.s:513: Error: bad register name `%nacl:(%r15,%rbx)'
/tmp/ccVxXu9y.s:524: Error: bad register name `%nacl:(%r15,%r12)'
/tmp/ccVxXu9y.s:527: Error: bad register name `%nacl:(%r15,%rax)'
/tmp/ccVxXu9y.s:548: Error: no such instruction: `naclaspq $40,%r15'
/tmp/ccVxXu9y.s:550: Error: no such instruction: `nacljmp %r11d,%r15'
/tmp/ccVxXu9y.s:589: Error: no such instruction: `naclsspq $40,%r15'
/tmp/ccVxXu9y.s:601: Error: bad register name `%nacl:116(%r15,%rbx)'
/tmp/ccVxXu9y.s:615: Error: bad register name `%nacl:120(%r15,%rbx)'
/tmp/ccVxXu9y.s:621: Error: bad register name `%nacl:116(%r15,%rbx)'
/tmp/ccVxXu9y.s:626: Error: bad register name `%nacl:120(%r15,%rbx)'
/tmp/ccVxXu9y.s:632: Error: no such instruction: `naclaspq $40,%r15'
/tmp/ccVxXu9y.s:637: Error: no such instruction: `nacljmp %r11d,%r15'
/tmp/ccVxXu9y.s:647: Error: bad register name `%nacl:4(%r15,%rbx)'
/tmp/ccVxXu9y.s:660: Error: bad register name `%nacl:4(%r15,%rbx)'
/tmp/ccVxXu9y.s:698: Error: bad register name `%nacl:4(%r15,%rbx)'
/tmp/ccVxXu9y.s:702: Error: bad register name `%nacl:(%r15,%rbx)'
/tmp/ccVxXu9y.s:703: Error: bad register name `%nacl:116(%r15,%rbx)'
/tmp/ccVxXu9y.s:704: Error: bad register name `%nacl:120(%r15,%rbx)'
/tmp/ccVxXu9y.s:708: Error: bad register name `%nacl:4(%r15,%rax)'
/tmp/ccVxXu9y.s:709: Error: bad register name `%nacl:128(%r15,%rbx)'
/tmp/ccVxXu9y.s:710: Error: bad register name `%nacl:129(%r15,%rbx)'
/tmp/ccVxXu9y.s:717: Error: bad register name `%nacl:132(%r15,%rbx)'
/tmp/ccVxXu9y.s:724: Error: bad register name `%nacl:124(%r15,%rbx)'
/tmp/ccVxXu9y.s:732: Error: no such instruction: `nacljmp %r11d,%r15'
/tmp/ccVxXu9y.s:746: Error: no such instruction: `naclsspq $24,%r15'
/tmp/ccVxXu9y.s:764: Error: no such instruction: `naclaspq $24,%r15'
/tmp/ccVxXu9y.s:766: Error: no such instruction: `nacljmp %r11d,%r15'
/tmp/ccVxXu9y.s:798: Error: bad register name `%nacl:4(%r15,%rbx)'
/tmp/ccVxXu9y.s:802: Error: bad register name `%nacl:(%r15,%rbx)'
Correction: I've been building the Chrome binary for Eve (not the full image)
Components: Infra
Components: -Infra Infra>Client>Chrome
Components: -Infra>Client>Chrome
This doesn't seem to be related to infrastructure. 
Labels: -Pri-1 Pri-3
Owner: jhawkins@chromium.org
Status: Started (was: Untriaged)
Cc: vapier@chromium.org binji@chromium.org
TL;DR: I've determined the cause, but could use help affecting a fix via GN.

The core issue is that the SimpleChrome (cros chrome-sdk) build is forcing linux_use_bundled_binutils to true [1].  This causes the following flag to be passed to the compiler for all targets:

-B../../third_party/binutils/Linux_x64/Release/bin

For ppapi targets, my assumption is that linux_use_bundled_binutils should be ignored, but my gn-foo is not up to snuff to achieve that.  I added a check for current_cpu != "pnacl" in the compiler config [2], but some of the ppapi targets (tests it looks like) are not pnacl cpu.

[1] https://cs.chromium.org/chromium/src/third_party/chromite/cli/cros/cros_chrome_sdk.py?type=cs&q=linux_use_bundled_binutils&sq=package:chromium&g=0&l=919

[2] https://cs.chromium.org/chromium/src/build/config/compiler/BUILD.gn?q=linux_use_bundled_binutils&sq=package:chromium&g=0&l=56
Summary: SimpleChrome fails to build ppapi targets because of incorrect binutils (was: Compile failing on Eve)
Cc: steve...@chromium.org llozano@chromium.org
Components: Build
this was done back here:
  https://chromium-review.googlesource.com/353027

i'm not familiar with what the linux_use_bundled_binutils knob does in general to comment further
Cc: dpranke@chromium.org

For host builds (ie: not for things that are going to run on the target machine), we use the linker and binutils that comes with Chrome. We want to make sure that the system binutils is not used.

Maybe ask for help from dpranke@ for your GN needs?


It's possible that the problem in #c12 is the core issue, but that code hasn't changed in a long time, so I don't know why it would've started failing last night. Can you post a link to the compile error specifically?

It seems plausible that you wouldn't want the bundled binutils for the pnacl toolchains. The problem with setting linux_use_bundled_binutils explicitly in args.gn like we're doing is that it'll override the default value logic in //build/config/compiler/BUILD.gn, so it'll be set to true even for non-linux builds.

There are a few things we could try that might work around this. One would be to modify the nacl toolchains to explicitly pass linux_use_bundled_binutils = false in toolchain_args. Another would be to modify line 454 of //build/config/compiler/BUILD.gn to explicitly check for is_linux or target_cpu, but that latter check seems less likely to be right. A third would be to delete the line setting the arg from cros_sdk, because maybe we don't actually need it now.

However, without actually seeing the full error and understanding why jordynass@ is hitting it now but we're not seeing it elsewhere, I'm reluctant to endorse changing anything.
Thank you for the suggestions, Dirk!  I'll take a look at these and see what is feasible.

For context on the issue, my guess is this particular set of targets never built successfully in the 'cros chrome-sdk' shell.  Most folks just build the 'chrome' target.  I don't believe any buildbots build all targets in this environment, so I've attached the log output of a trunk build with no modifications.

(sdk eve R70-10916.0.0) jhawkins@jhawkins003 /usr/local/google/src/chromium/src $ autoninja -C out_eve/Release >& eve_build.log
eve_build.log
3.3 MB View Download
Note: Per the Simple Chrome docs, we haven't made any effort to support targets other than chrome, chrome_sandbox, nacl_helper and chromeos_preflight:

https://chromium.googlesource.com/chromiumos/docs/+/master/simple_chrome_workflow.md#build-chrome

If we need/want to support ppapi or other targets, and we are able to do so, please add a note to the documentation, perhaps with a description of the use case.

(Note: I am not advocating for or against such support, just adding historical context and requesting documentation for the future in case we regress).

Thanks!

Steven: Understood, and will do.  I've had several nooglers get hung up by trying to build all targets (as opposed to just Chrome), so I'm hopeful we can remove that pitfall (and ultimately have the build structured correctly for this flow).

Sign in to add a comment