-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Thrift] Make Thrift static again #7302
Conversation
Good catch, could you also bump the control version to |
@Rastaban done. Though maybe this patch still isn't right, shouldn't whether it's static or shared be driven by |
@philjdf I am myself confused by the |
If the library can be built as static or shared then yes, Go ahead and switch it to using |
|
But it does appear that Thrift can be built both statically and dynamically? |
I see thrift being built statically with mainline right now. If that's not true just comment below, otherwise I'm closing this PR. |
@cbezault I've tried the following triplets:
I'd say the PR with the modifications discussed above is needed. |
I've tried removing Not sure what's going on with Given one of the patches the Arrow port applies is to how it finds Thrift, to look in the tools dir for the compiler (rather than the bin dir as specified by the CMake target), is that something I can fix while I'm at it? |
These latest changes give:
So things are behaving on Windows but we're still getting an .so on Linux. I have verified that BUILD_SHARED_LIBS is OFF on Linux. |
Interesting, it appears that |
So if you're not Win32, it removes the option and hard-codes to a shared lib, otherwise if we're on Win32 we get the choice with default to static? It over-writes the correct value of In which case we need to set When I said |
It would appear to be that way. It seems the fix would be to:
|
From what @philjdf is saying, he got the Windows shared lib to build. |
It's true that it built, but there are a bunch of places that state that thrift should only be built statically on Windows. However, it's not exactly clear why to me. |
@cbezault You're right. It seems that they are aiming to support Windows shared binaries for the 0.13 release:
Given that the vcpkg port file picks up the master branch from a few months ago, the Windows Thrift DLL might still be missing some symbol or might now be working. @philjdf As @Rastaban pointed, we should document this above the |
Have made changes as discussed here. I've added a couple of comments, and kept the more careful clearing out of the compiler from the bin dir because that will be required when we can support building shared. Can confirm:
|
Master seems to be building Thrift as a shared library. Reviewing the history shows we've lost the flags which build Thrift statically.