2

I have tried using mingw and a few versions of python, on win7 x32(vbox) and x64
on x64, cymunk compiles, but crashes with a ntdll.dll error upon import
on x32, cymunk fails to compile with a "dwarf error"

do I have to use MSVC? if so how and what version?

any answers appreciated!

extra info:
http://cython.org/ - tried manuall compiled cython, from pip/easy_install, from kivy and pre-compiled (versions 0.20.2 and 0.20.1-b?)
using python 2.7.6 and latest, also one bundled with kivy
using latest mingw, and one bundled with kivy

x32(vbox) log with dwarf error: http://pastebin.com/vgkcwj6W

issue I opened on github: https://github.com/tito/cymunk/issues/26

Chozabu
  • 1,015
  • 1
  • 10
  • 33
  • Python itself is compiled using MSVC. Search for Windows SDK to find a standalone MSVC x64 compiler. Using MinGW might lead to problems with conflicting runtimes, at least it did in the past. – filmor Sep 03 '14 at 07:35
  • Have a look here: http://stackoverflow.com/questions/12028762/what-version-of-visual-studio-and-or-mingw-do-i-need-to-build-extension-modules – filmor Sep 03 '14 at 07:37
  • Thanks for the info! it seems chipmunk (the lib cymunk wraps) has problems compiling with msvc2008 (the version used to compile offical py 2.7) – Chozabu Sep 04 '14 at 17:34
  • It looks like I may need to either: (a) custom compile python with mingw or recent msvc (b) modify chipmunk to compile under msvc2008 again I had a hack at b - but am not sure how practical it is... – Chozabu Sep 04 '14 at 18:30

2 Answers2

1

I am pretty sure it has something to do with your environment. Try to use at least version 4.8.2 of mingw AND make sure you don't have multiple mingw versions on your machine (or both mingw and cygwin, etc)

If you have multiple versions of mingw (maybe also cygwin?) you could end up using the latest version's compiler but some environment variable which points to the LIB directory are from one of the other versions (an incompatible mingwrt maybe?)

I suggest you try using this tool http://sourceforge.net/projects/mingw/files/Installer/ for managing mingw packages; maybe also a

mingw-get upgrade "mingwrt=4.0.3"

(the latest mingw runtime system - I guess that the ntdll error is caused by this)

Paul Ianas
  • 501
  • 3
  • 4
  • Thanks for the reply! I am however using the latest mingw already, tested on several machines(some virtual) including winxp, 7 and 8, one of them being a completly clean install of windows (xp and 8) – Chozabu Sep 03 '14 at 21:28
  • Hey! Fixed it. An arg being passed to gcc was incorrect for windows – Chozabu Dec 04 '14 at 16:59
0

The trick on windows was to use -std=gnu99 rather than -std=c99 - noticed on chipmunk forums.

I have updated cymunk accordingly.

https://github.com/tito/cymunk/commit/2906ea14cbfaf42c067df4df59404c63de953c3b

Compiling for windows should now be much easier.

Chozabu
  • 1,015
  • 1
  • 10
  • 33