Bug 866508 - Fail to import libvirt python module due to 'undefined symbol: libssh2_agent_free'
Fail to import libvirt python module due to 'undefined symbol: libssh2_agent_...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.5
x86_64 Linux
urgent Severity high
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
: TestBlocker
: 866741 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-15 10:19 EDT by Alex Jia
Modified: 2013-02-21 02:10 EST (History)
6 users (show)

See Also:
Fixed In Version: libvirt-0.10.2-4.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:10:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 16:18:26 EST

  None (edit)
Description Alex Jia 2012-10-15 10:19:52 EDT
Description of problem:
Fail to import libvirt python module due to 'undefined symbol: libssh2_agent_free'.

Version-Release number of selected component (if applicable):
# rpm -q libvirt-python
libvirt-python-0.10.2-3.el6.x86_64

How reproducible:
always

Steps to Reproduce:
# python
Python 2.6.6 (r266:84292, May  1 2012, 13:52:17) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
  
Actual results:

>>> import libvirt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 25, in <module>
    raise lib_e
ImportError: /usr/lib64/libvirt.so.0: undefined symbol: libssh2_agent_free


Expected results:
Can successfully import libvirt python module.

Additional info:
Comment 3 Peter Krempa 2012-10-15 20:03:23 EDT
What version of libssh2 do you have installed?

This issue is reproducible if you upgrade only libvirt and not the whole system. On a up-to-date system libvirt works fine with libssh2. The minimum required version of libssh2 is 1.3.

I will investigate if the spec file is correct or if it requires tweaking.
Comment 4 Alex Jia 2012-10-15 21:23:04 EDT
(In reply to comment #3)
> What version of libssh2 do you have installed?
> 
> This issue is reproducible if you upgrade only libvirt and not the whole
> system. On a up-to-date system libvirt works fine with libssh2. The minimum
> required version of libssh2 is 1.3.
> 
> I will investigate if the spec file is correct or if it requires tweaking.

Hi Peter,
I think you're right, my libssh2 is 1.2.2-7.el6_1.1, it should be the spec file misses package dependency on libssh2-1.3*.

Regards,
Alex
Comment 5 Alex Jia 2012-10-15 22:12:09 EDT
Maybe, the commit 1e25c54 results in this question.
Comment 6 Huang Wenlong 2012-10-16 00:19:45 EDT
*** Bug 866741 has been marked as a duplicate of this bug. ***
Comment 7 Peter Krempa 2012-10-16 03:17:30 EDT
libssh2 isn't exporting versioning symbols, so RPM isn't able to automatically gather the version of libssh2 that is required when built with libssh2 transport.

I'll post a spec file change to add this requirement manually.

Until then the workaround to make libvirt working is to upgrade libssh2 manually.
Comment 8 Peter Krempa 2012-10-16 17:02:57 EDT
Fixed upstream with:

commit cb4f41b8d0a2dc4258f1b097dff2ca2b34fbd086
Author: Peter Krempa <pkrempa@redhat.com>
Date:   Tue Oct 16 14:34:35 2012 +0200

    spec: Add runtime requirement for libssh2
    
    libssh2 unfortunately doesn't support symbol versioning so RPM can't
    figure out what version is needed for the currently installed libvirt
    package. This patch adds a runtime requirement, so that the correct
    version of libssh2 can be installed along with libvirt.
Comment 10 Huang Wenlong 2012-10-16 23:58:09 EDT
Verify this bug : 
libvirt-0.10.2-4.el6.x86_64

check in the spec file 
...
%if %{with_libssh2_transport}
Requires: libssh2 >= 1.3.0
%endif
...

#rpm -q libvirt-client --requires|grep libssh2
libssh2 >= 1.3.0
libssh2.so.1()(64bit)
Comment 11 errata-xmlrpc 2013-02-21 02:10:03 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0276.html

Note You need to log in before you can comment on or make changes to this bug.