Open mister-Q opened 1 year ago
Hi,
i've just installed libvmi from master branch, created a venv, and ran
python3 setup.py build
it completed without any issues.
How did you proceed to get the error ?
well it seems to me that i have done this exactly. Installed kvm, qemu, mibkvmi then libvmi (so i got include in /usr/local/include/libvmi.h) Created a domain --> all examples working
Now I try to install python bindings
$ git clone https://github.com/KVM-VMI/python.git
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ python3 ./setup.py build
--> errors
==> I should say that i am not python friendly:)
I retriggered a CI build, and I had to fixes a few things in libvmi dependencies, etc but the build works: https://github.com/libvmi/python/pull/86 https://github.com/libvmi/python/actions/runs/6353687904/job/17258819604
I've been having this same issue. For reference, I'm trying to build it on Oracle Linux 7. As best I can tell, what's happening (or not happening) is that the stuff that gets created in build/lib.linux-x86_64-3.8
is not being included in the build. Nor do I see it adding any sort of -l libvmi
or even -l glib-2.0
for that matter. I don't know what the correct gcc line is supposed to look like, but this is what I have:
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/rh-python38/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/rh-python38/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/opt/rh/rh-python38/root/usr/include/python3.8 -c build/temp.linux-x86_64-3.8/_libvmi.c -o build/temp.linux-x86_64-3.8/build/temp.linux-x86_64-3.8/_libvmi.o
Digging into it a bit more, it makes no difference whether I include libraries=libs
or not, so I think the issue is indeed something to do with it not including the libraries. I've tried various different incantations, and nothing so far has helped (or made any difference at all).
@pjcolp this is the build script that's used to create the GCC command line: https://github.com/libvmi/python/blob/master/libvmi/libvmi_build.py
If you have a Dockerfile to repro this issue, we can take a look.
Unfortunately I don't have a Dockerfile, but this is just running python3 setup.py build
, which calls libvmi_build.py
. I've been mucking about in that file trying to chase this down -- that's how I know that removing the library stuff makes no difference to the generated gcc line (for me). I would be curious to see what the gcc line is supposed to look like, though. I looked at the output from the CI build above, but I couldn't find the actual gcc command that was invoked.
I just tried compiling it on an OL8 box and that worked fine. It could just be an issue with the python packages on OL7.
Hi, I am trying to compile python bindings to test libvmi with volatility, but got compilation errors : (BTW: All libvmi/libkvmi examples are working with my VM and libvmi is installed on my system)
Indeed this struct has no member (def in /usr/local/include/libvmi.h) BTW: header file in build/lib.linux-xxx/libvmi_cdef.h is present.
So my questions are: