-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Point-independent code to avoid static linking issues #12
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
Could you please explain a bit more about why they must be statically linked? Does it actually present a problem to use a newer version |
Let me break this into two patches. It's probably worth coming up with an example showing how incompatible libstdc++ can cause problems. The -fPIC issue is much more serious as the static binaries in this build cannot be linked into shared libraries. |
That sounds like a great idea, @wesm. Will gladly accept the |
@@ -13,6 +13,9 @@ set -x -e | |||
INCLUDE_PATH="${PREFIX}/include" | |||
LIBRARY_PATH="${PREFIX}/lib" | |||
|
|||
# Always build PIC code for easier static linking | |||
CXXFLAGS="${CXXFLAGS} -O3 -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.
Is O3
safe? I think I haven't seen optimization options added to any conda package. Or is it needed by 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.
It shouldn't be needed by -fPIC
.
That is a good question about -O3
. I don't know how well that works with Boost. Have seen other libraries that have issues with this level of optimization. We should investigate this further.
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.
I know that Impala is compiling all of its boost with -O3 and it does not cause problems, but bears more examination
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.
Don't get me wrong. If it works reliably, we definitely should go for that speed up. Just want to be sure about the reliability part.
Separated up |
@jakirkham I've been digging around for some consistent information about libstdc++; it sounds like systems with gcc 4.6 or lower as their default toolchain, you need to consistently do |
Ok, well let's go ahead with this PS - Could you please bump the build number? |
Done, and rebased |
LGTM |
Someone want to pull the trigger on this? @msarahan @jakirkham? |
Thanks @wesm and @jakirkham for review. |
Thanks |
Fix missing include in boost::serialization
The point independent code means that the boost static libraries can be properly statically linked while creating other shared libraries. This makes so that users of those shared libraries do not need to install the boost dynamic libraries on their system.