Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-9137

GRPC build fails to pass compiler flags

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 1.7.0
    • build
    • None
    • Mesosphere Sprint 2018-26
    • 2

    Description

      The GRPC build integration fails to pass compiler flags down from the main build into the GRPC component build. This can make the build fail in surprising ways.

      For example, if you use CXXFLAGS="-fsanitize=thread" CFLAGS="-fsanitize=thread", the build fails because of the inconsistent application of these flags across bundled components.

      In this build log, libprotobuf was built using the correct flags, which then causes GRPC to fail because it is missing the flags:

      make[3]: Entering directory '/home/jpeach/src/asf-mesos/build/3rdparty'
         20 cd grpc-1.10.0 &&                                       \
         19   CPPFLAGS="-I/home/jpeach/src/asf-mesos/build/3rdparty/protobuf-3.5.0/src              \
         18                         \
         17                         \
         16             -Wno-array-bounds"                  \
         15   make                  \
         14     /home/jpeach/src/asf-mesos/build/3rdparty/grpc-1.10.0/libs/opt/libgrpc++.a /home/jpeach/src/asf-mesos/build/3rdparty/grpc-1      .10.0/libs/opt/libgrpc.a /home/jpeach/src/asf-mesos/build/3rdparty/grpc-1.10.0/libs/opt/libgpr.a         \
         13     CC="/home/jpeach/src/asf-mesos/build/cc"                                    \
         12     CXX="/home/jpeach/src/asf-mesos/build/c++"                          \
         11     LD="/home/jpeach/src/asf-mesos/build/cc"                                    \
         10     LDXX="/home/jpeach/src/asf-mesos/build/c++"                         \
          9     LDFLAGS="-L/home/jpeach/src/asf-mesos/build/3rdparty/protobuf-3.5.0/src/.libs               \
          8                         \
          7              "          \
          6     HAS_PKG_CONFIG=false                        \
          5     NO_PROTOC=false                             \
          4     PROTOC="/home/jpeach/src/asf-mesos/build/3rdparty/protobuf-3.5.0/src/protoc"
          3 make[4]: Entering directory '/home/jpeach/src/asf-mesos/build/3rdparty/grpc-1.10.0'
          2 mkdir -p `dirname /home/jpeach/src/asf-mesos/build/3rdparty/grpc-1.10.0/bins/opt/grpc_cpp_plugin`
          1 /home/jpeach/src/asf-mesos/build/c++ -L/home/jpeach/src/asf-mesos/build/3rdparty/protobuf-3.5.0/src/.libs                                                           /home/jpeach/src/asf-mesos/build/3rdparty/grpc-1.10.0/objs/opt/src/compiler/cpp_plugin.o /home/j      peach/src/asf-mesos/build/3rdparty/grpc-1.10.0/libs/opt/libgrpc_plugin_support.a  -lprotoc -lprotobuf -ldl -lrt -lm -lpthread -      lz  -lprotoc -lprotobuf -o /home/jpeach/src/asf-mesos/build/3rdparty/grpc-1.10.0/bins/opt/grpc_cpp_plugin
      31    /home/jpeach/src/asf-mesos/build/3rdparty/protobuf-3.5.0/src/.libs/libprotoc.a(code_generator.o): In function `__cxx_global_var      _init':
          1 code_generator.cc:(.text.startup+0xd): undefined reference to `__tsan_func_entry'
          2 code_generator.cc:(.text.startup+0x43): undefined reference to `__tsan_func_exit'
          3 code_generator.cc:(.text.startup+0x57): undefined reference to `__tsan_func_exit'
          4 /home/jpeach/src/asf-mesos/build/3rdparty/protobuf-3.5.0/src/.libs/libprotoc.a(code_generator.o): In function `_GLOBAL__sub_I_c      ode_generator.cc':
          5 code_generator.cc:(.text.startup+0x7d): undefined reference to `__tsan_func_entry'
          6 code_generator.cc:(.text.startup+0x8c): undefined reference to `__tsan_func_exit'
          7 code_generator.cc:(.text.startup+0xa0): undefined reference to `__tsan_func_exit'
          8 /home/jpeach/src/asf-mesos/build/3rdparty/protobuf-3.5.0/src/.libs/libprotoc.a(code_generator.o): In function `google::protobuf      ::compiler::CodeGenerator::~CodeGenerator()':
          9 code_generator.cc:(.text._ZN6google8protobuf8compiler13CodeGeneratorD0Ev+0x14): undefined reference to `__tsan_func_entry'
         10 /home/jpeach/src/asf-mesos/build/3rdparty/protobuf-3.5.0/src/.libs/libprotoc.a(code_generator.o): In function `google::protobuf      ::compiler::CodeGenerator::GenerateAll(std::vector<google::protobuf::FileDescriptor const*, std::allocator<google::protobuf::Fi      leDescriptor const*> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::      protobuf::compiler::GeneratorContext*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const'      :
      

      Attachments

        Activity

          People

            chhsia0 Chun-Hung Hsiao
            jamespeach James Peach
            James Peach James Peach
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: