Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

precompiled version for windows? #43

Open
Tungsteno74 opened this issue Jan 18, 2017 · 9 comments
Open

precompiled version for windows? #43

Tungsteno74 opened this issue Jan 18, 2017 · 9 comments

Comments

@Tungsteno74
Copy link

Tungsteno74 commented Jan 18, 2017

Hello,

I've tried to follow the basic guide shown in the README.md but after install MinGW and run the command

python setup.py build --compiler=mingw32

always i get:

running build
running build_py
running build_ext
skipping 'cymunk\cymunk.c' Cython extension (up-to-date)
building 'cymunk.cymunk' extension
gcc -mno-cygwin -mdll -O -Wall -Icymunk\Chipmunk-Physics\include -Icymunk\Chipmu
nk-Physics\include\chipmunk "-IC:\Program Files\Python27x64\include" "-IC:\Progr
am Files\Python27x64\PC" -c cymunk\cymunk.c -o build\temp.win-amd64-2.7\Release\
cymunk\cymunk.o -std=gnu99 -ffast-math -fPIC -DCHIPMUNK_FFI
error: command 'gcc' failed: No such file or directory

I've tested it on Windows Vista 64bit and Windows 10 64bit and the error happens on both OSes.

Now my last hope is to find a pre-compiled version.
Someone get one to share?

thanks

@Tungsteno74
Copy link
Author

Well, I have made some progress in recent days. I was able to compile Python for 32-bit (here's the fork of the project with a build already compiled https://goo.gl/zSJaum) but i always i got problems with 64bit version.

Someone can help me?

thanks again

@Kovak
Copy link
Collaborator

Kovak commented Jan 22, 2017

I have no problem compiling for 32 or 64 bit on Windows. If you make sure to follow the rules for building Kivy on Windows your system should be properly configured.

@Tungsteno74
Copy link
Author

Tungsteno74 commented Jan 24, 2017

Hello @Kovak,
First of all I thank you for your awesome work and for your reply!

Then, I've tried mingw32 and mingw64 on two windows system (Vista and 10) both at 64bit, but i got always the same error.

Please, can you tell me which version of mingw you use (better a link) to build kivent for 64bit Python and on which Windows version?

Last thing, do you have set any particular parameter in the 64 bit compiler or python?

@Tungsteno74
Copy link
Author

@Kovak
The bad news is that I've tried to follow all kind of guide/instructions for compiling kivy or python C sources but really I'M NOT ABLE TO DO IT with windows and python 64bit and mingw64 (TDM64 from here ).
The good news is that i compiled well it with python 32bit and mingw32 (but is not what i want).

Thus, springs to my mind a question:
there is a particular reason why you do not put available an already compiled version for windows (32-64 bit)?

I think that this engine is very interesting (I wanted so much to try it), but it's a shame not to use it just because i can't compile it on a standard windows environment.
Probably I may be wrong something (i'm very newbie in compiling stuff), but it is not for this reason that there are precompiled versions? :D

I hope in your answer. Thanks in advance

@Kovak
Copy link
Collaborator

Kovak commented Jan 27, 2017

Typically with Kivy we use the mingw python package provided by conda.

Are you following these instructions for setting up your compilation environment?

https://kivy.org/docs/installation/installation-windows.html#use-development-kivy

@Tungsteno74
Copy link
Author

Tungsteno74 commented Jan 28, 2017

No, i didn't follow exactly these steps before.

But this time, I've tried to follow the sequence showed in your link:

python -m pip install --upgrade pip wheel setuptools


Create the python\Lib\distutils\distutils.cfg file and add the two lines:

[build]
compiler = mingw32


Install MinGW with:

python -m pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy


Set the environment variables USE_SDL2=1 and USE_GSTREAMER=1 (through Windows UI)

python -m pip install cython docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew kivy.deps.gstreamer

pip install https://github.com/tito/cymunk/archive/master.zip

Thus after all this steps all "seem" to be installed correctly so i run a python console and import the cymunk module, but i receive the following error:

c:\windows\system32>python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (
AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cymunk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python27x64\lib\site-packages\cymunk\__init__.py", line
 1, in <module>
    from .cymunk import *
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
>>>

Same error happened even using DTM mingw64

After that, i'm really out of ideas :(

@Tungsteno74
Copy link
Author

Tungsteno74 commented Jan 29, 2017

I found that in the (64bit Python) build process, after creating the cymunk.pyd file i get these warnings:

C:/Program Files/Python27x64/share/mingwpy/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.2/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: cannot find entry symbol
_DllMain@12; defaulting to 000000006f281000
C:/Program Files/Python27x64/share/mingwpy/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.2/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: cannot find entry symbol
_DllMain@12; defaulting to 000000006f281000
C:/Program Files/Python27x64/share/mingwpy/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.2/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: cannot find entry symbol
_DllMain@12; defaulting to 000000006f281000

These warnings are not present in the compiling phase of 32bit version of Python (and this works).

Could this be the problem?

@kensolano
Copy link

kensolano commented Apr 4, 2018

Python 3.4: compile cython module for 64-bit windows

https://stackoverflow.com/questions/27488163/python-3-4-compile-cython-module-for-64-bit-windows

precompiled version for Windows 64

https://www.reddit.com/r/kivy/comments/7r4oyw/kivent_and_cymunk_were_a_pain_to_compile_on/

The user xmzhang posted this link with several wheels for KivEnt (and their required Cymunk wheels):

https://github.com/kivy/kivent/pull/239/files?short_path=04c6e90#diff-04c6e90faac2675aa89e2176d2eec7d8

I just found these wheels for python 3.6 :

https://github.com/PureAsbestos/KivEnt-Wheels-Win64-Py3.6

As KivEnt is so hard to get working on Windows, I'd want to request that there are some wheels officially uploaded. KivEnt has a great potential, but it's hard to set a Windows environment.

@Tungsteno74
Copy link
Author

Same for Python 2.7.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants