You may encounter this problem with libselinux and libsemanage when attempting to compile them while Python 3x is set as the default interpreter.
make PYLIBVER=python3.1 pywrap make -C src pywrap make[1]: Entering directory `/var/tmp/portage/sys-libs/libsemanage-2.0.27/work/libsemanage-2.0.27/src' cc -O2 -march=i686 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs -fstack-protector-all -I../include -I/usr/include -D_GNU_SOURCE -I/usr/include/python3.1 -fPIC -DSHARED -c -o semanageswig_wrap.lo semanageswig_wrap.c semanageswig_wrap.c: In function 'PySwigObject_format': semanageswig_wrap.c:1319: warning: initialization makes pointer from integer without a cast semanageswig_wrap.c:1321: warning: assignment makes pointer from integer without a cast semanageswig_wrap.c: In function 'PySwigObject_repr': semanageswig_wrap.c:1351: warning: initialization makes pointer from integer without a cast semanageswig_wrap.c: In function 'PySwigObject_print': semanageswig_wrap.c:1373: warning: passing argument 1 of 'fputs' makes pointer from integer without a cast /usr/include/stdio.h:662: note: expected 'const char * __restrict__' but argument is of type 'int' semanageswig_wrap.c: In function 'PySwigObject_str': semanageswig_wrap.c:1386: warning: return makes pointer from integer without a cast semanageswig_wrap.c: In function '_PySwigObject_type': semanageswig_wrap.c:1582: warning: initialization from incompatible pointer type semanageswig_wrap.c:1583: warning: initialization from incompatible pointer type semanageswig_wrap.c:1586: warning: initialization from incompatible pointer type semanageswig_wrap.c:1587: warning: initialization from incompatible pointer type semanageswig_wrap.c:1594: error: 'coercion' undeclared (first use in this function) semanageswig_wrap.c:1594: error: (Each undeclared identifier is reported only once semanageswig_wrap.c:1594: error: for each function it appears in.) semanageswig_wrap.c:1594: error: expected '}' before numeric constant semanageswig_wrap.c:1616: warning: initialization makes integer from pointer without a cast semanageswig_wrap.c:1619: warning: initialization from incompatible pointer type semanageswig_wrap.c:1620: warning: initialization from incompatible pointer type semanageswig_wrap.c:1624: warning: initialization from incompatible pointer type semanageswig_wrap.c:1627: error: 'cmpfunc' undeclared (first use in this function) semanageswig_wrap.c:1627: error: expected '}' before 'PySwigObject_compare' semanageswig_wrap.c:1674: error: 'PyTypeObject' has no member named 'ob_type' semanageswig_wrap.c: In function 'PySwigPacked_repr': semanageswig_wrap.c:1723: warning: return makes pointer from integer without a cast semanageswig_wrap.c:1725: warning: return makes pointer from integer without a cast semanageswig_wrap.c: In function 'PySwigPacked_str': semanageswig_wrap.c:1734: warning: return makes pointer from integer without a cast semanageswig_wrap.c:1736: warning: return makes pointer from integer without a cast semanageswig_wrap.c: In function '_PySwigPacked_type': semanageswig_wrap.c:1783: warning: initialization makes integer from pointer without a cast semanageswig_wrap.c:1786: warning: initialization from incompatible pointer type semanageswig_wrap.c:1787: warning: initialization from incompatible pointer type semanageswig_wrap.c:1788: warning: initialization from incompatible pointer type semanageswig_wrap.c:1790: error: 'cmpfunc' undeclared (first use in this function) semanageswig_wrap.c:1790: error: expected '}' before 'PySwigPacked_compare' semanageswig_wrap.c:1837: error: 'PyTypeObject' has no member named 'ob_type' semanageswig_wrap.c: In function '_SWIG_This': semanageswig_wrap.c:1882: warning: return makes pointer from integer without a cast semanageswig_wrap.c: In function 'SWIG_Python_GetSwigThis': semanageswig_wrap.c:1903: warning: assignment makes pointer from integer without a cast semanageswig_wrap.c: In function 'SWIG_Python_NewShadowInstance': semanageswig_wrap.c:2117: warning: assignment makes pointer from integer without a cast semanageswig_wrap.c: In function 'SWIG_Python_SetModule': semanageswig_wrap.c:2299: warning: initialization makes pointer from integer without a cast semanageswig_wrap.c: In function 'SWIG_Python_TypeQuery': semanageswig_wrap.c:2319: warning: initialization makes pointer from integer without a cast semanageswig_wrap.c: In function 'SWIG_Python_TypeError': semanageswig_wrap.c:2408: warning: initialization makes pointer from integer without a cast semanageswig_wrap.c: In function 'SWIG_From_int': semanageswig_wrap.c:2554: warning: return makes pointer from integer without a cast semanageswig_wrap.c: In function 'SWIG_FromCharPtrAndSize': semanageswig_wrap.c:2580: warning: return makes pointer from integer without a cast semanageswig_wrap.c: In function 'SWIG_AsCharPtrAndSize': semanageswig_wrap.c:2626: warning: assignment makes pointer from integer without a cast semanageswig_wrap.c: In function 'swig_varlink_repr': semanageswig_wrap.c:12117: warning: return makes pointer from integer without a cast semanageswig_wrap.c: In function 'swig_varlink_str': semanageswig_wrap.c:12122: warning: initialization makes pointer from integer without a cast semanageswig_wrap.c: In function 'swig_varlink_print': semanageswig_wrap.c:12136: warning: format '%s' expects type 'char *', but argument 3 has type 'int' semanageswig_wrap.c: In function 'swig_varlink_type': semanageswig_wrap.c:12196: warning: initialization makes integer from pointer without a cast semanageswig_wrap.c:12199: warning: initialization from incompatible pointer type semanageswig_wrap.c:12200: warning: initialization from incompatible pointer type semanageswig_wrap.c:12201: warning: initialization from incompatible pointer type semanageswig_wrap.c:12204: warning: initialization from incompatible pointer type semanageswig_wrap.c:12210: warning: initialization from incompatible pointer type semanageswig_wrap.c:12215: warning: initialization from incompatible pointer type semanageswig_wrap.c:12231: error: 'PyTypeObject' has no member named 'ob_type' semanageswig_wrap.c: In function 'init_semanage': semanageswig_wrap.c:12362: warning: assignment makes pointer from integer without a cast make[1]: *** [semanageswig_wrap.lo] Error 1 make[1]: Leaving directory `/var/tmp/portage/sys-libs/libsemanage-2.0.27/work/libsemanage-2.0.27/src' make: *** [pywrap] Error 2 emake failed * ERROR: sys-libs/libsemanage-2.0.27 failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 56: Called src_compile * environment, line 4388: Called die * The specific snippet of code: * emake PYLIBVER="python$(python_get_version)" pywrap || die * * If you need support, post the output of 'emerge --info =sys-libs/libsemanage-2.0.27', * the complete build log and the output of 'emerge -pqv =sys-libs/libsemanage-2.0.27'. * The complete build log is located at '/var/tmp/portage/sys-libs/libsemanage-2.0.27/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-libs/libsemanage-2.0.27/temp/environment'. * S: '/var/tmp/portage/sys-libs/libsemanage-2.0.27/work/libsemanage-2.0.27' >>> Failed to emerge sys-libs/libsemanage-2.0.27
To work around:
# eselect python list Available Python interpreters: [1] python2.6 [2] python3.1 * # eselect python set 1 # emerge libselinux libsemanage
The drawback to this workaround is as soon as you change the default interpreter back to 3.x these packages will be picked up by python-updater.
Comments
There are no comments for this item.