On Tue, Jan 30, 2018 at 02:05:51PM +0000, abinaya.manikandan@wipro.com wrote:
Hi,
Finally on our RHEL7 machine we are able to bind python with libguestfs. Please find below log:
checking for PYTHON... yes checking Python prefix... /opt/python/x86_64/3.6.3-1 configure: Python install dir /opt/libguestfs/x86_64/1.32.10-1.el7/lib/python3.6/site-packages checking for Python extension suffix (PEP-3149)... .cpython-36m-x86_64-linux-gnu.so
The trouble is you haven't included the full ./configure log ... again.
[root@euca-172-31-8-98 lib]$ python Python 3.6.3 (default, Nov 29 2017, 09:19:34) [GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux Type "help", "copyright", "credits" or "license" for more information.
import guestfs Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/libguestfs/x86_64/1.32.10/lib/python3.6/site-packages/guestfs.py", line 73, in <module> import libguestfsmod ImportError: /opt/libguestfs/x86_64/1.32.10/lib/python3.6/site-packages/libguestfsmod.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyString_FromStringAndSize
Somehow during ./configure it thought PyString_FromStringAndSize is defined, but when running it's not. I believe that symbol is defined by Python 2 and was removed in Python 3. Most likely the ./configure test is running against the wrong version of Python, but I can't tell without the full details. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW