Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 429456 - sys-libs/libselinux-2.1.9-r1 fails with CPython-2.5
Summary: sys-libs/libselinux-2.1.9-r1 fails with CPython-2.5
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SE Linux Bugs
Whiteboard: selinux-utils
Depends on:
Reported: 2012-08-02 08:46 UTC by Patrick Lauer
Modified: 2012-10-06 16:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

libselinux.patch (libselinux.patch,757 bytes, patch)
2012-08-08 06:02 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2012-08-02 08:46:39 UTC
make[1]: Leaving directory `/var/tmp/portage/sys-libs/libselinux-2.1.9-r1/work/libselinux-2.1.9/src'
make -C utils
make[1]: Entering directory `/var/tmp/portage/sys-libs/libselinux-2.1.9-r1/work/libselinux-2.1.9/utils'
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  getseuser.c  -L../src -lselinux -L/usr/lib -o getseuser
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  compute_create.c  -L../src -lselinux -L/usr/lib -o compute_create
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  getfilecon.c  -L../src -lselinux -L/usr/lib -o getfilecon
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  togglesebool.c  -L../src -lselinux -L/usr/lib -o togglesebool
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  compute_relabel.c  -L../src -lselinux -L/usr/lib -o compute_relabel
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  setenforce.c  -L../src -lselinux -L/usr/lib -o setenforce
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  getdefaultcon.c  -L../src -lselinux -L/usr/lib -o getdefaultcon
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  selinux_check_securetty_context.c  -L../src -lselinux -L/usr/lib -o selinux_check_securetty_context
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  policyvers.c  -L../src -lselinux -L/usr/lib -o policyvers
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  compute_member.c  -L../src -lselinux -L/usr/lib -o compute_member
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  selinuxexeccon.c  -L../src -lselinux -L/usr/lib -o selinuxexeccon
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  getenforce.c  -L../src -lselinux -L/usr/lib -o getenforce
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  setfilecon.c  -L../src -lselinux -L/usr/lib -o setfilecon
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  getpidcon.c  -L../src -lselinux -L/usr/lib -o getpidcon
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  selinuxenabled.c  -L../src -lselinux -L/usr/lib -o selinuxenabled
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  getconlist.c  -L../src -lselinux -L/usr/lib -o getconlist
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  getsebool.c  -L../src -lselinux -L/usr/lib -o getsebool
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  compute_av.c  -L../src -lselinux -L/usr/lib -o compute_av
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  compute_user.c  -L../src -lselinux -L/usr/lib -o compute_user
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  avcstat.c  -L../src -lselinux -L/usr/lib -o avcstat
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -D_GNU_SOURCE   -fPIC -Wl,-O1 -Wl,--as-needed  matchpathcon.c  -L../src -lselinux -L/usr/lib -o matchpathcon
make[1]: Leaving directory `/var/tmp/portage/sys-libs/libselinux-2.1.9-r1/work/libselinux-2.1.9/utils'
 * Building of sys-libs/libselinux-2.1.9-r1 with CPython 2.5...
make -j4 CC=x86_64-pc-linux-gnu-gcc PYLIBVER=python2.5 PYPREFIX=python-2.5 'LDFLAGS=-fPIC -Wl,-O1 -Wl,--as-needed' pywrap 
bash > selinuxswig_python_exception.i 
Package python-2.5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python-2.5.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python-2.5' found
x86_64-pc-linux-gnu-gcc -O2 -pipe -I../include -I/usr/include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64  -fPIC -DSHARED -c -o python-2.5audit2why.lo audit2why.c
audit2why.c:6:20: fatal error: Python.h: No such file or directory
compilation terminated.
make: *** [python-2.5audit2why.lo] Error 1
make: *** Waiting for unfinished jobs....
 * ERROR: sys-libs/libselinux-2.1.9-r1 failed (compile phase):
 *   emake failed

Portage 2.2.0_alpha120 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.15-r2, 3.5.0vs2.3.4-vs2.3.4 x86_64)
System uname: Linux-3.5.0vs2.3.4-vs2.3.4-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.1
Timestamp of tree: Unknown
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.5.4-r4, 2.6.8, 2.7.3-r2, 3.1.5, 3.2.3-r1
dev-util/cmake:           2.8.7-r3
dev-util/pkgconfig:       0.27
sys-apps/baselayout:      2.1-r1
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.5 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X acl amd64 berkdb bzip2 cairo cli compat cracklib crypt cups cxx dbus dri fontconfig fortran gdbm gpm gudev iconv ipv6 jpeg minizip mmx modules mssql mudflap multilib ncurses nls nptl odbc opengl openmp pam pcre png pppd python qt3support readline script session sqlite sse sse2 ssl tcpd threads tiff tk truetype unicode webkit xml zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.5 2.6 2.7 3.2 2.7-pypy-1.8 2.7-pypy-1.9 2.5-jython"
Comment 1 Patrick Lauer gentoo-dev 2012-08-06 07:47:09 UTC
For 2.1.9-r1 I've added a restrict for CPython 2.5 and 2.6 to the ebuild (and 3.* too)

Your call if you want to fix it in the build system or leave the ebuild restricted.
Comment 2 Sven Vermeulen (RETIRED) gentoo-dev 2012-08-07 18:07:41 UTC
Thanks. I don't think I'll try to support 2.5 and 2.6, but 2.7 and 3.* should (must) work (since those are still supported upstream and often considered the "safe stable") so I'll look at fixing that.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2012-08-08 06:02:06 UTC
Created attachment 320666 [details, diff]

sys-libs/libselinux-2.1.9-r1 would fail to build with CPython 2.5 even after changing build system:

python-2.5selinuxswig_wrap.lo: In function `_wrap_security_get_boolean_names':
selinuxswig_wrap.c:(.text+0x1e4b): undefined reference to `PyBytes_FromString'
python-2.5selinuxswig_wrap.lo: In function `_wrap_get_ordered_context_list':
selinuxswig_wrap.c:(.text+0x955c): undefined reference to `PyBytes_FromString'
python-2.5selinuxswig_wrap.lo: In function `_wrap_get_ordered_context_list_with_level':
selinuxswig_wrap.c:(.text+0x97e4): undefined reference to `PyBytes_FromString'
python-2.5selinuxswig_wrap.lo: In function `_wrap_security_compute_user':
selinuxswig_wrap.c:(.text+0xbd34): undefined reference to `PyBytes_FromString'
python-2.5selinuxswig_wrap.lo: In function `_wrap_security_compute_user_raw':
selinuxswig_wrap.c:(.text+0xbfd4): undefined reference to `PyBytes_FromString'
python-2.5selinuxswig_wrap.lo: In function `_wrap_rpm_execcon':
selinuxswig_wrap.c:(.text+0xd310): undefined reference to `PyBytes_Check'
selinuxswig_wrap.c:(.text+0xd3fe): undefined reference to `PyBytes_Size'
selinuxswig_wrap.c:(.text+0xd417): undefined reference to `PyBytes_AsString'
selinuxswig_wrap.c:(.text+0xd49c): undefined reference to `PyBytes_Check'
selinuxswig_wrap.c:(.text+0xd4d3): undefined reference to `PyBytes_Size'
selinuxswig_wrap.c:(.text+0xd4f2): undefined reference to `PyBytes_AsString'
collect2: ld returned 1 exit status
make: *** [] Error 1

Support for CPython 2.6 can be easily restored by this patch.

sys-libs/libselinux-2.1.9-r1 succeeds to build with CPython 3.1 and 3.2 after unrestricting 3.* Python ABIs.
Comment 4 Arfrever Frehtes Taifersar Arahesis 2012-08-08 06:10:05 UTC
If there was decision to not restore support for CPython 2.6 by patch from comment #3, then sys-libs/libselinux-2.1.9-r1 would need:
DEPEND="python? ( virtual/pkgconfig )".
Comment 5 Sven Vermeulen (RETIRED) gentoo-dev 2012-08-08 20:01:35 UTC
-r2 was sitting in hardened-dev for another fix (ruby-related) so I added Arfrever patch to that one.

TEST-REQUEST for hardened-dev overlay, will be VERIFIED:TEST-REQUEST when ~arch and VERIFIED:FIXED when arch.
Comment 6 Sven Vermeulen (RETIRED) gentoo-dev 2012-09-08 18:45:12 UTC
In main tree,  ~arch'ed
Comment 7 Sven Vermeulen (RETIRED) gentoo-dev 2012-10-06 16:58:02 UTC