libvmi / python

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

fix build system for debian 9.12 #55

Open bentau opened 4 years ago

bentau commented 4 years ago

My compiler does not want to build without having glib.h included

Wenzel commented 4 years ago

hi @bentau,

glib is already included in the build via pkg-config: https://github.com/libvmi/python/blob/master/libvmi/libvmi_build.py#L55

I suppose your glib is installed in /usr/local, but pkg-config should find it anyway.

Try this on the command line:

$ pkg-config --cflags glib-2.0

for me it yields the following output

-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include

You need to tell pkg config how to find the *.pc files. There is an env var for that: https://askubuntu.com/a/210235/917540

bentau commented 4 years ago

There were two problems:

  1. That path of the glib includes is correct. However, my compiler just complains that it is not included in the C file.

  2. The other problem was that the script did not find the location where libvmi is installed.

Wenzel commented 4 years ago

@bentau they were two problems, meaning that you solved them now ? should I close this PR ?

bentau commented 4 years ago

both things are actually fixed by the PR. However, the second problem was not fixed very nicely by just adding a hardcoded path.

If you think those patches are not required you can close it. However, it needed both things to actually compile it on my debian system

Wenzel commented 4 years ago

@bentau by installing the latest Libvmi, I can repro a compilation error linked to a glib missing.

I cannot pin point which commit broke libvmi-python bindings, but I applied your fix in this PR: https://github.com/libvmi/python/pull/56 as well as updating the Travis to test on multiple versions of Python.

Thank you for letting me know about this issue !