kivy: MSVC Install / compile fails on x64 with venv
Versions
- Python: 3.5 x64
- OS: Windows 7 x64
- Kivy: stable 1.9.1; also, master dev branch
- Kivy installation method: MSVC compile instructions here
Description
Attempting to compile/install Kivy fails with linking errors to glew dependencies (stable 1.9.1), or from missing gst/gst.h
(1.9.2dev0 master branch). I followed the install docs exactly with one minor difference:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
(note the x64 argument; otherwise it fails after trying to build for the wrong architecture target).
At first I thought this might have been related to #4216, but on further investigation it seems unrelated. Modifying path as discussed in docs within #4694 has no effect.
Code and Logs
Building with stable results in the following error:
Creating library build\temp.win-amd64-3.5\Release\Users\BADGER~1\AppData\
Local\Temp\pip-build-kpsgjh0k\kivy\kivy\graphics\svg.cp35-win_amd64.lib and obje
ct build\temp.win-amd64-3.5\Release\Users\BADGER~1\AppData\Local\Temp\pip-build-
kpsgjh0k\kivy\kivy\graphics\svg.cp35-win_amd64.exp
svg.obj : error LNK2001: unresolved external symbol __glewIsRenderbuffer
svg.obj : error LNK2001: unresolved external symbol __glewIsFramebuffer
svg.obj : error LNK2001: unresolved external symbol __glewGetRenderbufferPar
ameteriv
svg.obj : error LNK2001: unresolved external symbol __glewFramebufferTexture
2D
svg.obj : error LNK2001: unresolved external symbol __glewFramebufferTexture
3D
svg.obj : error LNK2001: unresolved external symbol __glewRenderbufferStorag
e
svg.obj : error LNK2001: unresolved external symbol __glewCheckFramebufferSt
atus
svg.obj : error LNK2001: unresolved external symbol __glewDeleteRenderbuffer
s
svg.obj : error LNK2001: unresolved external symbol __glewDeleteFramebuffers
svg.obj : error LNK2001: unresolved external symbol __glewFramebufferRenderb
uffer
svg.obj : error LNK2001: unresolved external symbol __glewGenFramebuffers
svg.obj : error LNK2001: unresolved external symbol __glewFramebufferTexture
1D
svg.obj : error LNK2001: unresolved external symbol __glewBindRenderbuffer
svg.obj : error LNK2001: unresolved external symbol __glewBindFramebuffer
svg.obj : error LNK2001: unresolved external symbol __glewGenRenderbuffers
svg.obj : error LNK2001: unresolved external symbol __glewGenerateMipmap
svg.obj : error LNK2001: unresolved external symbol __glewGetFramebufferAtta
chmentParameteriv
build\lib.win-amd64-3.5\kivy\graphics\svg.cp35-win_amd64.pyd : fatal error L
NK1120: 17 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\
BIN\\amd64\\link.exe' failed with exit status 1120
----------------------------------------
Command "c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\
\Users\\BADGER~1\\AppData\\Local\\Temp\\pip-build-kpsgjh0k\\kivy\\setup.py';f=ge
tattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.cl
ose();exec(compile(code, __file__, 'exec'))" install --record C:\Users\BADGER~1\
AppData\Local\Temp\pip-zst4naho-record\install-record.txt --single-version-exter
nally-managed --compile" failed with error code 1 in C:\Users\BADGER~1\AppData\L
ocal\Temp\pip-build-kpsgjh0k\kivy\
Building from master fails with a slightly different error:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /
nologo /Ox /W3 /GL /DNDEBUG /MT -IC:\Users\BADGER~1\AppData\Local\Temp\pip-5ylmr
7lr-build\kivy\include -Ic:\python35\include -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:\Prog
ram Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (
x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows K
its\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um"
"-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" /TcC:\Users\BADGER~1
\AppData\Local\Temp\pip-5ylmr7lr-build\kivy\lib/gstplayer\_gstplayer.c /Fobuild\
temp.win-amd64-3.5\Release\Users\BADGER~1\AppData\Local\Temp\pip-5ylmr7lr-build\
kivy\lib/gstplayer\_gstplayer.obj
_gstplayer.c
C:\Users\BADGER~1\AppData\Local\Temp\pip-5ylmr7lr-build\kivy\lib/gstplayer\_
gstplayer.c(239): fatal error C1083: Cannot open include file: 'gst/gst.h': No s
uch file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\
BIN\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\
\Users\\BADGER~1\\AppData\\Local\\Temp\\pip-5ylmr7lr-build\\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\BADGER~1\AppDat
a\Local\Temp\pip-cubjyk9o-record\install-record.txt --single-version-externally-
managed --compile" failed with error code 1 in C:\Users\BADGER~1\AppData\Local\T
emp\pip-5ylmr7lr-build\
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (9 by maintainers)
Commits related to this issue
- Fix SDL2 header discovery to work with Windows venv (#4941) — committed to Badg/kivy by Badg 7 years ago
- Update install docs for MSVC, esp. re: venv (#4941) — committed to Badg/kivy by Badg 7 years ago
1.9.1 most likely can’t compile with msvc this way because of some changes and although there’s this collection, you’d probably need to compile the dependencies yourself too to achieve this. I haven’t compiled stable for a long time.
About
gst/gst.h
→set USE_GSTREAMER=0
or download the additional headers
pip install kivy.deps.gstreamer_dev
I tested a minute ago with fresh python (on Win8 though), so if something breaks again this way, it’s most likely some garbage in the interpreter or missing files. Be sure to overwrite the deps (maybe pip didn’t download correctly or there was “permission denied” lovely stuff from pip or something) with
pip install -I --no-cache-dir ...
I’ll change the instructions regarding this stuff (arch, missing deps, etc). ^^ ref https://github.com/kivy/kivy/commit/71bd76b2d1eaf93d251f9bc9b2a5fe04306327e1