ARROW-16902: [C++][FlightRPC] Fix DLL linkage in Flight SQL#13434
ARROW-16902: [C++][FlightRPC] Fix DLL linkage in Flight SQL#13434kou merged 8 commits intoapache:masterfrom
Conversation
|
|
b462ac2 to
6d38848
Compare
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.
|
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. |
Also, enable Flight SQL in Windows CI builds.