timosachsenberg commented on PR #51280:
URL: https://github.com/apache/arrow/pull/51280#issuecomment-5668415286

   > In my opinion it is better if we tackle this separately on its own issue.
   
   Filed as #51329 — it reproduces the libxml2 half against a released artifact 
(`libarrow-dev` 24.0.0-1 from the APT repo, where `libarrow.so` records `NEEDED 
libxml2.so.2` but `Arrow::arrow_static` declares nothing), and it ends in a 
`dlopen`-time `undefined symbol: xmlBufferFree` for a downstream consumer 
rather than a link error, which is why it went unnoticed. Happy for it to be 
closed as a duplicate if you'd rather fold this into #50195.
   
   Two observations from writing it up, in case they're useful for wherever the 
fix lands:
   
   - **The pkg-config side needs its own line.** The diff here adds `LibXml2` 
to `ARROW_SYSTEM_DEPENDENCIES` and `LibXml2::LibXml2` to 
`ARROW_STATIC_INSTALL_INTERFACE_LIBS`, but `ARROW_PC_REQUIRES_PRIVATE` is only 
ever populated via `resolve_dependency(... PC_PACKAGE_NAMES ...)`, so a bare 
`find_package(LibXml2 REQUIRED)` won't reach `arrow.pc`. The bundled-AWS branch 
already does this explicitly at `ThirdpartyToolchain.cmake:4262` — 
`string(APPEND ARROW_PC_REQUIRES_PRIVATE " libcurl")` — and the analogous line 
for Azure would be `libxml-2.0` (plus `libcurl`).
   
   - **There's existing precedent for the whole shape of this.** 
`cpp/src/arrow/CMakeLists.txt` populates `ARROW_STATIC_INSTALL_INTERFACE_LIBS` 
from fifteen `SYSTEM` branches and exactly one `BUNDLED` branch — 
`AWSSDK_SOURCE STREQUAL "BUNDLED"` → `CURL::libcurl`. So "a vendored 
dependency's own external requirements still have to be declared" is already an 
established pattern; Azure just never got it, which is also why the macOS 
`_curl_easy_cleanup` failure above is the same bug rather than a separate one.
   
   Worth noting this is a different axis from #50753: that one is about 
**SYSTEM** declarations being easy to forget because they sit apart from 
`resolve_dependency`, whereas libxml2 isn't a dependency Arrow resolves at all, 
so co-locating wouldn't have surfaced it.
   


-- 
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]

Reply via email to