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

[C++] Linker errors with glog and gflags

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 0.12.0
    • C++

    Description

      This is very recent, probably one of Saturday's or Sunday's merges:

      [176/293] Linking CXX executable debug/plasma_store_server
      FAILED: debug/plasma_store_server 
      : && /usr/bin/ccache /usr/bin/g++-7  -Wno-noexcept-type  -fuse-ld=gold -ggdb -O0  -Wall -msse4.2 -fdiagnostics-color=always -Wextra -Wunused-result -Wno-unused-parameter -Wno-implicit-fallthrough -Wconversion -D_GLIBCXX_USE_CXX11_ABI=1 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -fPIC -g  -rdynamic src/plasma/CMakeFiles/plasma_store_server.dir/store.cc.o  -o debug/plasma_store_server  -Wl,-rpath,/home/antoine/miniconda3/envs/pyarrow/lib: -lrt debug/libplasma.a debug/libarrow_cuda.a debug/libarrow.a -Wl,-Bstatic -lcudart_static -Wl,-Bdynamic -ldl -lrt -lcuda -lrt /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a /home/antoine/miniconda3/envs/pyarrow/lib/libzstd.a /home/antoine/miniconda3/envs/pyarrow/lib/libz.so /home/antoine/miniconda3/envs/pyarrow/lib/libsnappy.a /home/antoine/miniconda3/envs/pyarrow/lib/liblz4.a /home/antoine/miniconda3/envs/pyarrow/lib/libbrotlidec-static.a /home/antoine/miniconda3/envs/pyarrow/lib/libbrotlienc-static.a /home/antoine/miniconda3/envs/pyarrow/lib/libbrotlicommon-static.a double-conversion_ep/src/double-conversion_ep/lib/libdouble-conversion.a /home/antoine/miniconda3/envs/pyarrow/lib/libboost_system.so /home/antoine/miniconda3/envs/pyarrow/lib/libboost_filesystem.so /home/antoine/miniconda3/envs/pyarrow/lib/libboost_regex.so jemalloc_ep-prefix/src/jemalloc_ep/dist//lib/libjemalloc_pic.a -lpthread /usr/lib/x86_64-linux-gnu/libpthread.so /home/antoine/miniconda3/envs/pyarrow/lib/libflatbuffers.a -lpthread && :
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
      /home/antoine/miniconda3/envs/pyarrow/lib/libglog.a(libglog_la-logging.o):logging.cc:function _GLOBAL__sub_I_logging.cc: error: undefined reference to 'google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
      collect2: error: ld returned 1 exit status
      

      This is the build command line:

      cmake .. -GNinja \
          -DCMAKE_BUILD_TYPE=Debug \
          -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
          -DCMAKE_INSTALL_MESSAGE=LAZY \
          -DARROW_CXXFLAGS="$ARROW_CXXFLAGS" \
          -DARROW_CUDA=on \
          -DARROW_PARQUET=on \
          -DARROW_PLASMA=on \
          -DARROW_PYTHON=on \
          -DARROW_GANDIVA=off \
          -DARROW_BUILD_TESTS=on \
      
      nice cmake --build . --target install
      

      These are the installed versions (through Anaconda):

      gflags                    2.2.2                he6710b0_0    defaults
      glog                      0.3.5                hf484d3e_1    defaults
      

      Attachments

        Issue Links

          Activity

            People

              sarutak Kousuke Saruta
              apitrou Antoine Pitrou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h