[PyQt] static Python target osx-64 missing util.h

John Hackett john.hackett at icon-is.co.uk
Tue Dec 8 15:09:03 GMT 2015


Phil, 

the full error message is the following. If I comment out "#define HAVE_UTIL_H 1" I get the same message but without the last few lines. 

Modules/posixmodule.c: In function '_pystat_fromstructstat': 
Modules/posixmodule.c:1455:15: error: 'struct stat' has no member named 'st_atimespec' 
ansec = st->st_atimespec.tv_nsec; 
^ 
Modules/posixmodule.c:1456:15: error: 'struct stat' has no member named 'st_mtimespec' 
mnsec = st->st_mtimespec.tv_nsec; 
^ 
Modules/posixmodule.c:1457:15: error: 'struct stat' has no member named 'st_ctimespec' 
cnsec = st->st_ctimespec.tv_nsec; 
^ 
In file included from Modules/posixmodule.c:29:0: 
Modules/posixmodule.c:1483:54: error: 'struct stat' has no member named 'st_gen' 
PyInt_FromLong((long)st->st_gen)); 
^ 
Include/structseq.h:36:44: note: in definition of macro 'PyStructSequence_SET_ITEM' 
(((PyStructSequence *)(op))->ob_item[i] = v) 
^ 
Modules/posixmodule.c:1489:22: error: 'struct stat' has no member named 'st_birthtime' 
bsec = (long)st->st_birthtime; 
^ 
Modules/posixmodule.c:1491:17: error: 'struct stat' has no member named 'st_birthtimespec' 
bnsec = st->st_birthtimespec.tv_nsec; 
^ 
In file included from Modules/posixmodule.c:29:0: 
Modules/posixmodule.c:1506:54: error: 'struct stat' has no member named 'st_flags' 
PyInt_FromLong((long)st->st_flags)); 
^ 
Include/structseq.h:36:44: note: in definition of macro 'PyStructSequence_SET_ITEM' 
(((PyStructSequence *)(op))->ob_item[i] = v) 
^ 
Modules/posixmodule.c: At top level: 
Modules/posixmodule.c:3869:18: fatal error: util.h: No such file or directory 
#include <util.h> 
^ 
compilation terminated. 
make: *** [.obj/posixmodule.o] Error 1 

-- 
Regards, 

John Hackett 
Icon Information Systems 
74 Gibsons Hill, Norbury, London, SW16 3JS 
t: 020 8764 2663 
f: 020 8711 3370 
m: 07801-231118 
e: john.hackett at icon-is.co.uk 
w: www.icon-is.co.uk 
skype: john_hackett 
twitter: @iconinfosys 

----- Original Message -----

> From: "Phil Thompson" <phil at riverbankcomputing.com>
> To: "John Hackett" <john.hackett at icon-is.co.uk>
> Cc: pyqt at riverbankcomputing.com
> Sent: Tuesday, 8 December, 2015 2:40:33 PM
> Subject: Re: [PyQt] static Python target osx-64 missing util.h

> On 8 Dec 2015, at 2:00 p.m., John M. Hackett <john.hackett at icon-is.co.uk>
> wrote:
> >
> > Hi,
> >
> > I have an App compiling and running correctly under Linux with PyQt5 and
> > Python 2.7.9 using pyqtdeploy (thanks for the help Phil!)
> >
> > I am trying now to compile it with osx as the target. I have the source
> > code the Python and it builds correclty for Linux using these commands:
> >
> > cd /root/pyqtdeploy-dir/sysroot-linux/Python-2.7.9-src
> > pyqtdeploycli --package python --target linux-64 configure
> > $SYSROOT/qmake SYSROOT=$SYSROOT
> > make
> > make install
> >
> > If I change my $SYSROOT and the target for a osx build I get an error. So
> > the commands I'm using are:
> >
> > cd /root/pyqtdeploy-dir/sysroot-macos/Python-2.7.9-src
> > pyqtdeploycli --package python --target osx-64 configure
> > $SYSROOT/qmake SYSROOT=$SYSROOT
> > make
> >
> >
> > make fails with this error:
> >
> > ...
> > Modules/posixmodule.c: At top level:
> > Modules/posixmodule.c:3869:18: fatal error: util.h: No such file or
> > directory
> > #include <util.h>
> > ^
> > compilation terminated.
> > make: *** [.obj/posixmodule.o] Error 1
> >
> > I've looked into the generated pyconfig.h file and for the linux target
> > line 361 is "/* #define HAVE_UTIL_H */" but with the osx target "#define
> > HAVE_UTIL_H 1". So it looks as if the osx target requires this header
> > file. I tried commenting it out but the make just failed earlier as this
> > header file seems to be providing some definitions to the posixmodule.
> >
> > Question: where can I find this header and why isn't it in the source
> > (downloaded from Python.org)?

> It will be a system header file. What symbols are missing when you comment it
> out?

> Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20151208/d3547d1f/attachment.html>


More information about the PyQt mailing list