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/13 10:29:08 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request, #17614: [fix][cpp] Fix libcurl build failure when building deb package

BewareMyPower opened a new pull request, #17614:
URL: https://github.com/apache/pulsar/pull/17614

   ### Motivation
   
   See https://github.com/apache/pulsar/pull/17538#issuecomment-1244898721
   
   The root cause is when libcurl is built from source, it uses [`ld`](https://linux.die.net/man/1/ld) to check if the `libcurl.so` links to the correct dependencies in runtime. In Linux, a dynamic library links to the paths of `/etc/ld.so.conf` by default. However, different from other images like `centos:7` and `alpine`, this file includes `/usr/lib/x86_64-linux-gnu` in `debian:9`.
   
   ```bash
   $ cat /etc/ld.so.conf
   include /etc/ld.so.conf.d/*.conf
   
   $ cat /etc/ld.so.conf.d/*.conf
   /usr/lib/x86_64-linux-gnu/libfakeroot
   # libc default configuration
   /usr/local/lib
   # Multiarch support
   /lib/x86_64-linux-gnu
   /usr/lib/x86_64-linux-gnu
   ```
   
   When libcurl is compiled, it links to the install path of libopenssl via the `--with-ssl` option:
   
   https://github.com/apache/pulsar/blob/1f50366768e76f1a5f7084f7972167f989ddd0af/pulsar-client-cpp/pkg/deb/Dockerfile#L85
   
   i.e. `/usr/local/ssl/lib/libopenssl.so`.
   
   However, after the `libcurl.so` is built, it links to `/usr/lib/x86_64-linux-gnu/libssl.so.1.1`, see the following output:
   
   ```bash
   $ ldd /usr/local/lib/libcurl.so
   /usr/local/lib/libcurl.so: /usr/lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/local/lib/libcurl.so)
   ```
   
   In `debian:9`, the default libopenssl version is 1.1.0:
   
   ```bash
   $ strings /usr/lib/x86_64-linux-gnu/libssl.so.1.1 | grep OpenSSL
   OpenSSL 1.1.0l  10 Sep 2019
   ```
   
   The ABI compatibility is not guaranteed between 1.1.0l and 1.1.1n, see https://abi-laboratory.pro/index.php?view=timeline&l=openssl.
   
   ### Modifications
   
   Set the `LD_LIBRARY_PATH` to `/usr/local/ssl/lib` in the Dockerfile to build deb package.
   
   Actually it's not required for other images like `centos:7`, but it's also good to add the `LD_LIBRARY_PATH` to them. So this PR set the environment variable to them as well.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
   
   - [x] `doc-not-needed` 
   (Please explain why)
   
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)
   


-- 
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] lhotari commented on pull request #17614: [fix][cpp] Fix libcurl build failure when building deb package

Posted by GitBox <gi...@apache.org>.
lhotari commented on PR #17614:
URL: https://github.com/apache/pulsar/pull/17614#issuecomment-1245311634

   This PR fixes the broken master branch. The GitHub Actions workflow was also broken in a recently merged change (#17571
   ) so the fix for that issue is also part of this 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

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


[GitHub] [pulsar] lhotari merged pull request #17614: [fix][cpp] Fix libcurl build failure when building deb package

Posted by GitBox <gi...@apache.org>.
lhotari merged PR #17614:
URL: https://github.com/apache/pulsar/pull/17614


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