Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong cc toolchain selected on Mac #8330

Closed
katre opened this issue May 15, 2019 · 1 comment
Closed

Wrong cc toolchain selected on Mac #8330

katre opened this issue May 15, 2019 · 1 comment
Assignees
Labels
P1 I'll work on this now. (Assignee required) query bugs Bugs related to "bazel (c)query" team-Configurability platforms, toolchains, cquery, select(), config transitions team-Rules-CPP Issues for C++ rules

Comments

@katre
Copy link
Member

katre commented May 15, 2019

@jayconrod reports: When testing with this flag on in rules_go at dd527c7d with Bazel 0.26.0rc8 on macOS, I'm seeing this error:

$ bazel build --incompatible_enable_cc_toolchain_resolution tests/legacy/examples/cgo:sub
> > Loading: 
Loading: 0 packages loaded
Analyzing: target //tests/legacy/examples/cgo:sub (0 packages loaded, 0 targets configured)
INFO: Analyzed target //tests/legacy/examples/cgo:sub (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
bazel: Entering directory `/private/var/tmp/_bazel_jayconrod/95575c789b578fe26b1744a32454af42/execroot/io_bazel_rules_go/'
[0 / 2] [Prepa] BazelWorkspaceStatusAction stable-status.txt
ERROR: /Users/jayconrod/go/src/github.com/bazelbuild/rules_go/tests/legacy/examples/cgo/BUILD.bazel:29:1: GoCompilePkg tests/legacy/examples/cgo/darwin_amd64_stripped/sub%/github.com/bazelbuild/rules_go/examples/cgo/sub.a failed (Exit 1) builder failed: error executing command bazel-out/host/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix darwin_amd64 -src tests/legacy/examples/cgo/sub/floor.go -importpath ... (remaining 19 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
ld: framework not found UIKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
compilepkg: error running subcommand: exit status 1
bazel: Leaving directory `/private/var/tmp/_bazel_jayconrod/95575c789b578fe26b1744a32454af42/execroot/io_bazel_rules_go/'
Target //tests/legacy/examples/cgo:sub failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.488s, Critical Path: 0.29s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

It looks like -framework UIKit is being added to the C++ link flags. This target doesn't set link flags on its own, so I think this is coming from cc_common. Is that expected?

Originally posted by @jayconrod in #7260 (comment)

@katre
Copy link
Member Author

katre commented May 15, 2019

@katre katre self-assigned this May 15, 2019
@katre katre added P1 I'll work on this now. (Assignee required) query bugs Bugs related to "bazel (c)query" team-Configurability platforms, toolchains, cquery, select(), config transitions team-Rules-CPP Issues for C++ rules labels May 15, 2019
katre added a commit to katre/bazel that referenced this issue May 15, 2019
katre added a commit to katre/bazel that referenced this issue May 15, 2019
katre added a commit to katre/bazel that referenced this issue May 15, 2019
aehlig pushed a commit that referenced this issue May 17, 2019
?oolchains.

Fixes #8330.

Closes #8332.

PiperOrigin-RevId: 248383561
aehlig pushed a commit that referenced this issue May 20, 2019
?oolchains.

Fixes #8330.

Closes #8332.

PiperOrigin-RevId: 248383561
aehlig pushed a commit that referenced this issue May 21, 2019
?oolchains.

Fixes #8330.

Closes #8332.

PiperOrigin-RevId: 248383561
aehlig pushed a commit that referenced this issue May 22, 2019
?oolchains.

Fixes #8330.

Closes #8332.

PiperOrigin-RevId: 248383561
aehlig pushed a commit that referenced this issue May 23, 2019
?oolchains.

Fixes #8330.

Closes #8332.

PiperOrigin-RevId: 248383561
aehlig pushed a commit that referenced this issue May 23, 2019
?oolchains.

Fixes #8330.

Closes #8332.

PiperOrigin-RevId: 248383561
aehlig pushed a commit that referenced this issue May 24, 2019
?oolchains.

Fixes #8330.

Closes #8332.

PiperOrigin-RevId: 248383561
irengrig pushed a commit to irengrig/bazel that referenced this issue Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) query bugs Bugs related to "bazel (c)query" team-Configurability platforms, toolchains, cquery, select(), config transitions team-Rules-CPP Issues for C++ rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant