Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-2257

[C++] Add high-level option to toggle CXX11 ABI

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: C++
    • Labels:
      None

      Description

      Using gcc-4.8-based toolchain libraries from conda-forge I ran into the following failure when building on Ubuntu 16.04 with clang-5.0

      [48/48] Linking CXX executable debug/python-test
      FAILED: debug/python-test 
      : && /usr/bin/ccache /usr/bin/clang++-5.0  -ggdb -O0  -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-deprecated -Wno-weak-vtables -Wno-padded -Wno-comma -Wno-unused-parameter -Wno-unused-template -Wno-undef -Wno-shadow -Wno-switch-enum -Wno-exit-time-destructors -Wno-global-constructors -Wno-weak-template-vtables -Wno-undefined-reinterpret-cast -Wno-implicit-fallthrough -Wno-unreachable-code-return -Wno-float-equal -Wno-missing-prototypes -Wno-old-style-cast -Wno-covered-switch-default -Wno-cast-align -Wno-vla-extension -Wno-shift-sign-overflow -Wno-used-but-marked-unused -Wno-missing-variable-declarations -Wno-gnu-zero-variadic-macro-arguments -Wconversion -Wno-sign-conversion -Wno-disabled-macro-expansion -Wno-gnu-folding-constant -Wno-reserved-id-macro -Wno-range-loop-analysis -Wno-double-promotion -Wno-undefined-func-template -Wno-zero-as-null-pointer-constant -Wno-unknown-warning-option -Werror -std=c++11 -msse3 -maltivec -Werror -D_GLIBCXX_USE_CXX11_ABI=0 -Qunused-arguments  -fsanitize=address -DADDRESS_SANITIZER -fsanitize-coverage=trace-pc-guard -g  -rdynamic src/arrow/python/CMakeFiles/python-test.dir/python-test.cc.o  -o debug/python-test  -Wl,-rpath,/home/wesm/code/arrow/cpp/build/debug:/home/wesm/miniconda/envs/arrow-dev/lib:/home/wesm/cpp-toolchain/lib debug/libarrow_python_test_main.a debug/libarrow_python.a debug/libarrow.so.0.0.0 /home/wesm/miniconda/envs/arrow-dev/lib/libpython3.6m.so /home/wesm/cpp-toolchain/lib/libgtest.a -lpthread -ldl orc_ep-install/lib/liborc.a /home/wesm/cpp-toolchain/lib/libprotobuf.a /home/wesm/cpp-toolchain/lib/libzstd.a /home/wesm/cpp-toolchain/lib/libz.a /home/wesm/cpp-toolchain/lib/libsnappy.a /home/wesm/cpp-toolchain/lib/liblz4.a /home/wesm/cpp-toolchain/lib/libbrotlidec-static.a /home/wesm/cpp-toolchain/lib/libbrotlienc-static.a /home/wesm/cpp-toolchain/lib/libbrotlicommon-static.a -lpthread -Wl,-rpath-link,/home/wesm/cpp-toolchain/lib && :
      debug/libarrow.so.0.0.0: undefined reference to `orc::ParseError::ParseError(std::string const&)'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*)'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::internal::fixed_address_empty_string[abi:cxx11]'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::Message::GetTypeName[abi:cxx11]() const'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::Message::InitializationErrorString[abi:cxx11]() const'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::MessageLite::SerializeToString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteString(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)'
      debug/libarrow.so.0.0.0: undefined reference to `google::protobuf::MessageLite::ParseFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
      debug/libarrow.so.0.0.0: undefined reference to `orc::RowReaderOptions::includeTypes(std::list<unsigned long, std::allocator<unsigned long> > const&)'
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      ninja: build stopped: subcommand failed.
      

      The problem was that I added -DGLIBCXX_USE_CXX11_ABI=0 in ARROW_CXXFLAGS instead of CMAKE_CXX_FLAGS. We should either add a build option to set this correctly or document it better in the README

        Attachments

          Activity

            People

            • Assignee:
              wesm Wes McKinney
              Reporter:
              wesm Wes McKinney
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: