Uh oh!
There was an error while loading. Please reload this page.
ARROW-16902: [C++][FlightRPC] Fix DLL linkage in Flight SQL - #13434
Conversation
b462ac2 to
6d38848Compare
kou
left a comment
There was a problem hiding this comment.
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.
lidavidm
commented
Jun 25, 2022
Ah, thanks Kou, you're right - I'll fix this up. |
lidavidm
commented
Jun 27, 2022
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 |
lidavidm
commented
Jun 27, 2022
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 |
jduo
commented
Jun 27, 2022
I'm OK with removing these tests to deal with this problem. |
lidavidm
commented
Jun 28, 2022
I made the |
lidavidm
commented
Jul 7, 2022
Looks like this builds successfully on Windows now. |
Also, enable Flight SQL in Windows CI builds.