This repository was archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 191
PARQUET-847: Fix CMake compilation error on Debian #231
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaf libraries that are linked into the final .so should not be compiled as shared -- in fact, I don't see a lot of benefit to having a
libparquet_thrift.a. I'm going to submit a PR that removes thisThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, but consider the fact that I removed several times my BUILD_DIRECTORY so all CMakeCache files should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the problem isn't reproducible starting from a new build of Thrift with
-fPIC, settingTHRIFT_HOME(clearing out any old Thrift installations before build/install), and a clean build, then I'm not sure how to proceed. Here is a build recipe that I know to produce the rightlibthrift.a-- I have not tested it with Thrift 0.10 yet: https://github.com/conda-forge/thrift-cpp-feedstock/blob/master/recipe/build.sh. I just created https://issues.apache.org/jira/browse/PARQUET-849 to upgrade the Thrift in our default toolchainThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok let me know if I have to close this PullRequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes -- if you run into a reproducible failure, please open a new JIRA. Sorry about the trouble, build toolchains are always a bit of a pain to set up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to compile it with Debian jessie, I have exactly the following error, even with the compilation mentioned in https://github.com/conda-forge/thrift-cpp-feedstock/blob/master/recipe/build.sh.
I also tried to edit CMakeCache.txt and Change the "CMAKE_CXX_FLAGS:STRING=-fPIC" re-compile and install, but the same error occurred:
[ 78%] Linking CXX shared library ../../../debug/libarrow_io.so
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_system-mt.a(error_code.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here is that your system's boost was build without
-fPIC, you need to rebuild with./bootstrap.sh && ./b2 "cxxflags=-fPIC"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xhochy is right. It's really very unfortunate that the Linux distributions do not add the proper compiler flags to allow static linking in shared libraries -- you may consider creating a bug report to the Debian developers to fix their boost libraries.
@olivier-bezet to work around your issue without rebuilding boost, you can pass -DARROW_BOOST_USE_SHARED=on in https://github.com/apache/parquet-cpp/blob/master/cmake_modules/ThirdpartyToolchain.cmake#L326 -- @xhochy maybe we should add a Parquet-cpp option to use shared boost libs when building Arrow automatically in the Thirdparty toolchain?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see https://issues.apache.org/jira/browse/PARQUET-853
@xhochy we are not statically linking the Arrow pieces when we're building Arrow via ExternalProject. This is like to be a source of problems when the user does
make install. see https://issues.apache.org/jira/browse/PARQUET-854patches would be welcome
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks,
I had the same problem with thrift, so I installed it using the similar fPIC option:
./boostrap.sh && ./configure --without-php_extension --without-tests --without-qt4 CPPFLAGS=-fPICAnd it is ok now.