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

Phil Thompson phil at riverbankcomputing.com
Tue Dec 8 14:40:33 GMT 2015


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


More information about the PyQt mailing list