google / mako

Mako - A performance testing library and service
Apache License 2.0
59 stars 14 forks source link

CLI build (and probably others) is broken on mac #10

Open timford opened 4 years ago

timford commented 4 years ago

macbookpro2 ~> which gcc /usr/bin/gcc

macbookpro2 ~> gcc --version Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin19.3.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

./bazel-0.24.1-darwin-x86_64 build --cxxopt='-std=c++14'

Gives the following errors:

INFO: Analysed target //cli:mako (83 packages loaded, 9603 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel/935c1634a455af65486597a2cbbf99c8/external/com_google_protobuf/BUILD:106:1: C++ compilation of rule '@com_google_protobuf//:protobuf_lite' failed (Exit 1) cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 36 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
external/com_google_protobuf/src/google/protobuf/arena.cc:147:1: warning: attribute declaration must precede definition [-Wignored-attributes]
PROTOBUF_FUNC_ALIGN(32)
^
/usr/local/include/google/protobuf/port_def.inc:207:51: note: expanded from macro 'PROTOBUF_FUNC_ALIGN'
#define PROTOBUF_FUNC_ALIGN(bytes) __attribute__((aligned(bytes)))
                                                  ^
/usr/local/include/google/protobuf/arena_impl.h:110:9: note: previous definition is here
  void* AllocateAligned(size_t n) {
        ^
external/com_google_protobuf/src/google/protobuf/arena.cc:148:18: error: redefinition of 'AllocateAligned'
void* ArenaImpl::AllocateAligned(size_t n) {
                 ^
/usr/local/include/google/protobuf/arena_impl.h:110:9: note: previous definition is here
  void* AllocateAligned(size_t n) {
        ^
external/com_google_protobuf/src/google/protobuf/arena.cc:192:47: error: redefinition of 'GetSerialArenaFast'
inline PROTOBUF_ALWAYS_INLINE bool ArenaImpl::GetSerialArenaFast(
                                              ^
/usr/local/include/google/protobuf/arena_impl.h:331:31: note: previous definition is here
  PROTOBUF_ALWAYS_INLINE bool GetSerialArenaFast(SerialArena** arena) {
                              ^
1 warning and 2 errors generated.
Target //cli:mako failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.843s, Critical Path: 1.91s
INFO: 19 processes: 19 darwin-sandbox.
FAILED: Build did NOT complete successfully
luang008 commented 4 years ago

Hi Tim,

Ran into this thread when digging into a similar issue.

FYI I fixed my issue following discussion here. In case it might help with your problem too.