MantisBT - CMake
View Issue Details
0014716CMakeCMakeSetuppublic2014-01-22 08:302016-05-02 08:30
iljau 
Brad King 
normalminorsometimes
closedfixed 
Windows7
CMake 2.8.12.1 
CMake 3.5CMake 3.5 
0014716: CMake installer can't modify %PATH% if it's 'loo long'.
CMake windows installer fails to add installation directory to %PATH% if contents of %PATH% environment variable are above some hardcoded limit.
1. Fill your user %PATH% environment variable with something long (in my case 466 characters).
2. Run installer.
3. Select "Add CMake to the system PATH for current user" in the installer.
4. Click "Next >"
5. After installing cmake, following window pops up:
   "Warning! PATH too long installer unable to modify PATH!"
No tags attached.
related to 0010257closed Bill Hoffman Installer erasing windows PATH 
related to 0015635closed Kitware Robot CPACK_NSIS_MODIFY_PATH has no affect on PATH variable 
png cmake-path.png (305,171) 2015-04-07 12:41
https://public.kitware.com/Bug/file/5423/cmake-path.png
Issue History
2014-01-22 08:30iljauNew Issue
2014-02-03 16:05Brad KingRelationship addedrelated to 0010257
2014-02-03 16:07Brad KingNote Added: 0035031
2015-01-22 04:51Marek RNote Added: 0037768
2015-04-07 12:41Chris GFile Added: cmake-path.png
2015-04-07 12:41Chris GNote Added: 0038466
2015-04-07 12:45Chris GNote Edited: 0038466bug_revision_view_page.php?bugnote_id=38466#r1747
2015-04-19 11:22impheadNote Added: 0038542
2015-04-20 08:41Brad KingNote Added: 0038544
2015-06-29 13:19David ColeRelationship addedrelated to 0015635
2016-01-05 15:15jaykrellNote Added: 0040143
2016-01-07 13:36Brad KingNote Added: 0040146
2016-01-07 13:36Brad KingAssigned To => Brad King
2016-01-07 13:36Brad KingStatusnew => resolved
2016-01-07 13:36Brad KingResolutionopen => fixed
2016-01-07 13:36Brad KingFixed in Version => CMake 3.5
2016-01-07 13:36Brad KingTarget Version => CMake 3.5
2016-05-02 08:30Robert MaynardNote Added: 0040993
2016-05-02 08:30Robert MaynardStatusresolved => closed

Notes
(0035031)
Brad King   
2014-02-03 16:07   
For reference, the current "PATH too long" messages comes from this change:

 Fix for bug 10257, NSIS could remove a PATH if it was too long
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0619813e [^]

meant to fix issue 0010257.
(0037768)
Marek R   
2015-01-22 04:51   
Confirming issue on Windows 7 64x with cmake-3.1.0-winn32-x86.exe installer.
My path was 1232 character long (before change).
(0038466)
Chris G   
2015-04-07 12:41   
(edited on: 2015-04-07 12:45)
This error is reproducable on my system which has the Path variable containing only ONE entry for %DEVPATH% which contains my previous path.

My path is NINE characters in length yet I still receive the path too long error whether I choose to add CMake to the local user path or the system path from the installer.

Echoing %PATH% returns all the paths references in %DEVPATH% yet the entry itself only contains the NINE characters of "%DEVPATH%". This may be the cause of the bug depending on how the installer tests for %PATH%'s length.

I have attached a screenshot to display what I mean just in case the above isn't completely clear.

Edit: My %DEVPATH% variable is 1445 characters in length.

(0038542)
imphead   
2015-04-19 11:22   
Could you escalate this please? Still happens in 3.2.2.
(0038544)
Brad King   
2015-04-20 08:41   
AFAIK the limit is in NSIS, not CMake. The behavior reported in this issue is intentional as according to the change linked in 0014716:0035031. The warning is better than silently breaking the existing PATH.
(0040143)
jaykrell   
2016-01-05 15:15   
I hit this too.

---------------------------
CMake 3.4.1 Setup
---------------------------
Warning! PATH too long installer unable to modify PATH!
---------------------------
OK
---------------------------


C:\Users\jaykrell>path
PATH=C:\Program Files (x86)\ActiveState Komodo Edit 9\;C:\Python27\;C:\Python27\
Scripts;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Cl
ient\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Fil
es (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windo
ws;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Progr
am Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Commo
n Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Sh
ared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DL
LShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;C:\Program Files (x86)\Wind
ows Live\Shared;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Fil
es (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\
Intel\Intel(R) Management Engine Components\IPT;C:\CodeWarrior\7.0\Bin;C:\CodeWa
rrior\7.0\Other Metrowerks Tools\Command Line Tools;C:\CodeWarrior\7.0\Win32-x86
 Support\Libraries\Runtime\Libs\MSL_All-DLLs;C:\Windows\system32\config\systempr
ofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft S
QL Server\120\Tools\Binn\;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\
Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\IDM Computer Solut
ions\UltraEdit;C:\Users\jaykrell\.dnx\bin;C:\cm3\bin;C:\Users\jaykrell\AppData\R
oaming\npm
(0040146)
Brad King   
2016-01-07 13:36   
This is an issue with NSIS itself.

We've switched to using the WiX generator to produce a .msi installer instead:

 Utilities/Release: Switch to .msi builder for Windows binary
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=083312a8 [^]

This avoids the issue altogether.
(0040993)
Robert Maynard   
2016-05-02 08:30   
Closing resolved issues that have not been updated in more than 4 months.