In case anyone (else) cares I needed to make some minor changes
(attached) for compiling sip with my MinGW-w64 64bit Python:

To build:

cd /tmp
wget -c 
http://garr.dl.sourceforge.net/project/pyqt/sip/sip-4.14.4/sip-4.14.4.zip
unzip sip-4.14.4.zip
cd sip-4.14.4
patch -p1 < /c/sip-4.14.4-mingw-python.patch
/c/python27.mingw64/bin/python.exe configure.py --platform=cygwin-g++
CFLAGS="-D__USE_MINGW_ANSI_STDIO -m64" LFLAGS="-m64"
CXXFLAGS="-D__USE_MINGW_ANSI_STDIO -m64"
make

I had an issue with make install, but have left that as an exercise
for anyone interested.

On Wed, Mar 13, 2013 at 2:00 PM, Ray Donnelly <[email protected]> wrote:
> Your cflags are wrong. Please run bin/python-config.sh --cflags (or
> bin/python-config). You'll need to adjust the include paths.
>
> In this instance, you are missing __USE_MINGW_ANSI_STDIO.
>
> On Wed, Mar 13, 2013 at 1:03 PM, Theuns Heydenrych
> <[email protected]> wrote:
>> Ray, Thanks for the downloads.
>> When Compiling Sip i get the following error.
>>
>> C:\dev\sip-4.14.3>mingw32-make
>> mingw32-make[1]: Entering directory 'C:/dev/sip-4.14.3/sipgen'
>> makefile:29: warning: overriding recipe for target '.c.o'
>> makefile:26: warning: ignoring old recipe for target '.c.o'
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o main.o main.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o transform.o
>> transform.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o gencode.o
>> gencode.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o extracts.o
>> extracts.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o export.o
>> export.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o heap.o heap.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o parser.o
>> parser.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o lexer.o
>> lexer.c
>> g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import
>> -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -Wl,-s -o sip.exe
>> main.o transform.o gencode.o extracts.o export.o heap.o parser.o lexer.o
>>
>> mingw32-make[1]: Leaving directory 'C:/dev/sip-4.14.3/sipgen'
>> mingw32-make[1]: Entering directory 'C:/dev/sip-4.14.3/siplib'
>> makefile:29: warning: overriding recipe for target '.c.o'
>> makefile:26: warning: ignoring old recipe for target '.c.o'
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
>> -IC:\Python27\include\python2.7 -o siplib.o siplib.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
>> -IC:\Python27\include\python2.7 -o apiversions.o apiversions.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
>> -IC:\Python27\include\python2.7 -o descriptors.o descriptors.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
>> -IC:\Python27\include\python2.7 -o qtlib.o qtlib.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
>> -IC:\Python27\include\python2.7 -o threads.o threads.c
>> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
>> -IC:\Python27\include\python2.7 -o objmap.o objmap.c
>> In file included from C:\Python27\include\python2.7/Python.h:58:0,
>>                  from sip.h:32,
>>                  from objmap.c:23:
>> C:\Python27\include\python2.7/pyport.h:232:9: error: #error "This platform's
>> pyconfig.h needs to define PY_FORMAT_SIZE_T"
>> makefile:29: recipe for target 'objmap.o' failed
>> mingw32-make[1]: *** [objmap.o] Error 1
>> mingw32-make[1]: Leaving directory 'C:/dev/sip-4.14.3/siplib'
>> makefile:3: recipe for target 'all' failed
>> mingw32-make: *** [all] Error 2
>>
>>
>> On Wed, Mar 13, 2013 at 2:33 PM, Ray Donnelly <[email protected]>
>> wrote:
>>>
>>> You could use my Python if you want:
>>>
>>> https://mingw-and-ndk.googlecode.com/files/python-2.7.3-win64.7z
>>> https://mingw-and-ndk.googlecode.com/files/python-2.7.3-win32.7z
>>>
>>> They were compiled using MinGW-w64 compilers. The mingwbuilds project
>>> also includes Python binaries built from the same patches.
>>>
>>> On Wed, Mar 13, 2013 at 12:15 PM, Theuns Heydenrych
>>> <[email protected]> wrote:
>>> > I feel that i am very near the point that it will work, but don't know
>>> > what
>>> > else to do.
>>> >
>>> > Any other suggestions?
>>> >
>>> >
>>> > On Wed, Mar 13, 2013 at 9:52 AM, Václav Šmilauer <[email protected]> wrote:
>>> >>
>>> >> On 13/03/13 07:17, Theuns Heydenrych wrote:
>>> >> > Hi, I know this is not a Python mailing list, but i am desperate.
>>> >> > Someone in StackOverflow
>>> >> > I am compiling Sip and PyQt from source using Mingw64 and Python
>>> >> > 2.7.3
>>> >> > 64bit.
>>> >> > Python binaries is installed via downloaded installer, and is build
>>> >> > with MSVC.
>>> >> > I went through the exercise of making a libpython27.a file.
>>> >> >
>>> >> > Sip build successfully and work when used in a python console when
>>> >> > using the following script
>>> >> > >>> from sip import *
>>> >> >
>>> >> > and PyQt build successfully , but fails with a Python stop working
>>> >> > Windows7 dialog , when the following script is used in the python
>>> >> > console.
>>> >> > >>> from PyQt4.Qt import *
>>> >> >
>>> >> > How do i debug this?
>>> >> > Is it because Python is build with MSVC?
>>> >> >
>>> >> > Is it ok, to build things like Sip and PyQt with Mingw and gcc and it
>>> >> > link against a MSVC Python27.dll?
>>> >> Hi,
>>> >>
>>> >> this is a recurrent topic unfortunately. You can built extensions to
>>> >> MSVC-compiled python with mingw, but the problem is the MSVC runtime
>>> >> you
>>> >> link to - msvcrt or msvcr90 etc. See my post
>>> >> http://article.gmane.org/gmane.comp.gnu.mingw.w64.general/6306 (and the
>>> >> rest of that thread) for solution: change the MSVC dll disutils link
>>> >> to.
>>> >> I did build sip and pyqt4 (among others) successfully, it works
>>> >> flawlessly. (Building SIP was tricky with msys shell a bit.) You might
>>> >> want to check
>>> >> http://permalink.gmane.org/gmane.comp.gnu.mingw.w64.general/6511 -
>>> >> there
>>> >> are build scripts and patches in the attachment which I used.
>>> >> http://bugs.python.org/issue16472 is upstream bug for this.
>>> >>
>>> >> HTH, Vaclav
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> ------------------------------------------------------------------------------
>>> >> Everyone hates slow websites. So do we.
>>> >> Make your web apps faster with AppDynamics
>>> >> Download AppDynamics Lite for free today:
>>> >> http://p.sf.net/sfu/appdyn_d2d_mar
>>> >> _______________________________________________
>>> >> Mingw-w64-public mailing list
>>> >> [email protected]
>>> >> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>> >
>>> >
>>> >
>>> >
>>> > ------------------------------------------------------------------------------
>>> > Everyone hates slow websites. So do we.
>>> > Make your web apps faster with AppDynamics
>>> > Download AppDynamics Lite for free today:
>>> > http://p.sf.net/sfu/appdyn_d2d_mar
>>> > _______________________________________________
>>> > Mingw-w64-public mailing list
>>> > [email protected]
>>> > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>> >
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Everyone hates slow websites. So do we.
>>> Make your web apps faster with AppDynamics
>>> Download AppDynamics Lite for free today:
>>> http://p.sf.net/sfu/appdyn_d2d_mar
>>> _______________________________________________
>>> Mingw-w64-public mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_mar
>> _______________________________________________
>> Mingw-w64-public mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>

Attachment: sip-4.14.4-mingw-python.patch
Description: Binary data

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to