Bug #459
closedWrong "Host type" on Windows 7 (64 bit) system with 64 bit binaries
100%
Description
The --version output of a command line tool is "Host type: x86-Windows", i.e. there is no indication on 64 bit support.
Updated by Uli Schlachter almost 13 years ago
- Priority changed from Normal to Low
ofconapp.cc: (*output) << OFendl << "Host type: " << CANONICAL_HOST_TYPE << OFendl;
So we are looking at CANONICAL_HOST_TYPE which comes from the configure machinery. CMake sets it via:
SET(CANONICAL_HOST_TYPE "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}")
CMAKE_SYSTEM_PROCESSOR is documented as:
The name of the CPU CMake is building for.
On systems that support uname, this variable is set to the output of
uname -p, on windows it is set to the value of the environment
variable PROCESSOR_ARCHITECTURE
So I guess the 64 bit binaries were built on a 32 bit system?
Looking through the list of variables CMake defines, I don't really see anything which sounds more appropriate. And apparently CMake can't tell you if you are building 64 bit binaries or not (well, the CMake mailing list suggests looking at the size of a void pointer...).
Updated by Jörg Riesmeier almost 13 years ago
No, the DCMTK binary was really build on a 64-bit Windows system with Visual Studio 2010 Professional (64-bit). The selected CMake generator was (something like): Visual Studio 2010 (Win64)
Updated by Jörg Riesmeier almost 13 years ago
- Priority changed from Low to Normal
Updated by Uli Schlachter almost 13 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
CMake says: "Works as documented" http://public.kitware.com/Bug/print_bug_page.php?bug_id=9065
MSDN says: http://msdn.microsoft.com/en-us/library/aa384274(VS.85).aspx
commit aeb0390fb70f5390b7e253e67da6c261f3228183 Author: Uli Schlachter <dicom@offis.de> Date: Tue Nov 6 10:18:28 2012 +0100 Correctly detect the processor type on 64 bit windows. [...] +# Windows being windows, it lies about its processor type to 32 bit binaries +SET(SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITEW6432}") +IF(NOT SYSTEM_PROCESSOR) + SET(SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}") +ENDIF(NOT SYSTEM_PROCESSOR) # CMake doesn't provide a configure-style system type string -SET(CANONICAL_HOST_TYPE "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}") +SET(CANONICAL_HOST_TYPE "${SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}") +UNSET(SYSTEM_PROCESSOR)