View Issue Details

IDProjectCategoryView StatusLast Update
0004311Slicer4Core: Building (CMake, Superbuild)public2017-06-10 08:51
Reporterpieper Assigned Tojcfr  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformmacOSosxOS Version10.12.1
Product VersionSlicer 4.7.0 
Target VersionSlicer 4.7.0Fixed in VersionSlicer 4.7.0 
Summary0004311: git and svn not found building extensions
Description

When trying to build the ExtensionIndex git is found as /usr/local/bin/git, but GIT_EXECUTABLE is empty in CMakeCache.txt leading to the error message below:

-- Configuring extension: AnglePlanesExtension
-- Found Git: /usr/local/bin/git (found version "2.2.0")
-- Could NOT find Git (missing: GIT_EXECUTABLE) (found version "2.2.0")
error: could not find git for fetch of AnglePlanesExtension
CMake Error at /usr/local/share/cmake-3.7/Modules/ExternalProject.cmake:2092 (_ep_write_gitupdate_script):
_ep_write_gitupdate_script Function invoked with incorrect arguments for
function named: _ep_write_gitupdate_script
Call Stack (most recent call first):
/usr/local/share/cmake-3.7/Modules/ExternalProject.cmake:2526 (_ep_add_update_command)
SlicerBlockBuildPackageAndUploadExtensions.cmake:260 (ExternalProject_Add)
CMakeLists.txt:96 (include)

Steps To Reproduce

Follow the build instructions here:

https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_ExtensionsIndex

Tested with Slicer as of r25585 and the ExtensionIndex e971cb431eabfb5cba3e67050cb3b74c67dea054 (12/3/2016).

This error was confirmed with CMake 3.7.1 (latest release as of this date) after first seeing the issue with a 3.4 version of cmake.

Additional Information

Adding these two lines to the cmake command line works around the issue:

-DGIT_EXECUTABLE:FILEPATH=/usr/local/bin/git \
-DSubversion_SVN_EXECUTABLE:FILEPATH=/usr/bin/svn \

This may (?) have to do with the fact that the mac file system is case-sensitive.

TagsNo tags attached.

Activities

pieper

pieper

2016-12-05 09:24

administrator   ~0014263

This is the full command that worked for me.

cmake \
-DSlicer_DIR:PATH=/Users/pieper/slicer4/latest/Slicer-superbuild/Slicer-build \
-DSlicer_EXTENSION_DESCRIPTION_DIR:PATH=../ExtensionsIndex \
-DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \
-DGIT_EXECUTABLE:FILEPATH=/usr/local/bin/git \
-DSubversion_SVN_EXECUTABLE:FILEPATH=/usr/bin/svn \
/Users/pieper/slicer4/latest/Slicer/Extensions/CMake

Also I added a note to the wiki page pointing to this issue.

inorton

inorton

2017-03-08 13:30

developer   ~0014363

This is caused by some kind of CACHE vs mark_as_advanced nonsense. I added some debugging statements in FindGit.cmake:

https://gist.github.com/ihnorton/f6da296d8e5c83f24c5fc273693826c8

First time through, everything is fine, but the next time FindGit is called, find_program sets the existing GIT_EXECUTABLE variable to blank.

inorton

inorton

2017-03-08 13:32

developer   ~0014364

Last edited: 2017-03-09 12:43

View 2 revisions

Hmm, looks like: https://gitlab.kitware.com/cmake/cmake/issues/15448

Related:
http://public.kitware.com/pipermail/cmake/2010-March/035542.html
and:
https://gitlab.kitware.com/cmake/cmake/issues/10967
and
https://cmake.org/Bug/print_bug_page.php?bug_id=10967

jcfr

jcfr

2017-03-10 19:20

administrator   ~0014369

Fixed by http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=25781

pieper

pieper

2017-03-11 14:09

administrator   ~0014372

LGTM!

Related Changesets

Import 2017-06-07 23:51:09: master e301db00

2017-03-10 19:00:40

jcfr

Details Diff
COMP: Fix CMake extension build issue. See 0004311

This commit reverts r25552 (BUG: ExtensionBuildSystem: Ensure GIT_EXECUTABLE
set in SliceConfig is used) and implements a more robust workaround
for CMake issue #15448 [1] and fix Slicer issue 0004311

[1] https://gitlab.kitware.com/cmake/cmake/issues/15448
[2] https://www.na-mic.org/Bug/view.php?id=4311

Reviewed-by: Steve Pieper <pieper@bwh.harvard.edu>
Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

From: Isaiah Norton <inorton@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25781 3bd1e089-480b-0410-8dfb-8563597acbee
mod - CMake/FindGit.cmake Diff File
mod - Extensions/CMake/CMakeLists.txt Diff File

Issue History

Date Modified Username Field Change
2016-12-03 17:17 pieper New Issue
2016-12-03 17:17 pieper Status new => assigned
2016-12-03 17:17 pieper Assigned To => jcfr
2016-12-05 09:24 pieper Note Added: 0014263
2017-03-08 13:30 inorton Note Added: 0014363
2017-03-08 13:32 inorton Note Added: 0014364
2017-03-09 12:43 inorton Note Edited: 0014364 View Revisions
2017-03-10 19:20 jcfr Note Added: 0014369
2017-03-10 19:20 jcfr Status assigned => resolved
2017-03-10 19:20 jcfr Fixed in Version => Slicer 4.7.0
2017-03-10 19:20 jcfr Resolution open => fixed
2017-03-11 14:09 pieper Note Added: 0014372
2017-03-11 14:09 pieper Status resolved => closed
2017-06-10 08:51 jcfr Changeset attached => Slicer master e301db00