[ITK-users] Install problem on Windows 7

Andras Lasso lasso at queensu.ca
Fri Dec 15 23:50:14 EST 2017


Normally on Windows you don't install into your Program Files folder using Visual Studio. Instead, you create an NSIS installation package, which you can install/uninstall as usual.

CMake's default C:\Program Files\ folder for install prefix is probably just blind copying from unix-type operating system. It is not necessary (and not a good idea in general) to run Visual Studio as administrator, just set CMAKE_INSTALL_PREFIX to a folder where your user has write access without elevation.

Andras

From: Community [mailto:community-bounces at itk.org] On Behalf Of Gib Bogle
Sent: Friday, December 15, 2017 9:39 PM
To: Dženan Zukić <dzenanz at gmail.com>; Insight-users <insight-users at itk.org>
Subject: Re: [ITK] [ITK-users] Install problem on Windows 7


I agree, good to put this on the mailing list.



I don't know how to stop Win7 from asking me to confirm that I want to use my administrator access rights.  Normally it's just mildly irritating, but in this case it created a more serious problem.

________________________________
From: Dženan Zukić <dzenanz at gmail.com<mailto:dzenanz at gmail.com>>
Sent: Saturday, 16 December 2017 3:33 p.m.
To: Gib Bogle; Insight-users
Subject: Re: [ITK-users] Install problem on Windows 7

I usually disable the security prompts, they are too annoying. That might not matter on Win10 (I am running Win7).

I am CC'ing the mailing list, so if someone comes across this again they can see what the solutions was.

I have seen you shared xaas.tif. I will look into that next time I go to the office.

Regards,
Dženan

On Fri, Dec 15, 2017 at 9:25 PM, Gib Bogle <g.bogle at auckland.ac.nz<mailto:g.bogle at auckland.ac.nz>> wrote:

I just realised that I was mistaken in thinking that VS was truncating the install directory name.  It's just that the long filename was split over two lines.  Duh! Now it seems that in fact it is a permissions issue, as you suggested.  Although I have administrator rights, when I do things in some C: directories I am asked if I want to continue - to verify that I am using my administrator permission.  It seems that at some stage the VS install wants to set permissions on

ITKConfig.cmake, for some reason.



I have now opened VS2010 by "Run as administrator", and successfully completed the install.



Thanks for your help.  By the way, did you see that I've put xaas.rar (compressed form of xaas.tif) on the Kitware data site?  For some peculiar reason some of my posts on the Discourse site are being hidden, apparently being flagged by several members as spam.  I have no idea what is causiing that.


Cheers
Gib
________________________________
From: Dženan Zukić <dzenanz at gmail.com<mailto:dzenanz at gmail.com>>
Sent: Saturday, 16 December 2017 2:18 p.m.
To: Gib Bogle; Insight-users
Subject: Re: [ITK-users] Install problem on Windows 7

Hi Gib,

are you running Visual Studio (or whatever is your make tool, e.g. ninja) as administrator? I suppose writing in Program Files requires administrative privileges. The Linux equivalent is make install does not work, so you need to do sudo make install.

Regards,
Dženan

On Fri, Dec 15, 2017 at 8:08 PM, Gib Bogle <g.bogle at auckland.ac.nz<mailto:g.bogle at auckland.ac.nz>> wrote:

Hi Dzenan,



I just updated cmake to 3.10, and went though the build procedure again.  This is CMAKE_INSTALL_PREFIX:

C:/Program Files/ITK4.12.2

and this is the install error message:

143>  -- Install configuration: "Release"
143>  -- Up-to-date: C:/Program Files/ITK4.12.2/lib/cmake/ITK-4.12/ITKConfig.cmake
143>  CMake Error at cmake_install.cmake:36 (file):
143>    file INSTALL cannot set permissions on "C:/Program
143>    Files/ITK4.12.2/lib/cmake/ITK-4.12/ITKConfig.cmake"



(C:/Program Files/itk4.12.2 already exists)  I've never had problems with cmake before.  This is bizarre.



What version of VS are you using?



Cheers

Gib

________________________________
From: Dženan Zukić <dzenanz at gmail.com<mailto:dzenanz at gmail.com>>
Sent: Saturday, 16 December 2017 12:52 p.m.
To: Gib Bogle
Cc: insight-users
Subject: Re: [ITK-users] Install problem on Windows 7

Hi Gib,

as installing into C:/Program Files/ITK prefix works for me, it must be the CMake version. Fortunately, updating CMake is easy.

Regards,
Dženan

On Fri, Dec 15, 2017 at 5:15 PM, Gib Bogle <g.bogle at auckland.ac.nz<mailto:g.bogle at auckland.ac.nz>> wrote:

I spoke too soon.  I saw the install proceeding successfully, and leapt to the conclusion that it was putting the files in the right place (I'd got the mistaken idea that C:/Program Files/ITK4.12.2 was the default install directory, by misinterpreting cmake_install.cmake).  So the directories - bin, include, lib, share - were all created under D:/.  No big deal to copy them to C:/Program Files/ITK4.12.2, but this is clearly an issue.  Has anybody else encountered this?

________________________________
From: Insight-users <insight-users-bounces at itk.org<mailto:insight-users-bounces at itk.org>> on behalf of Gib Bogle <g.bogle at auckland.ac.nz<mailto:g.bogle at auckland.ac.nz>>
Sent: Saturday, 16 December 2017 10:49 a.m.
To: insight-users
Subject: [FORGED] Re: [ITK-users] Install problem on Windows 7


If I leave the CMAKE_INSTALL_PREFIX blank, it installs correctly (in the same place I specified).  It must be a cmake bug - no problem once you know how to avoid it.

________________________________
From: Insight-users <insight-users-bounces at itk.org<mailto:insight-users-bounces at itk.org>> on behalf of Gib Bogle <g.bogle at auckland.ac.nz<mailto:g.bogle at auckland.ac.nz>>
Sent: Saturday, 16 December 2017 10:14 a.m.
To: insight-users
Subject: [FORGED] [ITK-users] Install problem on Windows 7


I've been using ITK4.8.0, which I built two years ago, so I decided to build 4.12.2, in case something has been fixed since then.



Following exactly the same procedure with cmake-gui as before, and setting CMAKE_INSTALL_PREFIX as

C:/Program Files/ITK4.12.2

everything goes fine (building with VS2010 Win64) until the actual install step of copying the files to the install directory.  The error message is:



135>  -- Install configuration: "Release"
135>  CMake Error at cmake_install.cmake:31 (file):
135>    file cannot create directory: C:/Program
135>    Files/ITK4.12.2/lib/cmake/ITK-4.12.  Maybe need administrative privileges.



Clearly the CMAKE_INSTALL_PREFIX is not being treated correctly, and the space is terminating the directory name.  I tried putting quotes around it, but that produced a similar but even more strange result - cmake had inserted a ';', making the directory C:/Program;Files/ITK4.12.2

Is this an issue with the cmake version?  I am using cmake 3.0.2.



I considered copying all the files by hand, but I'm not sure if that's really feasible.

The ITK community is transitioning from this mailing list to discourse.itk.org<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdiscourse.itk.org&data=02%7C01%7Classo%40queensu.ca%7Cdf25a6d1aa304542005608d5442e4021%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636489887797261654&sdata=4%2F2cKqalYJ4aoIEzSrppvmCLmRd9ThKoJDZsyNgZMk0%3D&reserved=0>. Please join us there!
________________________________
Powered by www.kitware.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Cdf25a6d1aa304542005608d5442e4021%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636489887797261654&sdata=nN583u3yChKXSLsNmLT4HofU766Z%2BH0S15px1ifZ5%2BQ%3D&reserved=0>

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Cdf25a6d1aa304542005608d5442e4021%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636489887797261654&sdata=69GMM3ig5hCDHQ86L8TyTwdz%2FT2d0Gy1JS7nWUWNPzg%3D&reserved=0>

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fproducts%2Fprotraining.php&data=02%7C01%7Classo%40queensu.ca%7Cdf25a6d1aa304542005608d5442e4021%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636489887797261654&sdata=jh%2FLoxGpnNjH0mhzYYpzKfBs859RAx%2BSh8DmUE9WTDc%3D&reserved=0>

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.itk.org%2FWiki%2FITK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Cdf25a6d1aa304542005608d5442e4021%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636489887797261654&sdata=aM8%2BUfkPJERHRZzWG5zS%2FGDHelzZrVws9v3tpjuuU3I%3D&reserved=0>

Follow this link to subscribe/unsubscribe:
https://itk.org/mailman/listinfo/insight-users<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fitk.org%2Fmailman%2Flistinfo%2Finsight-users&data=02%7C01%7Classo%40queensu.ca%7Cdf25a6d1aa304542005608d5442e4021%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636489887797261654&sdata=y1i8L0zXYPAioAu%2Fc7lIxkzF5mJbuXncl8b82KxMvjs%3D&reserved=0>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://itk.org/pipermail/insight-users/attachments/20171216/64fb8932/attachment.html>


More information about the Insight-users mailing list