-
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-16902: [C++][FlightRPC] Fix DLL linkage in Flight SQL #13434
Conversation
|
b462ac2
to
6d38848
Compare
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.
How about creating ARROW_FLIGHT_SQL_EXPORT
instead of reusing ARROW_FLIGHT_EXPORT
because Flight and Flight SQL provide separated DLLs?
If we reuse ARROW_FLIGHT_EXPORTING
, Flight SQL uses __declspec(dllexport)
not __declspec(dllimport)
to use Flight API.
Ah, thanks Kou, you're right - I'll fix this up. |
Protobuf does not interact very well with dllexport declarations (seemingly on purpose/the team considers it a bad idea: https://groups.google.com/g/protobuf/c/PDR1bqRazts) so hopefully this works to get Flight SQL on Windows (MinGW/MSVC). The root of the issue here is that client_test.cc uses the Protobuf classes directly, which then means we have to deal with getting dllexport/dllimport annotated in all the right places in the generated Protobuf sources (and the compiler apparently does not do this fully correctly). The tests can't really be rewritten to not use the Protobuf classes directly, but given those tests rely exclusively on mocks, I wonder if they're even worth keeping. CC @jduo |
MinGW works now; something about MSVC is not working. I can reproduce the issue, but not sure why it's happening yet. (The suggestions of adding |
I'm OK with removing these tests to deal with this problem. |
I made the |
Looks like this builds successfully on Windows now. |
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.
+1
Also, enable Flight SQL in Windows CI builds.