Red Hat Bugzilla – Bug 488895
libcurl depends on libssh2
Last modified: 2013-07-02 19:35:14 EDT
Description of problem:
An application that requires libcurl cannot configure itself because
of link error against a symbol libssh2_something... Installing libssh2-devel
solves the issue. I think "yum install libcurl-devel" should pull
libssh2-devel as well.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Make sure that libssh2-devel is not installed
2. yum install libcurl-devel
3. Find an application that uses libcurl
4. If application is configured with autotools, at ./confgure step
the libcurl detection will say:
checking whether libcurl is usable ... no
libcurl-devel can be installed, but not useable
RPM requires should refer libssh2-devel
This is a bit confusing to me, because I don't understand if BuildRequires
is necessary or Requires, but for -devel package.
The autoconf files of the application cannot do anything because they
cannot know if a specific implementation of libcurl needs libssh2, I think.
At first glance I can't see any dependency of libcurl headers on libssh2 headers. Which application are you building? Could you please attach the failing autoconf test?
Pete, please attach the config.log to let us have a look what happenned.
I added the libssh2-devel dependency to libcurl-devel so it should be fixed. But I'm curious what failed as well.
curl-7.19.4-2.fc10 has been submitted as an update for Fedora 10.
curl-7.19.4-2.fc9 has been submitted as an update for Fedora 9.
I removed libssh2-devel and found that I cannot reproduce the problem.
The libssh2 cannot be removed because there's a (necessary) dependency.
So, I looked at the logs. The /var/log/yum says:
Mar 05 08:47:57 Installed: libevent-devel-1.4.5-2.fc11.x86_64
Mar 05 08:48:19 Installed: db4-devel-4.7.25-11.fc11.x86_64
Mar 05 12:59:00 Updated: libcurl-7.19.4-1.fc11.x86_64
Mar 05 12:59:01 Updated: libcurl-7.19.4-1.fc11.i586
Mar 05 12:59:04 Installed: libcurl-devel-7.19.4-1.fc11.x86_64
Mar 05 14:39:41 Updated: libssh2-1.0-2.fc11.x86_64
Mar 05 14:39:41 Updated: libssh2-1.0-2.fc11.i586
Mar 05 14:39:42 Installed: libssh2-devel-1.0-2.fc11.x86_64
Mar 05 14:43:28 Updated: pcre-7.8-2.fc11.x86_64
Mar 05 14:43:30 Installed: pcre-devel-7.8-2.fc11.x86_64
The gap between 1 p.m and 2:40 p.m. is when I tried to figure why
libcurl was unusable. I'm not used to understanding config.log, and
the failure was quite a bit up from the tail end.
IIRC the link failed because of libssh2_session_block_directions.
I think the following actually happened:
The libcurl-7.19.4-1.fc11 that I installed as a dependency for libcurl-devel
needed a new libssh2, but did not require the right release. So, when linked
against previously installed libssh2-0.18-8.fc11 it failed. Then, when
I installed libssh2-devel, yum updated libss2 to libssh2-1.0-2.fc11.
Like Kamil said, libssh2-devel is not necessary to build applications
with librucl (but libssh2 is necessary to run them). So what I made
Jindrich to do was incorrect. The correct fix would be for libcurl
to require libssh2 >= 1.0, I suspect now. Currently, the dependency
is automatic without a version:
[root@niphredil zaitcev]# rpm -q --requires libcurl | grep ssh
Yes, it makes sense. Thank you for investigating this! Please what's the application you tried to build? We need to verify that problem is really gone after fixing this correctly.
Don't worry about setting it up to run, that may be convoluted.
Also, I don't have a spec file yet. But the build should be just
sh autogen.sh and then ./configure && make.
curl-7.19.4-2.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.
curl-7.19.4-2.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.
I've tested it on F-10 and it works for me with libssh2-0.18-7.fc9.x86_64 and without libssh2-devel:
# rpm -q libssh2 libssh2-devel libcurl libcurl-devel
package libssh2-devel is not installed
checking for curl-config... /usr/bin/curl-config
checking for the version of libcurl... 7.19.4
checking for libcurl >= version 7.10.1... yes
checking whether libcurl is usable... yes
checking for curl_free... yes