BewareMyPower commented on issue #17563:
URL: https://github.com/apache/pulsar/issues/17563#issuecomment-1253871630

   I checked this issue today. It requires the changes to CMakeLists.txt 
because the dynamic library of Python client (`_pulsar.so`) should be linked 
statically, i.e. with the `-DLINK_STATIC=ON` CMake option. Unfortunately, when 
`LINK_STATIC` option is enabled, it only tries to find the `*.a` library, which 
is a static library in Linux and macOS, as the static library, while it should 
also be `*.lib` on Windows. See 
https://github.com/apache/pulsar/blob/8441f6724b1aa502df580518ae14f0c559f53547/pulsar-client-cpp/CMakeLists.txt#L144
   
   BTW, @yaalsn your CI workflow is wrong. The `BUILD_STATIC_LIB` option means 
building a static library of Pulsar, but the `LINK_STATIC` option means the 
Pulsar library, which could be either static or dynamic, links to a static 
library.
   
   For Linux build:
   - `BUILD_STATIC_LIB=ON`: `libpulsar.a` will be generated
   - `LINK_STATIC=ON`: If `libpulsar.so` or `libpulsar.a` is generated, the 
dependencies are statically linked. For example, for the libcurl dependency, 
`libcurl.a` is linked (just in compile time because it's statically linked) 
while `libcurl.so` is not used.


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