kenlm icon indicating copy to clipboard operation
kenlm copied to clipboard

Fail to build kenlm on Windows with the latest changes

Open akladiev opened this issue 4 years ago • 0 comments

Hello,

Looks like the build of the wheel on Windows is broken after 5cea457db26950a73d638425c183b368c06ed7c6 commit. We're building it for Python3.6 and use MSVC 14.22.27905 compiler.

The error is: pip-install-i67796b6\kenlm_eedaa422ab8f4123aab28883290f1561\util\pool.hh(92): error C2039: 'max': is not a member of 'std'

Details:

pip install git+https://github.com/kpu/kenlm.git#egg=kenlm

   Building wheel for kenlm (setup.py): started
   Building wheel for kenlm (setup.py): finished with status 'error'
   ERROR: Command errored out with exit status 1:
    command: 'python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER~1\\AppData\\Local\\Temp\\pip-install-i67796b6\\kenlm_eedaa422ab8f4123aab28883290f1561\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER~1\\AppData\\Local\\Temp\\pip-install-i67796b6\\kenlm_eedaa422ab8f4123aab28883290f1561\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\USER~1\AppData\Local\Temp\pip-wheel-k7kwy3gl'
        cwd: C:\Users\USER~1\AppData\Local\Temp\pip-install-i67796b6\kenlm_eedaa422ab8f4123aab28883290f1561\
   Complete output (107 lines):

	...
	
   C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.22.27905\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -IC:\j\workspace\venv\include "-IC:\Program Files\Python36\include" "-IC:\Program Files\Python36\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.22.27905\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.22.27905\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tputil\pool.cc /Fobuild\temp.win-amd64-3.6\Release\util\pool.obj -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11
   cl : Command line warning D9002 : ignoring unknown option '-O3'
   cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
   pool.cc
   C:\Users\user\AppData\Local\Temp\pip-install-i67796b6\kenlm_eedaa422ab8f4123aab28883290f1561\util\pool.hh(92): error C2039: 'max': is not a member of 'std'
   C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.22.27905\include\vector(19): note: see declaration of 'std'
   C:\Users\user\AppData\Local\Temp\pip-install-i67796b6\kenlm_eedaa422ab8f4123aab28883290f1561\util\pool.hh(92): error C3861: 'max': identifier not found
   error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
   ----------------------------------------
   ERROR: Failed building wheel for kenlm

akladiev avatar Dec 09 '21 15:12 akladiev