Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
0.14.0
Description
The boost dependencies in cpp/CMakeLists.txt are specified in the wrong order: the system library currently comes first, followed by the filesystem library. They should be specified in the opposite order, as filesystem depends on system.
It seems to depend on the version of boost or how it is compiled whether this problem becomes apparent. I am currently setting up the project like this:
CXX=clang++-7.0 CC=clang-7.0 \ cmake \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX=/tmp/arrow4/dist \ -DCMAKE_INSTALL_LIBDIR=lib \ -DARROW_WITH_RAPIDJSON=ON \ -DARROW_PARQUET=ON \ -DARROW_PYTHON=ON \ -DARROW_FLIGHT=OFF \ -DARROW_GANDIVA=OFF \ -DARROW_BUILD_UTILITIES=OFF \ -DARROW_CUDA=OFF \ -DARROW_ORC=OFF \ -DARROW_JNI=OFF \ -DARROW_TENSORFLOW=OFF \ -DARROW_HDFS=OFF \ -DARROW_BUILD_TESTS=OFF \ -DARROW_RPATH_ORIGIN=ON \ ..
After compiling, I libarrow.so is missing symbols:
nm -C /dist/lib/libarrow.so | grep boost::system::system_c U boost::system::system_category()
It seems like this is related to whether or not boost has been compiled with BOOST_SYSTEM_NO_DEPRECATED. (according to this post, anyway). I have to say that I don't understand why boost as BUNDLED should be compiled that way...
If I apply the following patch, everything works as expected:
diff -pur a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
--- a/cpp/CMakeLists.txt 2019-06-29 00:26:37.000000000 +0200
+++ b/cpp/CMakeLists.txt 2019-07-16 16:36:03.980153919 +0200
@@ -642,8 +642,8 @@ if(ARROW_STATIC_LINK_LIBS)
add_dependencies(arrow_dependencies ${ARROW_STATIC_LINK_LIBS})
endif()
-set(ARROW_SHARED_PRIVATE_LINK_LIBS ${ARROW_STATIC_LINK_LIBS} ${BOOST_SYSTEM_LIBRARY}
- ${BOOST_FILESYSTEM_LIBRARY} ${BOOST_REGEX_LIBRARY})
+set(ARROW_SHARED_PRIVATE_LINK_LIBS ${ARROW_STATIC_LINK_LIBS} ${BOOST_FILESYSTEM_LIBRARY}
+ ${BOOST_SYSTEM_LIBRARY} ${BOOST_REGEX_LIBRARY})
list(APPEND ARROW_STATIC_LINK_LIBS ${BOOST_SYSTEM_LIBRARY} ${BOOST_FILESYSTEM_LIBRARY}
${BOOST_REGEX_LIBRARY})
Attachments
Issue Links
- links to