Bug 400600 - ext_zlib fails to build on Windows 10
Summary: ext_zlib fails to build on Windows 10
Status: RESOLVED NOT A BUG
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-02 19:13 UTC by Bill Messenger
Modified: 2018-11-03 01:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Messenger 2018-11-02 19:13:01 UTC
I'm following the krita/3rdparty/README.md to build Krita on Windows 10. (I've installed cmake 3.8.2, mingw-w64 7.3.0, python 3.6.2, and the Windows 10 SDK.) Everything worked until I got an error with this command:
"cmake --build . --config RelWithDebInfo --target ext_zlib"

[ 33%] Performing build step for 'ext_zlib'
[  2%] Generating zlib1rc.obj
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin\windres.exe: preprocessing failed.
mingw32-make.exe[6]: *** [CMakeFiles\zlib.dir\build.make:61: zlib1rc.obj] Error 1
mingw32-make.exe[5]: *** [CMakeFiles\Makefile2:103: CMakeFiles/zlib.dir/all] Error 2
mingw32-make.exe[4]: *** [Makefile:140: all] Error 2
mingw32-make.exe[3]: *** [ext_zlib\CMakeFiles\ext_zlib.dir\build.make:113: ext_zlib/ext_zlib-prefix/src/ext_zlib-stamp/ext_zlib-build] Error 2
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:416: ext_zlib/CMakeFiles/ext_zlib.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:428: ext_zlib/CMakeFiles/ext_zlib.dir/rule] Error 2
mingw32-make.exe: *** [Makefile:195: ext_zlib] Error 2



However, I can fix the issue by editing the file:

C:\dev\b\ext_zlib\ext_zlib-prefix\src\ext_zlib-build\CMakeFiles\zlib.dir\build.make

and changing the beginning of line 61 from

"C:\Program Files\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin\windres.exe"

to

C:\PROGRA~1\MINGW-~1\X86_64~1.0-P\mingw64\bin\windres.exe
Comment 1 Halla Rempt 2018-11-02 19:15:59 UTC
This really isn't a bug in Krita, I'm afraid. If you install mingw to a patch with spaced in it, you'll encounter more problems. I always install it to c:\mingw\64 of c:\mingw\32 depending on the arch. We probably should update the readme, though.
Comment 2 Halla Rempt 2018-11-02 19:17:35 UTC
Git commit fb95d6f0c9ea64c6eb9beef9c35c6c54637f4737 by Boudewijn Rempt.
Committed on 02/11/2018 at 19:17.
Pushed by rempt into branch 'master'.

Update docs to warn about spaces in windows paths

M  +1    -0    3rdparty/README.md

https://commits.kde.org/krita/fb95d6f0c9ea64c6eb9beef9c35c6c54637f4737
Comment 3 Bill Messenger 2018-11-03 01:25:00 UTC
That worked. Thanks!