View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004411 | Slicer4 | Core: Building (CMake, Superbuild) | public | 2017-08-10 13:45 | 2018-03-02 11:01 |
Reporter | lassoan | Assigned To | jcfr | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | Slicer 4.7.0 | ||||
Target Version | Slicer 4.7.0 | Fixed in Version | Slicer 4.7.0 | ||
Summary | 0004411: Slicer build on Windows fails due to patch tool not not found | ||||
Description | For profiling (improve performance) Slicer has to be build in RelWithDebInfo mode. However, building of latest trunk version in RelWithDebInfo fails on Windows. It turned out that release mode build failed, too, so it is not related to build mode. Something has changed in the build system that fails now, due to patch.exe application not found. | ||||
Tags | No tags attached. | ||||
Build log: <pre> No patch step for 'python' Performing configure step for 'python' loading initial cache file C:/D/S4RD/python-prefix/tmp/python-cache-RelWithDebInfo.cmake -- The C compiler identification is MSVC 18.0.40629.0 -- The ASM compiler identification is MSVC -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done CUSTOMBUILD : -- warning : Did not find file Compiler/MSVC-ASM [C:\D\S4RD\python.vcxproj] -- Looking for CMake command configure_package_config_file -- Looking for CMake command configure_package_config_file - found -- Looking for CMake command write_basic_package_version_file -- Looking for CMake command write_basic_package_version_file - found -- Looking for CMake command target_compile_definitions -- Looking for CMake command target_compile_definitions - found -- Looking for CMake property POSITION_INDEPENDENT_CODE -- Looking for CMake property POSITION_INDEPENDENT_CODE - found -- SRC_DIR: C:/D/S4RD/Python-2.7.13 -- PY_VERSION: 2.7.13 CMake Error at cmake/PythonApplyPatches.cmake:13 (message):
Call Stack (most recent call first):
-- Configuring incomplete, errors occurred! See also "C:/D/S4RD/python-build/CMakeFiles/CMakeOutput.log". C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1. [C:\D\S4RD\python.vcxproj] Done Building Project "C:\D\S4RD\python.vcxproj" (default targets) -- FAILED. Done Building Project "C:\D\S4RD\VTKv7.vcxproj" (default targets) -- FAILED. Done Building Project "C:\D\S4RD\ITKv4.vcxproj" (default targets) -- FAILED. Done Building Project "C:\D\S4RD\CTK.vcxproj" (default targets) -- FAILED. ... </pre> |
|
Thanks for the report. Look like the issue is independent of the build type. <pre>
</pre> Are you able to build in Release ? Is the Git installed ? It should have installed patch executable. See https://git-scm.com/download/win Otherwise here is the code looking up the "patch" executable. |
|
I build using the exact same batch file, just change
to
I test it again with Release now. |
|
Very strange. I do not understand how it affects the code copied below. Could you check that "patch" executable can be found in any of the directory associated with What if you copy this code in |
|
git is here on my PC: "C:/Users/msliv/AppData/Local/Programs/Git/usr/bin" patch is not found using the code snippet you referred to |
|
Thanks for checking. This probably means that building Slicer on this same machine using one of these would fail:
That said, could you try with the following snippet: |
|
Release build has the same errors. This is a recent regression (although I'm not sure when I did a completely clean build) because the exact same script worked a couple of weeks or maybe 1-2 months ago. Is requirement of patch tool is new? Do we need to really use it (cannot we just use CMake string replacement features)? "$ENV{APPDATA}/Programs/Git/usr/bin" would probably work many times, but it would be better to find a more reliable solution than just improving the heuristics. Maybe we could deduce it from git.exe path (but that would be heuristics, too)? Or have a way of explicitly providing a patch.exe path? Or require patch.exe to be in one of the directories of PATH environment variable? |
|
Patch is indeed a new requirement. It is part of the patch management system integrated in python-cmake-buildsystem. Using replace string is simply not feasible or practical and would add a lot of overhead to get right.
Agreed. The time being I suggest we move forward with that approach. Do you confirm my last snippet worked ?
An additional hint could indeed be provided based on the location of Git executable... |
|
Now I'm trying a build after adding C:\Users\msliv\AppData\Local\Programs\Git\usr\bin to the path. So far there are no errors. Instead of just improving hints (which may never be perfect and break at any time), we could try to find patch.exe in the Slicer top-level CMakeLists.txt and report the error early and allow the user to specify patch.exe location manually. Then we could pass this on to the Python build. Similarly how we do it with other tools: Prerequisites#----------------------------------------------------------------------------- find_package(Git) |
|
Great idea. I will patch python-cmake-buildsystem adding the hint as well as adding an early check in Slicer. Look like we need a proper |
|
See https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/pull/192 |
|
Fixed integrated in r26302 |
|
Fixed in r26304 |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2017-08-10 13:45 | lassoan | New Issue | |
2017-08-10 13:45 | lassoan | Status | new => assigned |
2017-08-10 13:45 | lassoan | Assigned To | => jcfr |
2017-08-10 13:45 | lassoan | Note Added: 0015035 | |
2017-08-10 13:45 | lassoan | Note Edited: 0015035 | View Revisions |
2017-08-10 14:13 | jcfr | Note Added: 0015036 | |
2017-08-10 14:35 | lassoan | Note Added: 0015037 | |
2017-08-10 14:36 | lassoan | Note Edited: 0015037 | View Revisions |
2017-08-10 14:40 | jcfr | Note Added: 0015038 | |
2017-08-10 14:47 | lassoan | Note Added: 0015039 | |
2017-08-10 14:55 | jcfr | Note Added: 0015040 | |
2017-08-10 18:05 | lassoan | Note Added: 0015042 | |
2017-08-10 18:07 | lassoan | Summary | Windows build in RelWithDebInfo mode fails => Slicer build on Windows fails due to patch tool not not found |
2017-08-10 18:07 | lassoan | Description Updated | View Revisions |
2017-08-10 18:15 | jcfr | Note Added: 0015043 | |
2017-08-10 18:19 | lassoan | Note Added: 0015044 | |
2017-08-10 18:22 | lassoan | Note Edited: 0015044 | View Revisions |
2017-08-10 18:32 | jcfr | Note Added: 0015045 | |
2017-08-24 14:49 | jcfr | Note Added: 0015076 | |
2017-08-24 15:47 | jcfr | Note Added: 0015077 | |
2017-08-24 17:09 | jcfr | Note Added: 0015078 | |
2017-08-24 18:40 | jcfr | Status | assigned => resolved |
2017-08-24 18:40 | jcfr | Resolution | open => fixed |
2017-08-24 18:40 | jcfr | Fixed in Version | => Slicer 4.7.0 |
2017-08-24 18:40 | jcfr | Note Added: 0015079 | |
2018-03-02 11:01 | jcfr | Status | resolved => closed |