Bug 670478

Summary: libselinux doesn't build anymore with the latest python3
Product: [Fedora] Fedora Reporter: Karsten Hopp <karsten>
Component: libselinuxAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dmalcolm, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-18 15:08:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karsten Hopp 2011-01-18 12:35:57 UTC
Description of problem:
In the recent python3.2 packages the include directory moved to /usr/include/python3.2mu
I have no idea for the reason, it might even be a bug, but this shows that libselinux should use 'pkg-config --cflags python3' instead of trying to figure out the header directory by itself (in src/Makefile)

Comment 1 Karsten Hopp 2011-01-18 12:42:35 UTC
make[1]: Leaving directory `/builddir/build/BUILD/libselinux-2.0.98/src'
+ BuildPythonWrapper /usr/bin/python3 python3
+ BinaryName=/usr/bin/python3
+ Prefix=python3
+ make PYTHON=/usr/bin/python3 PYPREFIX=python3 LIBDIR=/usr/lib64 'CFLAGS=-g -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mminimal-toc' -j2 pywrap
make -C src pywrap
make[1]: Entering directory `/builddir/build/BUILD/libselinux-2.0.98/src'
cc -g -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mminimal-toc -I../include -I/usr/include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/python3.2 -fPIC -DSHARED -c -o python3selinuxswig_wrap.lo selinuxswig_wrap.c
selinuxswig_wrap.c:125:20: fatal error: Python.h: No such file or directory
compilation terminated.
make[1]: Leaving directory `/builddir/build/BUILD/libselinux-2.0.98/src'
make[1]: *** [python3selinuxswig_wrap.lo] Error 1

Comment 2 Daniel Walsh 2011-01-18 15:08:57 UTC
Fixed in  libselinux-2.0.98-2.fc15

Comment 3 Dave Malcolm 2011-01-18 16:54:02 UTC
Thanks Dan.

"3.2mu" (and the usage of pkg-config) is correct; this relates to PEP-3149:
  http://www.python.org/dev/peps/pep-3149/