| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0007095 | CMake | CMake | public | 2008-05-25 16:14 | 2008-05-27 16:52 | ||||
| Reporter | Peter Johnson | ||||||||
| Assigned To | |||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | CMake-2-6 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0007095: Win32 cmake fails to find some x64 executables | ||||||||
| Description | On Windows x64, the 32-bit executable of cmake fails to find some 64-bit programs such as 64-bit Python. This is probably due to the fact that by default registry lookups by 32-bit executables are redirected to a special 32-bit subtree (Wow6432Node) that does not contain the 64-bit Python registry key. Either cmake should search both the 64-bit tree and the 32-bit subtree or a 64-bit version of cmake should be provided for Windows. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | ||||||
|
||||||
| Relationships |
| Notes | |
|
(0012122) Brad King (manager) 2008-05-27 13:27 |
I just came across the same bug (for the same reason...64-bit python on windows). Your analysis of the registry node was my thought also. I think the correct fix is for CMake to search the 32-bit registry node or the 64-bit registry node depending on the *target* platform for which the project will be built. Whether CMake itself was built 32-bit or 64-bit does not matter. |
|
(0012123) Brad King (manager) 2008-05-27 13:39 |
For reference, MS documents details of the registry rewriting here: http://support.microsoft.com/kb/896459 [^] |
|
(0012124) Brad King (manager) 2008-05-27 13:45 |
Furthermore, 32-bit and 64-bit apps can explicitly request the other view: http://msdn.microsoft.com/en-us/library/aa384129(VS.85).aspx [^] |
|
(0012125) Brad King (manager) 2008-05-27 14:47 |
I've updated the internal API we use to access the registry to support selection of 32-bit and 64-bit views: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v <-- Source/cmSystemTools.cxx new revision: 1.379; previous revision: 1.378 /cvsroot/CMake/CMake/Source/cmSystemTools.h,v <-- Source/cmSystemTools.h new revision: 1.154; previous revision: 1.153 /cvsroot/CMake/CMake/Source/kwsys/SystemTools.cxx,v <-- Source/kwsys/SystemTools.cxx new revision: 1.226; previous revision: 1.225 /cvsroot/CMake/CMake/Source/kwsys/SystemTools.hxx.in,v <-- Source/kwsys/SystemTools.hxx.in new revision: 1.74; previous revision: 1.73 |
|
(0012126) Brad King (manager) 2008-05-27 14:48 |
I've updated the FIND* commands to use the view of the target platform when reading registry values: /cvsroot/CMake/CMake/Source/cmFindBase.cxx,v <-- Source/cmFindBase.cxx new revision: 1.39; previous revision: 1.38 |
|
(0012127) Brad King (manager) 2008-05-27 14:49 |
I just tried this, and it works. A 32-bit or 64-bit CMake binary can now find 64-bit python when building a 64-bit project. We'll include this in the next 2.6 release. |
|
(0012129) Peter Johnson (reporter) 2008-05-27 16:26 |
Unfortunately this doesn't completely fix the issue for me. In my case, I'm using Python to generate source code (e.g. running a Python script as part of the build process with ADD_CUSTOM_COMMAND), so it shouldn't matter what the target platform is. E.g. even if I'm building a Win32 target, using the 64-bit Python is fine. Is there a reasonable way in which this can be supported? I think this falls under build vs. target platform for FIND*? |
|
(0012130) Brad King (manager) 2008-05-27 16:32 |
For finding libraries we have to use the target platform. For finding executables I guess we can support finding them for either the host or target platform. |
|
(0012131) Brad King (manager) 2008-05-27 16:52 |
Okay, now find_program() will expand registry values to both the 32-bit and the 64-bit values. The target platform is checked first just in case. Now I can find a 64-bit python.exe when building a 32-bit project. /cvsroot/CMake/CMake/Source/cmFindBase.cxx,v <-- Source/cmFindBase.cxx new revision: 1.40; previous revision: 1.39 |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2008-05-25 16:14 | Peter Johnson | New Issue | |
| 2008-05-27 13:27 | Brad King | Note Added: 0012122 | |
| 2008-05-27 13:39 | Brad King | Note Added: 0012123 | |
| 2008-05-27 13:45 | Brad King | Note Added: 0012124 | |
| 2008-05-27 14:47 | Brad King | Note Added: 0012125 | |
| 2008-05-27 14:48 | Brad King | Note Added: 0012126 | |
| 2008-05-27 14:49 | Brad King | Status | new => closed |
| 2008-05-27 14:49 | Brad King | Note Added: 0012127 | |
| 2008-05-27 14:49 | Brad King | Resolution | open => fixed |
| 2008-05-27 16:26 | Peter Johnson | Status | closed => feedback |
| 2008-05-27 16:26 | Peter Johnson | Resolution | fixed => reopened |
| 2008-05-27 16:26 | Peter Johnson | Note Added: 0012129 | |
| 2008-05-27 16:32 | Brad King | Note Added: 0012130 | |
| 2008-05-27 16:52 | Brad King | Status | feedback => closed |
| 2008-05-27 16:52 | Brad King | Note Added: 0012131 | |
| 2008-05-27 16:52 | Brad King | Resolution | reopened => fixed |
| 2008-06-06 11:54 | Brad King | Relationship added | related to 0006814 |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |