Skip to content

./configure'ing with built but not installed SSL breaks some features #3006

@unlightable

Description

@unlightable

Maybe that's something I actually do wrong and it's not a legit problem, but still.

I did this

I'm trying to build libcurl as a shared library that depends on prebuilt libssl that differs from installed in the system.
That libssl is bundled with another libraries (including libcurl) and deployed with an executable that is built with $ORIGIN in rpath. This is not the issue, but that usage pattern leads to an actuall one.

./configure --prefix=/home/user --enable-ares=/home/user --with-ssl=/home/user does what it's suppose to do, but with a twist.

I experienced the following

./configure executes fine, but it fails some 'seems to work' tests like this:

...
configure:48929: checking if poll is prototyped
configure:48944: result: yes
configure:48960: checking if poll is compilable
configure:48989: gcc -c -Werror-implicit-function-declaration -O2 -Wno-system-headers    -I/home/user/include   conftest.c >&5
configure:48996: $? = 0
configure:49002: result: yes
configure:49022: checking if poll seems to work
configure:49079: gcc -o conftest -Werror-implicit-function-declaration -O2 -Wno-system-headers    -I/home/user/include      -L/home/user/lib   conftest.c -lssl -lcrypto -lssl -lcrypto   -lz -lrt >&5
configure:49083: $? = 0
configure:49089: ./conftest
./conftest: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
configure:49093: $? = 127
configure: program exited with status 127
...

There are about 8 test that fail in a similar fashion and disable some features, although for me disabling poll was critical.

The issue here, if I'm seeing it right, is that it can't load .so's that are not in ld search path, but still links against them.

I'm not really sure if

  • those test do need to link against all libraries libcurl will be linked against
  • LD_LIBRARY_PATH, modifying rpath of test executable or similar tools should be used

My dirty fix is to just put prebuilt libraries in ./ before running configure, but it seems... bad?

curl/libcurl version

$ ~/bin/curl --version
curl 7.61.1-DEV (x86_64-unknown-linux-gnu) libcurl/7.61.1-DEV OpenSSL/1.1.0h zlib/1.2.3 c-ares/1.14.0
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

operating system

Centos 6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions