-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ARROW-8602: [C++][CMake] Fix ws2_32 link issue when cross-compiling on Linux #7001
Conversation
Thanks for opening a pull request! Could you open an issue for this pull request on JIRA? Then could you also rename pull request title in the following format?
See also: |
How does |
(also, could you please open an issue on JIRA as explained above?) |
Yes, it uses MinGW for Windows, but then it also cross-compiles to lots of other platforms. The PR that tries to get arrow to build is JuliaPackaging/Yggdrasil#918.
I'm not familiar with JIRA, so I'll have to find some time for that, hopefully soon. But no promises, right now I want to use the time I have for this project to get the build to work :) |
cpp/cmake_modules/FindThrift.cmake
Outdated
@@ -100,7 +100,7 @@ if(Thrift_FOUND OR THRIFT_FOUND) | |||
INTERFACE_INCLUDE_DIRECTORIES "${THRIFT_INCLUDE_DIR}") | |||
if(WIN32 AND NOT MSVC) | |||
# We don't need this for Visual C++ because Thrift uses | |||
# "#pragma comment(lib, "Ws2_32.lib")" in | |||
# "#pragma comment(lib, "ws2_32.lib")" in |
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.
We should not change this because this is the code in Thrift: https://github.com/apache/thrift/blob/master/lib/cpp/src/thrift/windows/config.h#L66
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.
That makes sense, I adjusted this.
I should probably double check that the cross compile still works without this, though. Will report back once I have tried that.
@davidanthoff would you mind opening a JIRA issue for this and updating the PR title? |
@davidanthoff feel free to create an account on JIRA so that I can assign you the ticket https://issues.apache.org/jira/browse/ARROW-8602 |
With this patch I can cross-compile arrow from a Linux system, in particular I can compile Windows binaries on a Linux system (using https://binarybuilder.org/). I hope to eventually be able to use things from Julia with this.
My best guess is that the inconsistent casing of
ws2_32
in the various build files/systems is no problem when compiling things on Windows because file systems there tend to be case insensitive.