Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

davidanthoff
Copy link
Contributor

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.

@github-actions
Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on JIRA?
https://issues.apache.org/jira/browse/ARROW

Then could you also rename pull request title in the following format?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

See also:

@pitrou
Copy link
Member

pitrou commented Apr 21, 2020

How does BinaryBuilder compile Windows binaries on Linux? Using MinGW?

@pitrou
Copy link
Member

pitrou commented Apr 21, 2020

(also, could you please open an issue on JIRA as explained above?)

@davidanthoff
Copy link
Contributor Author

How does BinaryBuilder compile Windows binaries on Linux? Using MinGW?

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.

(also, could you please open an issue on JIRA as explained above?)

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 :)

@@ -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
Copy link
Member

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

Copy link
Contributor Author

@davidanthoff davidanthoff Apr 21, 2020

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.

@wesm
Copy link
Member

wesm commented Apr 22, 2020

@davidanthoff would you mind opening a JIRA issue for this and updating the PR title?

@fsaintjacques fsaintjacques changed the title Use lowercase ws2_32 everywhere ARROW-8602: [C++][CMake] Fix ws2_32 link issue when cross-compiling on Linux Apr 27, 2020
@fsaintjacques
Copy link
Contributor

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants