[Open-scap] compile issue with python2 on swig

Fen Labalme fen at civicactions.com
Thu Feb 11 16:48:46 UTC 2016


I believe this may be a known issue. Pulled a fresh openscap from github.

When running make on my Arch GNU/Linux box with /usr/bin/python -> python3
and
    » python-config --includes
    -I/usr/include/python3.5m -I/usr/include/python3.5m

    » python3-config --includes
    -I/usr/include/python3.5m -I/usr/include/python3.5m

    » python2-config --includes
    -I/usr/include/python2.7 -I/usr/include/python2.7

I get the following error:
    make[2]: Entering directory '/home/fen/workspace/security/openscap/swig'
    Making all in perl
    make[3]: Entering directory
'/home/fen/workspace/security/openscap/swig/perl'
    make[3]: Nothing to be done for 'all'.
    make[3]: Leaving directory
'/home/fen/workspace/security/openscap/swig/perl'
    Making all in python2
    make[3]: Entering directory
'/home/fen/workspace/security/openscap/swig/python2'
      CC       openscap_py_wrap.lo
    openscap_py_wrap.c:130:21: fatal error: Python.h: No such file or
directory
    compilation terminated.

Looking in /home/fen/workspace/security/openscap/swig/python2/Makefile I
see:
    PYTHON_INCLUDES = -I/include/python3.5

If I change this to the following, make completes correctly:
    PYTHON_INCLUDES = -I/usr/include/python2.7

This seems odd in the results of running ./configure:
    python2 bindings enabled:      yes
    python3 bindings enabled:      no

So the issue is likely in configure.ac, possibly at this line:
    AC_ARG_VAR([preferred_python], [set preferred Python interpreter])

But that file is harder to parse than XCCDF ;) so I'm just reporting my
findings. I believe my "preferred python interpreter" should be "python3"
but why does the python2 Makefile have such an odd PYTHON_INCLUDES ?

Full (very long) screen capture attached, but I think I caught most of the
issues above.

Thanks for all your work!
=Fen

-- 
Fen Labalme, CivicActions.com
DevOps | Quality | Security
mobile: 412-996-4113
github/skype/twitter: openprivacy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/open-scap-list/attachments/20160211/36a5aab2/attachment.htm>


More information about the Open-scap-list mailing list