python icon indicating copy to clipboard operation
python copied to clipboard

fix build system for debian 9.12

Open bentau opened this issue 5 years ago • 5 comments

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

bentau avatar Feb 24 '20 10:02 bentau

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

Wenzel avatar Feb 26 '20 15:02 Wenzel

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.

bentau avatar Feb 26 '20 15:02 bentau

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

Wenzel avatar Feb 27 '20 00:02 Wenzel

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

bentau avatar Feb 27 '20 08:02 bentau

@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 !

Wenzel avatar Mar 09 '20 19:03 Wenzel