Reranko05 commented on issue #1243: URL: https://github.com/apache/arrow-java/issues/1243#issuecomment-5076747589
@kou I investigated this issue and wanted to share my findings before preparing a patch. Observations: - `arrow-java` links against `Arrow::arrow_static`, which exports `Arrow::arrow_bundled_dependencies`. - `arrow_bundled_dependencies` is created by `arrow_create_merged_static_lib()`. - `arrow_create_merged_static_lib()` only merges the libraries explicitly listed in `ARROW_BUNDLED_STATIC_LIBS`; it doesn't recursively traverse `INTERFACE_LINK_LIBRARIES`. - `protobuf::libprotobuf` has many Abseil dependencies through `INTERFACE_LINK_LIBRARIES`, but `ARROW_BUNDLED_STATIC_LIBS` only contains `protobuf::libprotobuf` and not the Abseil targets. - The existing cross-compilation workaround added in [#49523](https://github.com/apache/arrow/pull/49523) explicitly appends the required Abseil libraries to `ARROW_BUNDLED_STATIC_LIBS`. Hypothesis: Since the Abseil libraries are only appended under `CMAKE_CROSSCOMPILING`, it seems possible that native Windows ends up bundling `protobuf::libprotobuf` without the required Abseil libraries, leading to the unresolved `LogMessageFatal` symbol. As an experiment, I changed: ```diff - if(CMAKE_CROSSCOMPILING) + if(CMAKE_CROSSCOMPILING OR MSVC) ``` and Arrow builds successfully with this change. I haven't yet been able to validate it against `arrow-java`. Is this the right direction to investigate further? If so, what would be the preferred way to validate the fix before opening a PR? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
