Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Build failure on Darwin #1003

Closed
justinseinlin opened this issue Oct 30, 2019 · 2 comments · Fixed by #1005
Closed

Build failure on Darwin #1003

justinseinlin opened this issue Oct 30, 2019 · 2 comments · Fixed by #1005
Assignees
Labels
api: spanner Issues related to the googleapis/google-cloud-cpp-spanner API. priority: p2 Lowest priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@justinseinlin
Copy link

Answering these questions before submitting your bug report will help us give you a quicker answer. Thank you!

If one or more of these questions are not applicable, feel free to remove them.

Does this issue affect the google-cloud-cpp-spanner project?

Yes

What version of google-cloud-cpp-spanner are you using?

c35a64a

What compiler and version are you using?

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

What operating system and version are you using?

macOS Mojave

What were you trying to do?

bazel build ...

What did you expect to see?

Build successful.

What did you see instead?

ERROR: /private/var/tmp/_bazel_justinlin/99bb0419eafc27d481e255d985fdfff4/external/com_github_grpc_grpc/BUILD:353:1: Linking of rule '@com_github_grpc_grpc//:grpc++' failed (Exit 1) cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -lc++ -fobjc-link-runtime -Wl,-S -shared -o bazel-out/darwin-fastbuild/bin/external/com_github_grpc_grpc/libgrpc++.so ... (remaining 14 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
ld: illegal thread local variable reference to regular symbol __ZN9grpc_core26ApplicationCallbackExecCtx18callback_exec_ctx_E for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Anything else you would like us to know?

Bazel version: 1.0.1

@justinseinlin justinseinlin added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Oct 30, 2019
@coryan coryan added priority: p2 Lowest priority. Fix may not be included in next release. and removed triage me I really want to be triaged. labels Oct 30, 2019
@coryan
Copy link
Contributor

coryan commented Oct 30, 2019

Try adding --copt=-DGRPC_BAZEL_BUILD to your Bazel build line, gRPC requires this to build on macOS.

@coryan
Copy link
Contributor

coryan commented Oct 30, 2019

Thanks for filing a detailed bug report. As you can see we changed the .bazelrc file to automatically add this flag when compiling google-cloud-cpp-spanner, but please note (as the documentation now says) that you need the same flag in your own .bazelrc file. There are links to the root cause (bazelbuild/bazel#4341) in the documentation in case you are interested.

@google-cloud-label-sync google-cloud-label-sync bot added the api: spanner Issues related to the googleapis/google-cloud-cpp-spanner API. label Jan 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: spanner Issues related to the googleapis/google-cloud-cpp-spanner API. priority: p2 Lowest priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants