Repository navigation
Closed
Description
What version of protobuf and what language are you using?
Version: 3.6.0.1
Language: Java
What operating system (Linux, Windows, ...) and version?
macOS 10.13.5
What runtime / compiler are you using (e.g., python version or gcc version)
ghost:protobuf-3.6.0.1 vmax$ clang -v
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
ghost:protobuf-3.6.0.1 vmax$ ld -v
@(#)PROGRAM:ld PROJECT:ld64-351.8
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: LLVM version 9.1.0, (clang-902.0.39.2) (static support for 21, runtime is 21)
TAPI support using: Apple TAPI version 9.1.0 (tapi-902.0.9)
What did you do?
bazel build //:protobuf
What did you expect to see
Build completing successfully
What did you see instead?
INFO: Analysed target //:protobuf (0 packages loaded).
INFO: Found 1 target...
INFO: From Linking libprotobuf.a:
/Library/Developer/CommandLineTools/usr/bin/libtool: file: bazel-out/darwin-fastbuild/bin/_objs/protobuf/src/google/protobuf/io/gzip_stream.pic.o has no symbols
/Library/Developer/CommandLineTools/usr/bin/libtool: file: bazel-out/darwin-fastbuild/bin/_objs/protobuf/src/google/protobuf/util/internal/error_listener.pic.o has no symbols
ERROR: /Users/vmax/protobuf-3.6.0.1/BUILD:105:1: Linking of rule '//:protobuf' failed (Exit 1)
ld: unknown option: -no-as-needed
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Target //:protobuf failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.467s, Critical Path: 0.24s
INFO: 1 process: 1 darwin-sandbox.
FAILED: Build did NOT complete successfully
Anything else we should know about your project / environment
Using clang and ld from Command Line Tools 9.4
It may be connected since it worked before
Reacted by Yu and Sai He
Metadata
Metadata
Assignees
Labels
No labels
Activity
yuikns commentedon Jun 28, 2018
I am meeting exactly the same question.
It seems like to be an environment related issue, since it had worked pretty well before I updated some packages through App Store and bazel itself.
My bazel:
My error message :
yuikns commentedon Jun 28, 2018
It worked pretty fine in bazel-0.14.1
Going to the release page and download the binary release for mac through url https://github.com/bazelbuild/bazel/releases/download/0.14.1/bazel-0.14.1-darwin-x86_64
It resolve the problem.
bazelbuild/bazel#5468
xfxyjwf commentedon Jun 30, 2018
@vmax @yuikns Thanks for the reports. Closing as this looks like a bazel issue: bazelbuild/bazel#5468