Closed emilmirzayev closed 5 years ago
Can you try to build original Zstd 1.3.5 sources via build/VS_scripts
command tools?
Or maybe you need to reinstall VS2017: https://social.msdn.microsoft.com/Forums/vstudio/en-US/0f580a73-6f11-4aa6-abbe-6bf1438734c2/standard-files-quotstddefhquot-quotstringhquot-missing-in-visual-studio-2015-rc?forum=vclanguage
Modify/Change installation with adding Universal CRT SDK did the trick for me.
Reinstalling VS2017 seems to fix the issue. Added the following ticks: Optional Windows 10 SDK (10.0.17134.0) Visual C++-Tools für CMake Kernfunktionen von Testtools – Buildtools
Not trying to necro this, but having similar issues and despite the reinstall of both vs 9 for py2 and 17, I got no where beyond an incredibly verbose error message. Figured I'd pop by here and see how I could go about fixing this?
C:\WINDOWS\system32>c:\Python27\python.exe -m pip install zstd
Collecting zstd
Using cached https://files.pythonhosted.org/packages/08/ea/693d977411af8f9a43aee43a092e8b30542cdb9c5a326739ff844549cf93/zstd-1.3.5.1.tar.gz
Installing collected packages: zstd
Running setup.py install for zstd ... error
Complete output from command c:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\mac\\appdata\\local\\temp\\pip-install-khylzr\\zstd\\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\mac\appdata\local\temp\pip-record-kijliv\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'zstd' extension
creating build
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\zstd
creating build\temp.win-amd64-2.7\Release\zstd\lib
creating build\temp.win-amd64-2.7\Release\zstd\lib\compress
creating build\temp.win-amd64-2.7\Release\zstd\lib\decompress
creating build\temp.win-amd64-2.7\Release\zstd\lib\common
creating build\temp.win-amd64-2.7\Release\src
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_compress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_compress.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_compress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstdmt_compress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstdmt_compress.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstdmt_compress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_fast.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_fast.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_fast.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_double_fast.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_double_fast.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_double_fast.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_lazy.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_lazy.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_lazy.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_opt.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_opt.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_opt.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_ldm.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_ldm.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_ldm.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/fse_compress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/fse_compress.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
fse_compress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/huf_compress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/huf_compress.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
huf_compress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/hist.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/hist.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
hist.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/decompress/zstd_decompress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/decompress/zstd_decompress.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_decompress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/fse_decompress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/fse_decompress.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
fse_decompress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/decompress/huf_decompress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/decompress/huf_decompress.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
huf_decompress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/entropy_common.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/entropy_common.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
entropy_common.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/zstd_common.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/zstd_common.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_common.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/xxhash.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/xxhash.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
xxhash.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/error_private.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/error_private.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
error_private.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/pool.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/pool.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
pool.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tcsrc/python-zstd.c /Fobuild\temp.win-amd64-2.7\Release\src/python-zstd.obj /Ox /DVERSION="\"1.3.5.1\"" /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
python-zstd.c
src/python-zstd.c(75) : warning C4267: '=' : conversion from 'size_t' to 'uint32_t', possible loss of data
src/python-zstd.c(109) : error C2065: 'uint64_t' : undeclared identifier
src/python-zstd.c(109) : error C2146: syntax error : missing ';' before identifier 'dest_size'
src/python-zstd.c(109) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(110) : error C2143: syntax error : missing ';' before 'type'
src/python-zstd.c(111) : error C2275: 'size_t' : illegal use of this type as an expression
src/python-zstd.c : see declaration of 'size_t'
src/python-zstd.c(111) : error C2146: syntax error : missing ';' before identifier 'cSize'
src/python-zstd.c(111) : error C2065: 'cSize' : undeclared identifier
src/python-zstd.c(121) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(121) : error C2065: 'uint64_t' : undeclared identifier
src/python-zstd.c(121) : error C2146: syntax error : missing ';' before identifier 'ZSTD_getDecompressedSize'
src/python-zstd.c(122) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(126) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(132) : error C2065: 'cSize' : undeclared identifier
src/python-zstd.c(132) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(132) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
src/python-zstd.c(135) : error C2065: 'cSize' : undeclared identifier
src/python-zstd.c(136) : error C2065: 'cSize' : undeclared identifier
src/python-zstd.c(137) : error C2065: 'error' : undeclared identifier
src/python-zstd.c(138) : error C2065: 'cSize' : undeclared identifier
src/python-zstd.c(138) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(139) : error C2065: 'uint64_t' : undeclared identifier
src/python-zstd.c(139) : error C2146: syntax error : missing ')' before identifier 'cSize'
src/python-zstd.c(139) : error C2059: syntax error : ')'
src/python-zstd.c(140) : error C2065: 'error' : undeclared identifier
src/python-zstd.c(144) : error C2065: 'error' : undeclared identifier
src/python-zstd.c(324) : warning C4113: 'PyObject *(__cdecl *)(PyObject *)' differs in parameter lists from 'PyCFunction'
src/python-zstd.c(325) : warning C4113: 'PyObject *(__cdecl *)(PyObject *)' differs in parameter lists from 'PyCFunction'
src/python-zstd.c(326) : warning C4113: 'PyObject *(__cdecl *)(PyObject *)' differs in parameter lists from 'PyCFunction'
error: command 'C:\\Users\\Mac\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\mac\\appdata\\local\\temp\\pip-install-khylzr\\zstd\\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\mac\appdata\local\temp\pip-record-kijliv\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\mac\appdata\local\temp\pip-install-khylzr\zstd\
Hm, some definitions missing.
Can you try to manualy build module with code from fix-windows-build
branch?
looks like theres still some missing defs. Not sure why...
C:\Users\Mac\Downloads\python-zstd-fix-windows-build\python-zstd-fix-windows-build\python-zstd>c:\Python27\python.exe setup.py build_ext clean
running build_ext
building 'zstd' extension
creating build
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\zstd
creating build\temp.win-amd64-2.7\Release\zstd\lib
creating build\temp.win-amd64-2.7\Release\zstd\lib\compress
creating build\temp.win-amd64-2.7\Release\zstd\lib\common
creating build\temp.win-amd64-2.7\Release\zstd\lib\decompress
creating build\temp.win-amd64-2.7\Release\src
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_compress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_compress.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_compress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstdmt_compress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstdmt_compress.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstdmt_compress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_fast.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_fast.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_fast.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_double_fast.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_double_fast.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_double_fast.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_lazy.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_lazy.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_lazy.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_opt.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_opt.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_opt.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/zstd_ldm.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/zstd_ldm.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_ldm.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/fse_compress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/fse_compress.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
fse_compress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/huf_compress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/huf_compress.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
huf_compress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/compress/hist.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/compress/hist.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
hist.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/fse_decompress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/fse_decompress.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
fse_decompress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/decompress/zstd_decompress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/decompress/zstd_decompress.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_decompress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/decompress/zstd_decompress_block.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/decompress/zstd_decompress_block.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_decompress_block.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/decompress/zstd_ddict.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/decompress/zstd_ddict.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_ddict.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/decompress/huf_decompress.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/decompress/huf_decompress.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
huf_decompress.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/entropy_common.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/entropy_common.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
entropy_common.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/zstd_common.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/zstd_common.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
zstd_common.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/xxhash.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/xxhash.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
xxhash.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/error_private.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/error_private.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
error_private.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/pool.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/pool.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
pool.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tczstd/lib/common/threading.c /Fobuild\temp.win-amd64-2.7\Release\zstd/lib/common/threading.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
threading.c
C:\Users\Mac\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\include -Ic:\Python27\PC /Tcsrc/python-zstd.c /Fobuild\temp.win-amd64-2.7\Release\src/python-zstd.obj /Ox /DVERSION="\"1.3.8.0\"" /DZSTD_MULTITHREAD=1 /Izstd\lib /Izstd\lib\common /Izstd\lib\compress /Izstd\lib\decompress
python-zstd.c
src/python-zstd.c(76) : warning C4267: '=' : conversion from 'size_t' to 'uint32_t', possible loss of data
src/python-zstd.c(110) : error C2065: 'uint64_t' : undeclared identifier
src/python-zstd.c(110) : error C2146: syntax error : missing ';' before identifier 'dest_size'
src/python-zstd.c(110) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(111) : error C2143: syntax error : missing ';' before 'type'
src/python-zstd.c(112) : error C2275: 'size_t' : illegal use of this type as an expression
src/python-zstd.c : see declaration of 'size_t'
src/python-zstd.c(112) : error C2146: syntax error : missing ';' before identifier 'cSize'
src/python-zstd.c(112) : error C2065: 'cSize' : undeclared identifier
src/python-zstd.c(122) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(122) : error C2065: 'uint64_t' : undeclared identifier
src/python-zstd.c(122) : error C2146: syntax error : missing ';' before identifier 'ZSTD_getDecompressedSize'
src/python-zstd.c(123) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(127) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(133) : error C2065: 'cSize' : undeclared identifier
src/python-zstd.c(133) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(133) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
src/python-zstd.c(136) : error C2065: 'cSize' : undeclared identifier
src/python-zstd.c(137) : error C2065: 'cSize' : undeclared identifier
src/python-zstd.c(138) : error C2065: 'error' : undeclared identifier
src/python-zstd.c(139) : error C2065: 'cSize' : undeclared identifier
src/python-zstd.c(139) : error C2065: 'dest_size' : undeclared identifier
src/python-zstd.c(140) : error C2065: 'uint64_t' : undeclared identifier
src/python-zstd.c(140) : error C2146: syntax error : missing ')' before identifier 'cSize'
src/python-zstd.c(140) : error C2059: syntax error : ')'
src/python-zstd.c(141) : error C2065: 'error' : undeclared identifier
src/python-zstd.c(145) : error C2065: 'error' : undeclared identifier
error: command 'C:\\Users\\Mac\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
Please update code from fix-windows-build
branch and try again.
That fixed it! Apologies for using outdated py2.7 with this, trying to adapt some massive project that uses strictly py2 and dont have 4 days to go over everything and ensure its converted to 3 properly!
Fix now in latest version 1.3.8.1
This bug raised again. zstd-1.4.0.0.tar.gz
@EllenZhangYarong Please provide build output.
When I installed zstd in Windows 10, it reminded me to install C++ builder tools to solve this. Yes, it works. But in Mac, I don't know how to solve this. I updated setuptools, not working.
ERROR: Command "/miniconda3/envs/pysyft/bin/python -u -c 'import setuptools, tokenize;file='"'"'/private/var/folders/96/wgbhc93mdch2sx9dhpymwc0000gn/T/pip-install-sxrxw7q3/zstd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/96/wgbhc93mdch2sx9dhpymwc0000gn/T/pip-record-gcpoofj0/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/96/w__gbhc93mdch2sx9dhpymwc0000gn/T/pip-install-sxrxw7q3/zstd/
Odd.
Which version of GCC do you have on Mac?
gcc -v
gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 Apple LLVM version 10.0.1 (clang-1001.0.46.3) Target: x86_64-apple-darwin18.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Seems like gcc-4.2 fails to build zstd.
Try to use clang
with command like: env CC=clang CXX=clang++ python setup.py build_ext clean
Or install newer gcc via brew or ports.
gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/9.1.0/libexec/gcc/x86_64-apple-darwin18/9.1.0/lto-wrapper Target: x86_64-apple-darwin18 Configured with: ../configure --build=x86_64-apple-darwin18 --prefix=/usr/local/Cellar/gcc/9.1.0 --libdir=/usr/local/Cellar/gcc/9.1.0/lib/gcc/9 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew GCC 9.1.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-multilib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk Thread model: posix gcc version 9.1.0 (Homebrew GCC 9.1.0)
ERROR: Command "/miniconda3/envs/pysyft/bin/python -u -c 'import setuptools, tokenize;file='"'"'/private/var/folders/96/wgbhc93mdch2sx9dhpymwc0000gn/T/pip-install-a6o9r18r/zstd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/96/wgbhc93mdch2sx9dhpymwc0000gn/T/pip-record-golslkh9/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/96/w__gbhc93mdch2sx9dhpymwc0000gn/T/pip-install-a6o9r18r/zstd/
My mac: MacOS mojave 10.14.5
SOLVED ON MAC. In my case, I used conda to create a virtual environment. If conda create -n env python=3, It will be good. If without python=3, it raised this problem.
Good to know.
However I didn't tested this project installation with conda. And not uploaded it to anaconda.
@EllenZhangYarong I have exactly the same issue, but it happened to me after creating new conda environment with python=3...
@EllenZhangYarong I have exactly the same issue, but it happened to me after creating new conda environment with python=3...
What's your system? If windows, install c++ builder tools, not visual studio or visaul c++. If mac, it is working with python=3.
I have encountered the same issue with a conda environment on MacOs Mojave version 10.14.6 with:
gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
What eventually solved the problem for me was changing the gcc version to a more recent one using:
export CC=/usr/local/Cellar/gcc/9.2.0/bin/gcc-9
export CFLAGS="-Wa,-q"
and then running:
pip install zstd
Having this issue with macOS Catalina 10.15.1. I have tried all previous solutions but doesn't work. Any suggestions?
Having the same issue with macOs Mojave 10.14.5 gcc version - 4.8.5 conda 4.7.12 Python 3.6.9 pip 19.3.1
@judytraj007 There are problems when installing using conda
. virtualenv
could work
I have encountered the same issue with a conda environment on MacOs Mojave version 10.14.6 with:
gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
What eventually solved the problem for me was changing the gcc version to a more recent one using:
export CC=/usr/local/Cellar/gcc/9.2.0/bin/gcc-9
export CFLAGS="-Wa,-q"
and then running:
pip install zstd
Thanks! this solved my problem
Hi. I try to install via pip and get the following error: Visual C++ also installed. Setuptools version: 40.5.0 How should I resolve this issue?