| Summary: | 'C:\Program' not recognized as internal or external command in compilation of zlib. | ||
|---|---|---|---|
| Product: | [Unmaintained] kde-windows | Reporter: | R030t1 |
| Component: | buildsystem | Assignee: | KDE-Windows <windows-bugs-null> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | critical | CC: | vonreth |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | log-C_KDE.txt | ||
|
Description
R030t1
2017-05-02 02:42:50 UTC
Error: 2017-05-01 19:35:51,534 INFO FAILED: zlib1rc.obj 2017-05-01 19:35:51,534 INFO cmd.exe /C "cd /D R:\build\win32libs\zlib\work\msvc2015-RelWithDebInfo-1.2.8 && "C:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64\bin\windres.exe" -D GCC_WINDRES -I R:/build/win32libs/zlib/work/zlib-1.2.8 -I R:/build/win32libs/zlib/work/msvc2015-RelWithDebInfo-1.2.8 -o R:/build/win32libs/zlib/work/msvc2015-RelWithDebInfo-1.2.8/zlib1rc.obj -i R:/build/win32libs/zlib/work/zlib-1.2.8/win32/zlib1.rc" 2017-05-01 19:35:51,534 INFO 'C:\Program' is not recognized as an internal or external command, 2017-05-01 19:35:51,534 INFO 2017-05-01 19:35:51,534 INFO operable program or batch file. 2017-05-01 19:35:51,534 INFO 2017-05-01 19:35:51,534 INFO C:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64\bin\windres.exe: preprocessing failed. 2017-05-01 19:35:51,534 INFO Upstream issue in zlib: From the root CMakeLists.txt:
```
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
COMMAND ${CMAKE_RC_COMPILER}
-D GCC_WINDRES
-I ${CMAKE_CURRENT_SOURCE_DIR}
-I ${CMAKE_CURRENT_BINARY_DIR}
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
```
=> MinGW Makefiles code generated by CMake does not properly escape the path containing spaces for CMAKE_RC_COMPILER, thus fails the compilation.
Fix: Don't install MinGW in a path containing spaces. It's as easy as that. The MinGW project itself recommends against it, see e.g.:
http://stackoverflow.com/questions/5999507/mingw-make-cant-handle-spaces-in-path
Per the submission comment I was trying to use MSVCC - any idea why MinGW was pulled in? Any idea why MinGW compiles the exact same package successfully when installed in that location if MinGW is set explicitly? I am confused because the installer defaults to "C:\Program Files" and because many Unix programs support spaces in file names (note the linked article is a decade old). Also, I told the setup script to use the Microsoft C compiler. Please remove mingw-w64 6.3 from your path. We only support the mings version installed by craft. |