BLLIP / bllip-parser

BLLIP reranking parser (also known as Charniak-Johnson parser, Charniak parser, Brown reranking parser) See http://pypi.python.org/pypi/bllipparser/ for Python module.
http://bllip.cs.brown.edu/
227 stars 53 forks source link

Don't know how to compile first-stage/PARSE/swig/wrapper.C [Microsoft Visual C Compiler] #48

Open jmamou opened 8 years ago

jmamou commented 8 years ago

When I try to build it on Windows 7 with Python 3.5 (from anaonda) and swig-3.0.8, I get the error below. Any idea about it? Thanks!

Installing collected packages: bllipparser Running setup.py install for bllipparser ... error Complete output from command C:\Users\XXX\AppData\Local\Continuum\Anacond a3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\XXX\Ap pData\Local\Temp\pip-build-xk8jp9i2\bllipparser\setup.py';exec(compile(geta ttr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'e xec'))" install --record C:\Users\XXX\AppData\Local\Temp\pip-kqz1g4fw-record\ install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win-amd64-3.5 creating build\lib.win-amd64-3.5\bllipparser copying python\bllipparser\CharniakParser.py -> build\lib.win-amd64-3.5\blli pparser copying python\bllipparser\JohnsonReranker.py -> build\lib.win-amd64-3.5\bll ipparser copying python\bllipparser\ModelFetcher.py -> build\lib.win-amd64-3.5\bllipp arser copying python\bllipparser\ParsingShell.py -> build\lib.win-amd64-3.5\bllipp arser copying python\bllipparser\RerankerFeatureCorpus.py -> build\lib.win-amd64-3 .5\bllipparser copying python\bllipparser\RerankingParser.py -> build\lib.win-amd64-3.5\bll ipparser copying python\bllipparser\Utility.py -> build\lib.win-amd64-3.5\bllipparser

copying python\bllipparser\__init__.py -> build\lib.win-amd64-3.5\bllipparse

r copying python\bllipparsermain.py -> build\lib.win-amd64-3.5\bllipparse r running build_ext building 'bllipparser._CharniakParser' extension error: Don't know how to compile first-stage/PARSE/swig/wrapper.C

dmcc commented 8 years ago

Just a shot in the dark: maybe it doesn't know what the .C extension means -- see if changing https://github.com/BLLIP/bllip-parser/blob/master/setup.py#L81 to wrapper_path = 'swig/wrapper.cc' helps. https://github.com/python/cpython/blob/master/Lib/distutils/msvccompiler.py#L215 implies that Microsoft compilers might not like .C as a C++ extension). If this is the case, it will unfortunately fail on the other .C files, but let's take it one step at a time.

jmamou commented 8 years ago

Thanks! You are correct on both points. Modifying the wrapper_path does help. But after it fails compiling C code. Note that according to https://msdn.microsoft.com/en-us/library/032xwy55.aspx the /Tc option of cl.exe specifies that filename is a C source file, even if it does not have a .c extension. Any idea?

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /

nologo /Ox /W3 /GL /DNDEBUG /MD -Ifirst-stage/PARSE/ -IC:\Users\XXX\AppData\L ocal\Continuum\Anaconda3\include -IC:\Users\XXX\AppData\Local\Continuum\Anaco nda3\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.10240.0\ucrt" "-IC:\Program Fil es (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windo ws Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\ \um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tcfirst-s tage/PARSE/Bchart.c /Fobuild\temp.win-amd64-3.5\Release\first-stage/PARSE/Bchart .obj Bchart.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(18): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(18): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(19): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(19): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(20): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(20): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(21): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(21): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(23): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(23): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(24): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(24): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(25): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(25): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(26): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(26): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(28): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(28): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(29): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(29): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(30): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(30): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(31): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(31): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(33): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(33): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(34): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(34): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(36): error C2061: syntax error: identifier 'tr1' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(36): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(36): error C2449: found '{' at file scope (missing function header?) C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(54): error C2059: syntax error: '}' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(18): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(18): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(19): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(19): error C2061: syntax error: identifier 'abs' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(19): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(19): error C2061: syntax error: identifier 'atexit' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(20): error C2061: syntax error: identifier 'atof' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(20): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(20): error C2061: syntax error: identifier 'atoi' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(20): error C2061: syntax error: identifier 'atol' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(21): error C2061: syntax error: identifier 'bsearch' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(21): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(21): error C2061: syntax error: identifier 'calloc' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(21): error C2061: syntax error: identifier 'div' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(22): error C2061: syntax error: identifier 'exit' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(22): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(22): error C2061: syntax error: identifier 'free' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(23): error C2061: syntax error: identifier 'labs' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(23): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(23): error C2061: syntax error: identifier 'ldiv' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(23): error C2061: syntax error: identifier 'malloc' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(24): error C2061: syntax error: identifier 'mblen' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(24): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(24): error C2061: syntax error: identifier 'mbstowcs' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(24): error C2061: syntax error: identifier 'mbtowc' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(25): error C2061: syntax error: identifier 'qsort' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(25): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(25): error C2061: syntax error: identifier 'rand' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(25): error C2061: syntax error: identifier 'realloc' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(26): error C2061: syntax error: identifier 'srand' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(26): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(26): error C2061: syntax error: identifier 'strtod' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(26): error C2061: syntax error: identifier 'strtol' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(27): error C2061: syntax error: identifier 'strtoul' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(27): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(28): error C2061: syntax error: identifier 'wcstombs' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(28): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(28): error C2061: syntax error: identifier 'wctomb' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(30): error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(33): error C2061: syntax error: identifier 'using' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(34): error C2061: syntax error: identifier 'system' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(34): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(37): error C2061: syntax error: identifier 'atoll' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(37): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(37): error C2061: syntax error: identifier 'llabs' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(37): error C2061: syntax error: identifier 'lldiv' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(38): error C2061: syntax error: identifier 'strtof' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(38): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(38): error C2061: syntax error: identifier 'strtold' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(39): error C2061: syntax error: identifier 'strtoll' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(39): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(39): error C2061: syntax error: identifier 'strtoull' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(41): error C2061: syntax error: identifier '_Exit' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(41): error C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(41): error C2061: syntax error: identifier 'at_quick_exit' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdlib(41): error C2061: syntax error: identifier 'quick_exit' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(17): er ror C2061: syntax error: identifier 'noexcept' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(17): er ror C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(18): er ror C2449: found '{' at file scope (missing function header?) C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(20): er ror C2059: syntax error: '}' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(30): er ror C2061: syntax error: identifier 'noexcept' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(30): er ror C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(31): er ror C2449: found '{' at file scope (missing function header?) C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(33): er ror C2059: syntax error: '}' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(40): er ror C2061: syntax error: identifier 'noexcept' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(40): er ror C2059: syntax error: ';' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(41): er ror C2449: found '{' at file scope (missing function header?) C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(43): er ror C2059: syntax error: '}' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(50): er ror C2061: syntax error: identifier 'noexcept' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(50): fa tal error C1003: error count exceeds 100; stopping compilation error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\B IN\amd64\cl.exe' failed with exit status 2

dmcc commented 8 years ago

What happens if you try that command with /Tp instead of /Tc? (the .C files are C++, not C)

jmamou commented 8 years ago

Thanks! First, there is an issue with unistd. bllipparser-2015.12.3\first-stage\parse\SimpleAPI.h(18): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory This header is not present in Visual Studio. I have tried to replace it with io.h or to remove it, and run cl.exe with /Tp, but I got the errors below. Are these errors related to unistd?

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe" /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ifirst-st age/PARSE/ -IC:\Users\XXX\AppData\Local\Continuum\Anaconda3\include -IC:\User s\XXX\AppData\Local\Continuum\Anaconda3\include "-IC:\Program Files (x86)\Mic rosoft 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\includ e\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\inclu de\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kit s\8.1\include\winrt" /Tpfirst-stage/PARSE/swig/wrapper.c /Fobuild\temp.win-amd6 4-3.5\Release\first-stage/PARSE/swig/wrapper.obj wrapper.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xlocale(341): war ning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp ecify /EHsc c:\c2\bllipparser-2015.12.3\first-stage\parse\SentRep.h(40): warning C4267: 'ret urn': conversion from 'size_t' to 'int', possible loss of data first-stage/PARSE/SimpleAPI.C(379): warning C4267: 'initializing': conversion fr om 'size_t' to 'int', possible loss of data first-stage/PARSE/SimpleAPI.C(453): warning C4244: '=': conversion from 'double' to 'float', possible loss of data first-stage/PARSE/SimpleAPI.C(482): warning C4267: 'argument': conversion from ' size_t' to 'int', possible loss of data first-stage/PARSE/SimpleAPI.C(617): warning C4244: '=': conversion from 'double' to 'float', possible loss of data first-stage/PARSE/swig/wrapper.c(6285): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data first-stage/PARSE/swig/wrapper.c(30900): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(30900): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(30900): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(30900): error C2440: 'initializing': cannot con vert from 'lenfunc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(30900): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(30900): error C2440: 'initializing': cannot con vert from 'objobjargproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(30900): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(30900): error C2440: 'initializing': cannot con vert from 'ssizeargfunc' to 'objobjargproc' first-stage/PARSE/swig/wrapper.c(30900): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(30900): error C2440: 'initializing': cannot con vert from 'getbufferproc' to 'lenfunc' first-stage/PARSE/swig/wrapper.c(30900): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(30900): error C2440: 'initializing': cannot con vert from 'releasebufferproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(30900): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(30900): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'getbufferproc' first-stage/PARSE/swig/wrapper.c(30900): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(30900): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'releasebufferproc' first-stage/PARSE/swig/wrapper.c(30900): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(31097): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(31097): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31097): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(31097): error C2440: 'initializing': cannot con vert from 'lenfunc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31097): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31097): error C2440: 'initializing': cannot con vert from 'objobjargproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31097): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31097): error C2440: 'initializing': cannot con vert from 'ssizeargfunc' to 'objobjargproc' first-stage/PARSE/swig/wrapper.c(31097): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31097): error C2440: 'initializing': cannot con vert from 'getbufferproc' to 'lenfunc' first-stage/PARSE/swig/wrapper.c(31097): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31097): error C2440: 'initializing': cannot con vert from 'releasebufferproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31097): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31097): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'getbufferproc' first-stage/PARSE/swig/wrapper.c(31097): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(31097): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'releasebufferproc' first-stage/PARSE/swig/wrapper.c(31097): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(31320): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(31320): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31320): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(31320): error C2440: 'initializing': cannot con vert from 'lenfunc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31320): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31320): error C2440: 'initializing': cannot con vert from 'objobjargproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31320): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31320): error C2440: 'initializing': cannot con vert from 'ssizeargfunc' to 'objobjargproc' first-stage/PARSE/swig/wrapper.c(31320): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31320): error C2440: 'initializing': cannot con vert from 'getbufferproc' to 'lenfunc' first-stage/PARSE/swig/wrapper.c(31320): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31320): error C2440: 'initializing': cannot con vert from 'releasebufferproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31320): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31320): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'getbufferproc' first-stage/PARSE/swig/wrapper.c(31320): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(31320): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'releasebufferproc' first-stage/PARSE/swig/wrapper.c(31320): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(31547): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(31547): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31547): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(31547): error C2440: 'initializing': cannot con vert from 'lenfunc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31547): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31547): error C2440: 'initializing': cannot con vert from 'objobjargproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31547): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31547): error C2440: 'initializing': cannot con vert from 'ssizeargfunc' to 'objobjargproc' first-stage/PARSE/swig/wrapper.c(31547): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31547): error C2440: 'initializing': cannot con vert from 'getbufferproc' to 'lenfunc' first-stage/PARSE/swig/wrapper.c(31547): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31547): error C2440: 'initializing': cannot con vert from 'releasebufferproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31547): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31547): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'getbufferproc' first-stage/PARSE/swig/wrapper.c(31547): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(31547): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'releasebufferproc' first-stage/PARSE/swig/wrapper.c(31547): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(31774): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(31774): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31774): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(31774): error C2440: 'initializing': cannot con vert from 'lenfunc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31774): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31774): error C2440: 'initializing': cannot con vert from 'objobjargproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31774): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31774): error C2440: 'initializing': cannot con vert from 'ssizeargfunc' to 'objobjargproc' first-stage/PARSE/swig/wrapper.c(31774): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31774): error C2440: 'initializing': cannot con vert from 'getbufferproc' to 'lenfunc' first-stage/PARSE/swig/wrapper.c(31774): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31774): error C2440: 'initializing': cannot con vert from 'releasebufferproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31774): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31774): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'getbufferproc' first-stage/PARSE/swig/wrapper.c(31774): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(31774): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'releasebufferproc' first-stage/PARSE/swig/wrapper.c(31774): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(31996): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(31996): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31996): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(31996): error C2440: 'initializing': cannot con vert from 'lenfunc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31996): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31996): error C2440: 'initializing': cannot con vert from 'objobjargproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31996): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31996): error C2440: 'initializing': cannot con vert from 'ssizeargfunc' to 'objobjargproc' first-stage/PARSE/swig/wrapper.c(31996): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31996): error C2440: 'initializing': cannot con vert from 'getbufferproc' to 'lenfunc' first-stage/PARSE/swig/wrapper.c(31996): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31996): error C2440: 'initializing': cannot con vert from 'releasebufferproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(31996): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(31996): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'getbufferproc' first-stage/PARSE/swig/wrapper.c(31996): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(31996): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'releasebufferproc' first-stage/PARSE/swig/wrapper.c(31996): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(32218): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(32218): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32218): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(32218): error C2440: 'initializing': cannot con vert from 'lenfunc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32218): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32218): error C2440: 'initializing': cannot con vert from 'objobjargproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32218): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32218): error C2440: 'initializing': cannot con vert from 'ssizeargfunc' to 'objobjargproc' first-stage/PARSE/swig/wrapper.c(32218): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32218): error C2440: 'initializing': cannot con vert from 'getbufferproc' to 'lenfunc' first-stage/PARSE/swig/wrapper.c(32218): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32218): error C2440: 'initializing': cannot con vert from 'releasebufferproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32218): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32218): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'getbufferproc' first-stage/PARSE/swig/wrapper.c(32218): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(32218): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'releasebufferproc' first-stage/PARSE/swig/wrapper.c(32218): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(32440): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(32440): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32440): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(32440): error C2440: 'initializing': cannot con vert from 'lenfunc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32440): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32440): error C2440: 'initializing': cannot con vert from 'objobjargproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32440): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32440): error C2440: 'initializing': cannot con vert from 'ssizeargfunc' to 'objobjargproc' first-stage/PARSE/swig/wrapper.c(32440): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32440): error C2440: 'initializing': cannot con vert from 'getbufferproc' to 'lenfunc' first-stage/PARSE/swig/wrapper.c(32440): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32440): error C2440: 'initializing': cannot con vert from 'releasebufferproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32440): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32440): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'getbufferproc' first-stage/PARSE/swig/wrapper.c(32440): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(32440): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'releasebufferproc' first-stage/PARSE/swig/wrapper.c(32440): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(32636): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(32636): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32636): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(32636): error C2440: 'initializing': cannot con vert from 'lenfunc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32636): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32636): error C2440: 'initializing': cannot con vert from 'objobjargproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32636): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32636): error C2440: 'initializing': cannot con vert from 'ssizeargfunc' to 'objobjargproc' first-stage/PARSE/swig/wrapper.c(32636): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32636): error C2440: 'initializing': cannot con vert from 'getbufferproc' to 'lenfunc' first-stage/PARSE/swig/wrapper.c(32636): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32636): error C2440: 'initializing': cannot con vert from 'releasebufferproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32636): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32636): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'getbufferproc' first-stage/PARSE/swig/wrapper.c(32636): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(32636): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'releasebufferproc' first-stage/PARSE/swig/wrapper.c(32636): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(32853): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(32853): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32853): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(32853): error C2440: 'initializing': cannot con vert from 'lenfunc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32853): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32853): error C2440: 'initializing': cannot con vert from 'objobjargproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32853): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32853): error C2440: 'initializing': cannot con vert from 'ssizeargfunc' to 'objobjargproc' first-stage/PARSE/swig/wrapper.c(32853): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32853): error C2440: 'initializing': cannot con vert from 'getbufferproc' to 'lenfunc' first-stage/PARSE/swig/wrapper.c(32853): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32853): error C2440: 'initializing': cannot con vert from 'releasebufferproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(32853): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(32853): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'getbufferproc' first-stage/PARSE/swig/wrapper.c(32853): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(32853): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'releasebufferproc' first-stage/PARSE/swig/wrapper.c(32853): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(33045): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(33045): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(33045): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(33045): error C2440: 'initializing': cannot con vert from 'lenfunc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(33045): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(33045): error C2440: 'initializing': cannot con vert from 'objobjargproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(33045): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(33045): error C2440: 'initializing': cannot con vert from 'ssizeargfunc' to 'objobjargproc' first-stage/PARSE/swig/wrapper.c(33045): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(33045): error C2440: 'initializing': cannot con vert from 'getbufferproc' to 'lenfunc' first-stage/PARSE/swig/wrapper.c(33045): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(33045): error C2440: 'initializing': cannot con vert from 'releasebufferproc' to 'binaryfunc' first-stage/PARSE/swig/wrapper.c(33045): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(33045): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'getbufferproc' first-stage/PARSE/swig/wrapper.c(33045): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(33045): error C2440: 'initializing': cannot con vert from 'PyObject ' to 'releasebufferproc' first-stage/PARSE/swig/wrapper.c(33045): note: There is no context in which this conversion is possible first-stage/PARSE/swig/wrapper.c(33237): error C2440: 'initializing': cannot con vert from 'binaryfunc' to 'unaryfunc' first-stage/PARSE/swig/wrapper.c(33237): note: This conversion requires a reinte rpret_cast, a C-style cast or function-style cast first-stage/PARSE/swig/wrapper.c(33237): error C2078: too many initializers first-stage/PARSE/swig/wrapper.c(33237): fatal error C1003: error count exceeds 100; stopping compilation

dmcc commented 8 years ago

Thanks for looking into this. I'm not sure if those errors are unistd.h related, but it's not a great sign that it's complaining about things in the autogenerated wrapper file. I'm afraid it might be a fairly serious undertaking to get this working on Windows (at minimum, I don't have any Windows development experience). Would you be able to run cygwin or Linux in a VM?

jmamou commented 8 years ago

yes, I was able to run on Linux in a VM. Thanks!

dmcc commented 8 years ago

Great, glad to hear that works! I'm going to close this issue for now since there's a workaround, though would gladly accept a pull-request which fixes it.

dmcc commented 7 years ago

Reopening since we didn't really resolve the issue -- apologies for closing it!

duichwer commented 5 years ago

HI, I've got the same problem.

My Setup:

Windows 10 64 Bit, Python 64 Bit

What I've tried so far:

Now I'm trying to investigate this problems.

My Original Error Log:

 Using cached https://files.pythonhosted.org/packages/50/59/b6891ea1408f2992adef5becb713f19630d99fdd86c90b1b8ae493199183/bllipparser-2016.9.11.tar.gz
Requirement already satisfied: six in c:\users\XXX\documents\venv-python\lib\site-packages (from bllipparser) (1.12.0)
Building wheels for collected packages: bllipparser
  Building wheel for bllipparser (setup.py) ... error
  ERROR: Complete output from command 'c:\users\XXX\documents\venv-python\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\XXX\\AppData\\Local\\Temp\\pip-install-we_0vm0a\\bllipparser\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\XXX\AppData\Local\Temp\pip-wheel-7_u22xmz' --python-tag cp37:
  ERROR: running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.7
  creating build\lib.win-amd64-3.7\bllipparser
  copying python\bllipparser\CharniakParser.py -> build\lib.win-amd64-3.7\bllipparser
  copying python\bllipparser\JohnsonReranker.py -> build\lib.win-amd64-3.7\bllipparser
  copying python\bllipparser\ModelFetcher.py -> build\lib.win-amd64-3.7\bllipparser
  copying python\bllipparser\ParsingShell.py -> build\lib.win-amd64-3.7\bllipparser
  copying python\bllipparser\RerankerFeatureCorpus.py -> build\lib.win-amd64-3.7\bllipparser
  copying python\bllipparser\RerankingParser.py -> build\lib.win-amd64-3.7\bllipparser
  copying python\bllipparser\Utility.py -> build\lib.win-amd64-3.7\bllipparser
  copying python\bllipparser\__init__.py -> build\lib.win-amd64-3.7\bllipparser
  copying python\bllipparser\__main__.py -> build\lib.win-amd64-3.7\bllipparser
  running build_ext
  building 'bllipparser._CharniakParser' extension
  error: Don't know how to compile first-stage/PARSE/swig/wrapper.C
  ----------------------------------------
  ERROR: Failed building wheel for bllipparser
  Running setup.py clean for bllipparser
Failed to build bllipparser
Installing collected packages: bllipparser
  Running setup.py install for bllipparser ... error
    ERROR: Complete output from command 'c:\users\XXX\documents\venv-python\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\XXX\\AppData\\Local\\Temp\\pip-install-we_0vm0a\\bllipparser\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\XXX\AppData\Local\Temp\pip-record-jp4v2u1k\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\XXX\documents\venv-python\include\site\python3.7\bllipparser':
    ERROR: running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\bllipparser
    copying python\bllipparser\CharniakParser.py -> build\lib.win-amd64-3.7\bllipparser
    copying python\bllipparser\JohnsonReranker.py -> build\lib.win-amd64-3.7\bllipparser
    copying python\bllipparser\ModelFetcher.py -> build\lib.win-amd64-3.7\bllipparser
    copying python\bllipparser\ParsingShell.py -> build\lib.win-amd64-3.7\bllipparser
    copying python\bllipparser\RerankerFeatureCorpus.py -> build\lib.win-amd64-3.7\bllipparser
    copying python\bllipparser\RerankingParser.py -> build\lib.win-amd64-3.7\bllipparser
    copying python\bllipparser\Utility.py -> build\lib.win-amd64-3.7\bllipparser
    copying python\bllipparser\__init__.py -> build\lib.win-amd64-3.7\bllipparser
    copying python\bllipparser\__main__.py -> build\lib.win-amd64-3.7\bllipparser
    running build_ext
    building 'bllipparser._CharniakParser' extension
    error: Don't know how to compile first-stage/PARSE/swig/wrapper.C
    ----------------------------------------
ERROR: Command "'c:\users\XXX\documents\venv-python\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\XXX\\AppData\\Local\\Temp\\pip-install-we_0vm0a\\bllipparser\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\XXX\AppData\Local\Temp\pip-record-jp4v2u1k\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\XXX\documents\venv-python\include\site\python3.7\bllipparser'" failed with error code 1 in C:\Users\XXX\AppData\Local\Temp\pip-install-we_0vm0a\bllipparser\
duichwer commented 5 years ago

I changed a little bit in Setup.py.

command = 'which'
    if platform.system() ==  'Windows':
        command = 'where.exe'
        print(platform.system())
    if subprocess.call([command, 'swig3.0']) == 0:

Now I'm getting another error, yeah :-)

Running 'swig -python -c++ -module CharniakParser -Ifirst-stage/PARSE/ -Wall -builtin -outdir python/bllipparser -o first-stage/PARSE/swig/wrapper.C first-stage/PARSE/swig\\wrapper.i'
first-stage\PARSE\SimpleAPI.h(74) : Warning 401: Base class 'vector< LabeledSpan >' undefined.
first-stage\PARSE\swig\wrapper.i(316) : Warning 401: 'vector< LabeledSpan >' must be defined before it is used as a base class.
Running 'flex -osecond-stage/programs/features/read-tree.cc second-stage/programs/features/read-tree.l'
Error while running command: Command 'flex' not found.
Build failed!

I will try further methods to fix the problem and mabye as a result a PR.

duichwer commented 5 years ago

I didn't got it to work with 'cmd', but with msys2. Finally only one little piece had to be changed for getting it compiled.

I had to change the compiler options from std++11 to gnu++11. https://github.com/BLLIP/bllip-parser/blob/f83be9f1453a47d5e5b9f9694da8d0950778fb99/setup.py#L148 (see https://stackoverflow.com/a/22167294/6068675).

I think this has to be done, because popen, pclose and fileno are used, which aren't a part of the C Standard.

csaund commented 4 years ago

Just wondering if there is any update or movement on this, as I am currently having almost an identical issue (Windows 10, python 3.7). The package installs just fine on my mac (High Sierra 10.13, Python 2.7). I'm currently trying to follow your steps above (as you got it to work in the end!?) but wondering if the PR ever happened :)