Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build system for debian 9.12 #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bentau
Copy link
Contributor

@bentau bentau commented Feb 24, 2020

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

@@ -60,6 +60,7 @@ def check_header(header):

includes = []
includes.extend(glib_includes)
includes.extend(["/usr/local/include"])
Copy link
Contributor

@tklengyel tklengyel Feb 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding this path doesn't look right to me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you have any better idea? I am not familiar with this build system and just adding the default installation path should not hurt.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally you want to detect the path that's required based on dependencies. I don't know anything about the python build system though. /cc @Wenzel

@Wenzel
Copy link
Member

Wenzel commented Feb 26, 2020

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
Copy link
Contributor Author

bentau commented Feb 26, 2020

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
Copy link
Member

Wenzel commented Feb 27, 2020

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

@bentau
Copy link
Contributor Author

bentau commented Feb 27, 2020

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
Copy link
Member

Wenzel commented Mar 9, 2020

@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:
#56
as well as updating the Travis to test on multiple versions of Python.

Thank you for letting me know about this issue !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants