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

Issue 892236 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 13
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

emerging a package with .gn build file fails with removing -fno-exceptions

Project Member Reported by ahass...@chromium.org, Oct 4

Issue description

emerging any package with .gn build file locally results in this failure:

puffin-9999: ERROR at //common-mk/BUILD.gn:14:3: Item not found
puffin-9999:   "-fno-exceptions",
puffin-9999:   ^----------------
puffin-9999: You were trying to remove "-fno-exceptions"
puffin-9999: from the list but it wasn't there.
puffin-9999: See //common-mk/BUILDCONFIG.gn:62:28: which caused the file to be included.
puffin-9999: _binary_target_configs = [ "//common-mk:compiler_defaults" ]
puffin-9999:                            

But it seems like the platform2/common-mk/BUILD.gn:84 removes the exceptions ('fno-exceptions') where the exceptions are disabled. Although gn files are building fine on the builders and fixing this possible error causes the builders fail with the same error. Example: crrev.com/c/1259588

Please advise on a solution.
 
Thank you for raising the issue. I'm on it.
Could you give me the full log of the link to the build log (if it happens on build bot)?

Actually removing the flags on !enable_exceptions is intentional, because corresponding flags will be added again on BUILDCONFIG.gn if !enable_exceptions.
The intention here is to make it possible to remove the enable_exceptions flags per target when the target somehow wants to customize the exceptions related behavior.
The log is the same in the pre-cq build of the aforementioned cl:
https://luci-logdog.appspot.com/v/?s=chromeos/buildbucket/cr-buildbucket.appspot.com/8933653992725793584/+/steps/BuildPackages/0/stdout

Basically I get the same error when I do emerge-<...> on my machine without any modification to the common-mk/BUILD.gn. But apparently the builders are going fine.
Let me clarify. Do you encounter the error on puffin migration from GYP to GN?
If so I'd be happy to review your CL.
Or does it happen on pristine state? If so could you tell me the commands you ran?
Yes, I encounter for both puffin and bsdiff and any other things (I tried dlcservice too). Here is the puffin migration CL:
https://android-review.googlesource.com/c/platform/external/puffin/+/777254

the command I run is:
sudo FEATURES=test emerge puffin
This really is annoying, also building oobe_config has the same problem.
Thanks. The issue reproduced locally after repo sync .

repo sync 
cros_sdk BOARD=betty
sudo FEATURES=test emerge oobe_config # error same as #1 of oobe_config

However, if I use emerge-$BOARD, the issue doesn't happen. This is the command I usually run. I'm not sure which command is used on buildbot.
FEATURES=test emerge-betty oobe_config


For the error in #2, I created a potential fix. I'd appreciate it if you could locally test it.
https://chromium-review.googlesource.com/c/chromiumos/platform2/+/1266936

sudo emerge <packge> is useful when some packges are build only for cros_host so I don't think we should break that.

I tested your change and it builds fine now.
Thanks :)
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/a8197791bf089a4edb2a11a3f6358134c816d017

commit a8197791bf089a4edb2a11a3f6358134c816d017
Author: Keigo Oka <oka@chromium.org>
Date: Sat Oct 13 15:32:16 2018

common-mk: unconditionally remove no exceptions flags in BUILD.gn

It will fix the issue of non-existing values are removed on certain
build path.

BUG= chromium:892236 
BUG=chromium:767517
TEST=precq passes

Change-Id: Ie8b452607881340f023d9b2eb5f5a719a96d5531
Reviewed-on: https://chromium-review.googlesource.com/1266936
Commit-Ready: Keigo Oka <oka@chromium.org>
Tested-by: Keigo Oka <oka@chromium.org>
Reviewed-by: Keigo Oka <oka@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[modify] https://crrev.com/a8197791bf089a4edb2a11a3f6358134c816d017/common-mk/BUILD.gn

Status: Fixed (was: Untriaged)

Sign in to add a comment