[PyQt] SIP 4.18 out-of-source build fails

Davide Pesavento pesa at gentoo.org
Wed May 4 20:49:07 BST 2016


make install fails for SIP 4.18 when building out of source (a.k.a.
shadow builds). The error is:

cp: cannot stat
'/tmp/portage/dev-python/sip-4.18/work/sip-4.18-python2_7/sip.pyi': No
such file or directory
Makefile:42: recipe for target 'install' failed

I fixed it by simply replacing 'build_dir' with 'src_dir' for sip.pyi
in configure.py

I'm also seeing several compilation warnings with gcc-4.9.3 and Python 2.7:

In file included from /usr/include/python2.7/Python.h:8:0,
                 from ./sip.h:32,
                 from
/tmp/portage/dev-python/sip-4.18/work/sip-4.18/siplib/objmap.c:23:
/usr/include/python2.7/pyconfig.h:1194:0: warning: "_POSIX_C_SOURCE" redefined
 #define _POSIX_C_SOURCE 200112L
 ^
In file included from /usr/include/string.h:25:0,
                 from
/tmp/portage/dev-python/sip-4.18/work/sip-4.18/siplib/objmap.c:21:
/usr/include/features.h:225:0: note: this is the location of the
previous definition
 # define _POSIX_C_SOURCE 200809L
 ^
/tmp/portage/dev-python/sip-4.18/work/sip-4.18/siplib/qtlib.c: In
function ‘sip_api_connect_rx’:
/tmp/portage/dev-python/sip-4.18/work/sip-4.18/siplib/qtlib.c:475:5:
warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]
     Py_INCREF(Py_True);
     ^
/tmp/portage/dev-python/sip-4.18/work/sip-4.18/siplib/qtlib.c: In
function ‘sip_api_disconnect_rx’:
/tmp/portage/dev-python/sip-4.18/work/sip-4.18/siplib/qtlib.c:503:13:
warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]
             Py_INCREF(Py_False);
             ^
/tmp/portage/dev-python/sip-4.18/work/sip-4.18/siplib/qtlib.c:527:5:
warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]
     Py_INCREF(Py_True);
     ^
/tmp/portage/dev-python/sip-4.18/work/sip-4.18/siplib/qtlib.c: In
function ‘sip_api_save_slot’:
/tmp/portage/dev-python/sip-4.18/work/sip-4.18/siplib/qtlib.c:647:17:
warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]
                 Py_INCREF(Py_True);
                 ^
siplib.c: In function ‘parsePass2’:
siplib.c:5465:32: warning: ‘owner’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
                         *owner = arg;
                                ^
siplib.c: In function ‘slot_richcompare’:
siplib.c:10675:52: warning: ‘st’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
     if ((f = (PyObject *(*)(PyObject *,PyObject *))findSlot(self, st)) == NULL)
                                                    ^


Thanks,
Davide


More information about the PyQt mailing list