libvmi / python

LibVMI Python bindings
http://libvmi.com/
GNU Lesser General Public License v3.0
30 stars 22 forks source link

Undefined symbol when compile with setup.py #69

Closed aghamir closed 4 years ago

aghamir commented 4 years ago

Dear @Wenzel , I compile and install libvmi/python using setup.py build and setup.py install. Unfortunately when I import from libvmi I face with this issue:

>>> from libvmi import Libvmi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/vagrant/python/libvmi/__init__.py", line 5, in <module>
    from .libvmi import (INIT_DOMAINID, INIT_DOMAINNAME, INIT_EVENTS, VMIOS,
  File "/vagrant/python/libvmi/libvmi.py", line 4, in <module>
    from _libvmi import ffi, lib
ImportError: /home/vagrant/.pyenv/versions/3.8.5/lib/python3.8/site-packages/libvmi-3.4-py3.8-linux-x86_64.egg/_libvmi.abi3.so: undefined symbol: vmi_request_page_fault

To reproduce this issue:

mtarral commented 4 years ago

Hi, I don't understand because vmi_request_page_fault symbol is valid function in Libvmi API, even in KVM-VMI/Libvmi fork on master: https://github.com/KVM-VMI/libvmi/blob/master/libvmi/libvmi.h#2190

So, maybe you have multiple Libvmi.so on your system, and the one which is choosen is too old to have that symbol defined ?

libvmi/python relies on pkg-config to determine how to find libvmi: pkg-config --libs libvmi

This should tell you where it is located.

try to grep that symbol in your libvmi.so: readelf -s | grep vmi_request_page_fault

aghamir commented 4 years ago

Thanks a lot. It is exactly my issue