<html><body><div style="font-family: Arial; font-size: 10pt; color: #000000"><div>Phil,</div><div><br></div><div>the full error message is the following. If I comment out <span style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">"#define HAVE_UTIL_H 1" I get the same message but without the last few lines.</span></div><div><br></div><div><br></div><div><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Modules/posixmodule.c: In function '_pystat_fromstructstat':</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Modules/posixmodule.c:1455:15: error: 'struct stat' has no member named 'st_atimespec'</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> ansec = st->st_atimespec.tv_nsec;</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> ^</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Modules/posixmodule.c:1456:15: error: 'struct stat' has no member named 'st_mtimespec'</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> mnsec = st->st_mtimespec.tv_nsec;</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> ^</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Modules/posixmodule.c:1457:15: error: 'struct stat' has no member named 'st_ctimespec'</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> cnsec = st->st_ctimespec.tv_nsec;</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> ^</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">In file included from Modules/posixmodule.c:29:0:</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Modules/posixmodule.c:1483:54: error: 'struct stat' has no member named 'st_gen'</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> PyInt_FromLong((long)st->st_gen));</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> ^</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Include/structseq.h:36:44: note: in definition of macro 'PyStructSequence_SET_ITEM'</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> (((PyStructSequence *)(op))->ob_item[i] = v)</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> ^</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Modules/posixmodule.c:1489:22: error: 'struct stat' has no member named 'st_birthtime'</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> bsec = (long)st->st_birthtime;</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> ^</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Modules/posixmodule.c:1491:17: error: 'struct stat' has no member named 'st_birthtimespec'</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> bnsec = st->st_birthtimespec.tv_nsec;</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> ^</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">In file included from Modules/posixmodule.c:29:0:</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Modules/posixmodule.c:1506:54: error: 'struct stat' has no member named 'st_flags'</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> PyInt_FromLong((long)st->st_flags));</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> ^</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Include/structseq.h:36:44: note: in definition of macro 'PyStructSequence_SET_ITEM'</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> (((PyStructSequence *)(op))->ob_item[i] = v)</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> ^</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Modules/posixmodule.c: At top level:</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Modules/posixmodule.c:3869:18: fatal error: util.h: No such file or directory</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> #include <util.h></span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> ^</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">compilation terminated.</span><br><span style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">make: *** [.obj/posixmodule.o] Error 1</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p></div><div><span name="x"></span>-- <br>Regards,<br><div><br></div>John Hackett<br>Icon Information Systems<br>74 Gibsons Hill, Norbury, London, SW16 3JS<br>t: 020 8764 2663<br>f: 020 8711 3370<br>m: 07801-231118<br>e: john.hackett@icon-is.co.uk<br>w: www.icon-is.co.uk<br>skype: john_hackett<br>twitter: @iconinfosys<span name="x"></span><br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Phil Thompson" <phil@riverbankcomputing.com><br><b>To: </b>"John Hackett" <john.hackett@icon-is.co.uk><br><b>Cc: </b>pyqt@riverbankcomputing.com<br><b>Sent: </b>Tuesday, 8 December, 2015 2:40:33 PM<br><b>Subject: </b>Re: [PyQt] static Python target osx-64 missing util.h<br><div><br></div>On 8 Dec 2015, at 2:00 p.m., John M. Hackett <john.hackett@icon-is.co.uk> wrote:<br>> <br>> Hi,<br>> <br>> I have an App compiling and running correctly under Linux with PyQt5 and Python 2.7.9 using pyqtdeploy (thanks for the help Phil!)<br>> <br>> 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:<br>> <br>> cd /root/pyqtdeploy-dir/sysroot-linux/Python-2.7.9-src<br>> pyqtdeploycli --package python --target linux-64 configure<br>> $SYSROOT/qmake SYSROOT=$SYSROOT<br>> make<br>> make install<br>> <br>> If I change my $SYSROOT and the target for a osx build I get an error. So the commands I'm using are:<br>> <br>> cd /root/pyqtdeploy-dir/sysroot-macos/Python-2.7.9-src<br>> pyqtdeploycli --package python --target osx-64 configure<br>> $SYSROOT/qmake SYSROOT=$SYSROOT<br>> make<br>> <br>> <br>> make fails with this error:<br>> <br>> ...<br>> Modules/posixmodule.c: At top level:<br>> Modules/posixmodule.c:3869:18: fatal error: util.h: No such file or directory<br>> #include <util.h><br>> ^<br>> compilation terminated.<br>> make: *** [.obj/posixmodule.o] Error 1<br>> <br>> 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.<br>> <br>> Question: where can I find this header and why isn't it in the source (downloaded from Python.org)?<br><div><br></div>It will be a system header file. What symbols are missing when you comment it out?<br><div><br></div>Phil</blockquote><div><br></div></div></body></html>