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

Issue 710006 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

./build_packages: chromeos-base/chromeos-chrome due to transport_security_state_generator errors

Project Member Reported by gurcheta...@chromium.org, Apr 10 2017

Issue description

The entire Chrome PFQ is red:

https://uberchromegw.corp.google.com/i/chromeos/waterfall?builder=master-chromium-pfq

Chrome fails to build on all boards.  The error messages we get is:

chromeos-chrome-59.0.3067.0_rc-r1: [8/21515] LINK host/transport_security_state_generator
chromeos-chrome-59.0.3067.0_rc-r1: FAILED: host/transport_security_state_generator 
chromeos-chrome-59.0.3067.0_rc-r1: python "../../../../../../../home/chrome-bot/chrome_root/src/build/toolchain/gcc_link_wrapper.py" --output="host/transport_security_state_generator" -- x86_64-pc-linux-gnu-g++ -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 -Wl,--icf=all -m64 -pthread -Wl,-O1 -Wl,--gc-sections -Wl,-rpath-link=host -Wl,--disable-new-dtags -o "host/transport_security_state_generator" -Wl,--start-group @"host/transport_security_state_generator.rsp"  -Wl,--end-group  -ldl -lrt -latomic -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 
chromeos-chrome-59.0.3067.0_rc-r1: ../../../../../../../home/chrome-bot/chrome_root/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: cannot find -latomic
chromeos-chrome-59.0.3067.0_rc-r1: collect2: error: ld returned 1 exit status

https://uberchromegw.corp.google.com/i/chromeos/builders/cyan-chrome-pfq/builds/1003/steps/BuildPackages/logs/stdio

It could be a problem with our build_packages setup, since assume Chromium got built with the simple Chrome workflow.  Investigating...

 

Comment 1 Deleted

Comment 2 by richard....@arm.com, Apr 10 2017

Copying the workaround I found in  http://crbug.com/710005 

   USE="go" sudo emerge sys-devel/gcc

Using the above ensures that gcc is ./configure'd with --enable-libatomic, which means you get the missing library.
Cc: richard....@arm.com r...@chromium.org
Thanks richard!  Can you send a CL and add us as reviewers (we can cc our toolchain team)?

Comment 4 by richard....@arm.com, Apr 10 2017

Certainly, although we haven't yet verified that the fix works on Intel platforms just yet.
 Issue 710005  has been merged into this issue.

Comment 7 by cmt...@chromium.org, Apr 10 2017

Just curious:  Chrome (and the Chrome PFQ) has been happy for years without building with libatomic...why does it suddenly need this?  What changed?
Cc: sleevi@chromium.org lgar...@chromium.org
My best guess is making transport security state generation part of the build may done this:

https://chromium-review.googlesource.com/c/471529/

+ sleevi, +lgarron.  Why would the Chromium builders pass but the ChromeOS builders would not?

Comment 9 by richard....@arm.com, Apr 10 2017

I think #471529 might be a symptom rather than a cause - the build system doesn't seem to handle these compiled_tools very well. For example, it seems to use pkg-config and grab things out of the board sysroot, which will then cause linker errors when compiling for the host. I've got a tweak to the build system that should address this.
Feel free to upload this tweak :-)
Cc: khmel@chromium.org
Owner: alemate@chromium.org
Transferring to this week's gardeners.  
Cc: mart...@martijnc.be
+martijn@martijnc.be, who did most of the coding for  Issue 595493 .

Assuming the workaround is not enough, what's the easiest way to reproduce this issue?
OK, so after bisection, I'm certain that https://chromium-review.googlesource.com/c/471529/ triggered the problem. It may because it depends on libbase, which is the only place I can find the atomic library being pulled in. Commenting out line 1132 of base/BUILD.gn does seem to fix the link error.
^ But, then you'll run into the linker warnings-as-errors problem.
Cc: dbehr@chromium.org
Reverted by alemate@ in https://codereview.chromium.org/2811733003/

================================================================

Revert "Make transport security state generation part of the build."

This reverts commit 6ee4f021659260c12c361bb78eb211c9ba69e8bf.

Reason for revert:
This breaks Chrome PFQ with error:
chromeos-chrome-59.0.3067.0_rc-r1: ../../../../../../../home/chrome-bot/chrome_root/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: cannot find -latomic

Original change's description:
> Make transport security state generation part of the build.
>
> This CL adds a build step to generate transport_security_state_static.h
> when required.
>
> Bug:595493
>
> Change-Id: I478137a40d9107cbcc6470ee544bda66823ebbff
> Reviewed-on: https://chromium-review.googlesource.com/471529
> Reviewed-by: Lucas Garron <lgarron@chromium.org>
> Reviewed-by: Ryan Sleevi <rsleevi@chromium.org>
> Commit-Queue: Ryan Sleevi <rsleevi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#463090}

TBR=rsleevi@chromium.org,peter@chromium.org,lgarron@chromium.org,martijn@martijnc.be,cbentzel+watch@chromium.org,net-reviews@chromium.org

BUG= 710006  [added to Rietveld description by lgarron]

Change-Id: I84536c89c093531f1cf60cbdd4a3cfb2efbe5d80
Reviewed-on: https://chromium-review.googlesource.com/474009
Reviewed-by: Yury Khmel <khmel@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#463428}(cherry picked from commit 5e671fffc45441c5dd3458871a8aa8f4a3f2e632)
Review-Url: https://codereview.chromium.org/2811733003 .
Cr-Commit-Position: refs/branch-heads/3067@{#4}
Cr-Branched-From: e2ed4b4539b7a50d8be892e4437897b18c181c91-refs/heads/master@{#463157}
Committed: https://chromium.googlesource.com/chromium/src/+/efa139d3af68589d5b803a8a322f41d83e56af06
Status: Fixed (was: Available)
I think this is fixed now ( https://uberchromegw.corp.google.com/i/chromeos/builders/master-chromium-pfq/builds/4212 ) , but we have another issues.
Richard's CL mentioned in #9 is up at https://codereview.chromium.org/2818523002/.
https://codereview.chromium.org/2823303003/ contains a more permanent fix for this.
Project Member

Comment 20 by bugdroid1@chromium.org, Apr 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2b156ccc00ebdb53389dc59917f60cf1d1dde6ac

commit 2b156ccc00ebdb53389dc59917f60cf1d1dde6ac
Author: richard.townsend <richard.townsend@arm.com>
Date: Thu Apr 27 17:44:03 2017

base: remove -latomic in CrOS chroot

libbase is needed when using compiled_action targets (these are
helper programs compiled for use later in the build), but it doesn't
currently build for the host inside the CrOS sysroot because the
toolchain doesn't include the libatomic library. libbase does, however,
seem to compile without the -latomic flag.

TEST=Revert 5e671fffc45441c5dd3458871a8aa8f4a3f2e632, compile elm
BUG= 710006 ,  710841 

Review-Url: https://codereview.chromium.org/2823303003
Cr-Commit-Position: refs/heads/master@{#467721}

[modify] https://crrev.com/2b156ccc00ebdb53389dc59917f60cf1d1dde6ac/base/BUILD.gn

Sign in to add a comment