You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/09 06:19:43 UTC

[GitHub] [pulsar] yaalsn opened a new issue, #17563: [Client][CPP] Python client for Windows

yaalsn opened a new issue, #17563:
URL: https://github.com/apache/pulsar/issues/17563

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
   
   
   ### Motivation
   
   I try to build cpp client  with `static` flag, and it seems that link progress will be fail. https://github.com/apache/pulsar/runs/8223165825?check_suite_focus=true#step:12:239
   
   Maybe we need to fix CMakeLists.txt to support the compile. 
   
   ### Solution
   
   _No response_
   
   ### Alternatives
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit 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: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on issue #17563: [Client][CPP] Python client for Windows

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on issue #17563:
URL: https://github.com/apache/pulsar/issues/17563#issuecomment-1247560372

   The root cause might be 
   
   > LINK : fatal error LNK1104: cannot open file 'python310.lib' [D:\a\pulsar\pulsar\pulsar-client-cpp\build-1\python\_pulsar.vcxproj]
   
   Pulsar Python client build requires a Python library installed on Windows. Could you help set up the Python in the workflow file? @yaalsn 


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] yaalsn commented on issue #17563: [Client][python] Build Python client for Windows

Posted by GitBox <gi...@apache.org>.
yaalsn commented on issue #17563:
URL: https://github.com/apache/pulsar/issues/17563#issuecomment-1255878673

   @BewareMyPower  Thanks for your help!


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on issue #17563: [Client][python] Build Python client for Windows

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on issue #17563:
URL: https://github.com/apache/pulsar/issues/17563#issuecomment-1255759501

   I'm working on this issue in my own branch: https://github.com/BewareMyPower/pulsar/commits/bewaremypower/cpp-static-link. Now the Pulsar libraries can be built successfully on MSVC with `LINK_STATIC=ON`, but the Python build still failed. I will continue fixing 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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on issue #17563: [Client][CPP] Python client for Windows

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on issue #17563:
URL: https://github.com/apache/pulsar/issues/17563#issuecomment-1247897615

   I have confirmed again, the `python3` dependency has already been added to `vcpkg.json` in your PR, I think it might be something wrong with the `CMakeLists.txt`.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on issue #17563: [Client][python] Build Python client for Windows

Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on issue #17563: [Client][python] Build Python client for Windows

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #17563:
URL: https://github.com/apache/pulsar/issues/17563#issuecomment-1288319249

   The issue had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org