-
Notifications
You must be signed in to change notification settings - Fork 221
Problem with compiling for Python 3.5 under Windows 10 x64 #51
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
Comments
@nchervyakov can you please share the compiled wheel file or changed source file so that it would be easy for all people facing the same issue? |
@jithurjacob , I uploaded compiled library, changed source files from crfsuite, and a patch file with changes. I hope it will help. |
I also prepared the wheel: |
@nchervyakov It is working for me. Thanks a lot |
FYI, I have successfully build win-py3 packages in conda-forge: https://ci.appveyor.com/project/conda-forge/python-crfsuite-feedstock/build/1.0.13 With the minor patch of Update: recipe has been merged and latest 0.9.1 release is now conda-installable for linux, osx and windows (except py27): |
As a work around a manual build and install can be done (with git and Visual Studio 2014/2015 installed):
Tested on Windows 10 Python 3.6 x64 |
@kmike, this is now a problem for the last two release of python. Thoughts on how we might address this? |
@fgregg I think we should make a crfsuite fork with necessary fixes, and use it as a git submodule instead of the official crfsuite. I'm fine with switching to e.g. datamade's crfsuite fork :) |
@kmike okay, sounds good! |
Okay now we have a new problem: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Icrfsuite/include/ -Icrfsuite/lib/cqdb/include -Iliblbfgs/include -Ipycrfsuite -Icrfsuite/win32 -Iinclude -Ic:\python35\include -Ic:\python35\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt" /EHsc /Tppycrfsuite/_pycrfsuite.cpp /Fobuild\temp.win32-3.5\Release\pycrfsuite/_pycrfsuite.obj
_pycrfsuite.cpp
crfsuite/win32\stdint.h(331): error C2371: 'uint32_t': redefinition; different basic types
pycrfsuite/_pycrfsuite.cpp(402): note: see declaration of 'uint32_t'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2 My suspicion is we don't want to to include win32/stdint.h at all for msvc 2015 |
updated crfsuite submodule to include msvc 2015 fix, closes #51
I had a problem when tried to compile this library. The problem was the following:
Compiler said thet the following definitions from python-crfsuite/crfsuite/include/os.h conflict with such definitions from system <math.h>:
#define isfinite _finite
#define snprintf _snprintf
I changed them to the following:
#define my_isfinite _finite
#define my_snprintf _snprintf
And also fixed all places in the library where these definitions are used, and then everything compiled perfectly.
The text was updated successfully, but these errors were encountered: