MantisBT - CMake
View Issue Details
0011955CMakeModulespublic2011-03-09 19:162016-06-10 14:31
Craig Scott 
Kitware Robot 
normalminoralways
closedmoved 
Intel PCWindows 64-bitXP
CMake 2.8.4 
 
0011955: InstallSystemRuntimeLibraries has faulty detection of Visual Studio locations, fails on 64-bit
The InstallSystemRuntimeLibraries module has faulty logic for detecting where Visual Studio lives (I'm testing with Visual Studio 9.0 using the "NMake Makefiles" generator). There are multiple problems. The first is the following near the top of the file:

  GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
  GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)

The CMAKE_MAKE_PROGRAM variable only contains the executable name without a path, in this case "nmake". This means devenv_dir gets an empty string and thus base_dir will always be nonesense. I've checked and this applies on both 32-bit and 64-bit Windows.

The second problem is that the 64-bit version of Visual Studio 9.0 doesn't define all the registry entries that the 32-bit version does. In particular, the 32-bit version defines the following registry key:

[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]

However, on 64-bit Windows, there is no InstallDir registry entry. In fact, there are *no* registry entries in that location, although the 9.0 directory does exist and it does have sub-entries. The result of this is that InstallSystemRuntimeLibraries will work on 32-bit Windows but not on 64-bit Windows because this registry key is one of the locations that it looks at when trying to work out where the MSVC runtimes live.

As a temporary workaround, if you manually add an InstallDir entry for 64-bit such that it points to the same equivalent thing as under 32-bit, then InstallSystemRuntimeLibraries does appear to work (or at least to find what it needs).
No tags attached.
related to 0011740closed Kitware Robot NMake improperly located 
Issue History
2011-03-09 19:16Craig ScottNew Issue
2011-03-09 19:31David ColeAssigned To => David Cole
2011-03-09 19:31David ColeStatusnew => assigned
2011-03-09 19:31David ColeRelationship addedrelated to 0011740
2011-03-09 19:33David ColeNote Added: 0025725
2011-08-17 12:16David ColeNote Added: 0027221
2011-08-18 03:04Craig ScottNote Added: 0027226
2012-08-13 15:40David ColeStatusassigned => backlog
2012-08-13 15:40David ColeNote Added: 0030622
2012-11-21 14:55David ColeNote Added: 0031649
2012-11-21 14:55David ColeAssigned ToDavid Cole =>
2016-06-10 14:28Kitware RobotNote Added: 0041816
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0025725)
David Cole   
2011-03-09 19:33   
See also this git commit, pushed to 'next' earlier today:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=971a735ba2b4d9e4ac846722fdf280dbd0feb0d4 [^]

And this email thread on the CMake list:

  http://www.cmake.org/pipermail/cmake/2011-March/043343.html [^]
(0027221)
David Cole   
2011-08-17 12:16   
Is this issue fixed as of CMake 2.8.5 or is there more that needs to be done here?

For me, it works with VS9 and VS10 on my 64-bit Windows machine, using 32-bit CMake 2.8.5. I can build installers for 32-bit and 64-bit programs just fine.

Were you using the "NMake Makefiles" generator only, or were you also having problems with the VS generators...?

If this is still an issue, then let me know how to reproduce the problem with CMake 2.8.5 or with CMake 'next'.

Otherwise, I'll resolve it as fixed in 2.8.5 if you're ok with that...
(0027226)
Craig Scott   
2011-08-18 03:04   
It's a bit hard for me to check 2.8.5 now - I can't easily reproduce the original set of conditions (I've switched to Mac as my main machine since making the original report). If you've managed to successfully build installers on a 64-bit Windows machine with VS9 and VS10, that should be sufficient confirmation that the issue has been fixed. I'm happy for you to mark the issue as resolved.

I was only using the "NMake Makefiles" generator. I don't normally use the VS generators.

Cheers.
(0030622)
David Cole   
2012-08-13 15:40   
Sending old, not-recently-updated issues to the backlog.

(The age of the bug alone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0031649)
David Cole   
2012-11-21 14:55   
Un-assigning bugs that are not on the active roadmap, which no developers are actively working on for the CMake 2.8.11 release.

If one gets put back on the roadmap, re-assign it appropriately at that time.
(0041816)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.