Mattsa008 / pybox2d

Automatically exported from code.google.com/p/pybox2d
Other
0 stars 0 forks source link

Windows 7 Python 2.7 x64 build fails / setuptools #51

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This is a similar issue to #26, but uses setuptools and the SVN version (also 
tried the packaged version), which was the suggested fix in the comments.

I initially tried installing it in command prompt, but when that failed, I 
followed the instructions here, with the same outcome: 
http://code.google.com/p/pybox2d/wiki/BuildingfromSource#Windows

$ setup.py build
Using setuptools (version 0.6).
running build
running build_py
copying library\Box2D\Box2D.py -> build\lib.win-amd64-2.7\Box2D
copying library\Box2D\__init__.py -> build\lib.win-amd64-2.7\Box2D
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D\Box2D.i to Box2D\Box2D_wrap.cpp
k:\Portable Applications\swigwin-2.0.10\swig.exe -python -c++ -IBox2D -small -O
-includeall -ignoremissing -w201 -globals b2Globals -outdir library\Box2D -keywo
rd -w511 -D_SWIG_KWARGS -o Box2D\Box2D_wrap.cpp Box2D\Box2D.i
Box2D\Collision\b2DynamicTree.h(44) : Warning 312: Nested union not currently su
pported (ignored).
Box2D\Box2D_printing.i(326) : Warning 303: %extend defined for an undeclared cla
ss b2LoopShape.
Box2D\Common\b2Settings.h(144) : Warning 506: Can't wrap varargs with keyword ar
guments enabled
Box2D\Common\b2Math.h(91) : Warning 509: Overloaded method b2Vec2::operator ()(i
nt32) effectively ignored,
Box2D\Common\b2Math.h(85) : Warning 509: as it is shadowed by b2Vec2::operator (
)(int32) const.
error: Unable to find vcvarsall.bat

It seems it is still trying to use VC++ (I have Visual Studio C++ Express 2010 
installed), even though I created the distutils.cfg file with the specified 
contents.

Original issue reported on code.google.com by rabbitki...@googlemail.com on 31 Aug 2013 at 12:16

GoogleCodeExporter commented 8 years ago
Sorry, I typoed the filename, and at a glance it looked right when I checked if 
that was the problem.

Original comment by rabbitki...@googlemail.com on 31 Aug 2013 at 2:07

GoogleCodeExporter commented 8 years ago
Thanks for the follow-up. Following the installation instructions worked with 
MinGW, then?

Original comment by sir...@gmail.com on 31 Aug 2013 at 2:34

GoogleCodeExporter commented 8 years ago
This error happens now. I was going to look into it before posting, but ran out 
of time, so didn't post:

Using setuptools (version 0.6).
running build
running build_py
copying library\Box2D\Box2D.py -> build\lib.win-amd64-2.7\Box2D
copying library\Box2D\__init__.py -> build\lib.win-amd64-2.7\Box2D
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D\Box2D.i to Box2D\Box2D_wrap.cpp
K:\Portable Applications\swigwin-2.0.10\swig.exe -python -c++ -IBox2D -small -O 
-includeall -ignoremissing -w201 -globals b2Globals -outdir
library\Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D\Box2D_wrap.cpp 
Box2D\Box2D.i
Box2D\Collision\b2DynamicTree.h(44) : Warning 312: Nested union not currently 
supported (ignored).
Box2D\Box2D_printing.i(326) : Warning 303: %extend defined for an undeclared 
class b2LoopShape.
Box2D\Common\b2Settings.h(144) : Warning 506: Can't wrap varargs with keyword 
arguments enabled
Box2D\Common\b2Math.h(91) : Warning 509: Overloaded method b2Vec2::operator 
()(int32) effectively ignored,
Box2D\Common\b2Math.h(85) : Warning 509: as it is shadowed by b2Vec2::operator 
()(int32) const.
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\include 
-IC:\Python27\PC -c Box2D\Box2D_wrap.cpp -o build\temp.win-amd64-2.7\R
elease\box2d\box2d_wrap.o -I.
cc1plus.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1

Original comment by rabbitki...@googlemail.com on 1 Sep 2013 at 7:37

GoogleCodeExporter commented 8 years ago
It would appear that that option has been removed in MinGW gcc 4.7.0 according 
to http://stackoverflow.com/questions/9645004/python-mno-cygwin

You can either try modifying the cygwinccompiler.py as noted in the link, or 
downgrading your MinGW version. 

Original comment by sir...@gmail.com on 1 Sep 2013 at 7:53