DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Fri, 2018-01-19, 20:38

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed, 2017-03-15, 22:55 
Offline

Joined: Mon, 2015-11-23, 16:05
Posts: 16
Hi,

I have encountered a problem running CMake 3.7.0 on dcmtk-3.6.1_20170228 snapshot. I am trying to build 64-bit versions or the DCMTK apps with Visual Studio 2015 Community edition on OS: Windows 10 32-bit. The problem is that I am getting this error in CMake Configure:

CMake Error at CMake/GenerateDCMTKConfigure.cmake:895 (MESSAGE):
Call Stack (most recent call first):
CMakeLists.txt:44 (INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES)

Is there anything I can do to make this go away? Thanks.

- Christos


Top
 Profile  
 
PostPosted: Thu, 2017-03-16, 10:20 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Mon, 2014-03-03, 09:51
Posts: 228
Location: Oldenburg, Germany
It took me a minute to understand what you are doing, so let me first confirm my current assumptions:
- You are indeed cross-compiling, but not between entirely different systems (Linux -> Windows) but instead (Windows 32bit -> Windows 64bit)
- Did you use a CMake Toolchain file, or specify the compilers manually, that is: does CMake know you are cross-compiling?

Regarding the actual problem: there are two configuration tests that require running an executable to detect some runtime specific behavior:
- C_CHAR_UNSIGNED
- INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES

I presume that CMake cannot run those executables because they are 64 bit and cannot be launched on your 32 bit OS. Normally (if I remember my implementation correctly) CMake should warn about that instead of the cryptic warning you got, but that is (I presume) because you did not tell CMake that it is cross-compiling.

Possible workaround: run those configure tests on a 64 bit Windows host and copy the file "config/include/dcmtk/config/arith.h" into your build directory. Also, explicitly set the resulting CMake cache variable C_CHAR_UNSIGNED according to the results on the native 64 bit host.

I would think that this is not really worth the trouble and using a native 64 bit host instead would be way easier, but I (instead of what everyone else on the internet seems to do) think that you probably have a good reason not to do that, right?


Top
 Profile  
 
PostPosted: Thu, 2017-03-16, 10:44 
Offline

Joined: Mon, 2015-11-23, 16:05
Posts: 16
Jan,

Thank you for the detailed explanation.

You are correct: I am trying to cross compile between Windows 32bit -> Windows 64bit. I assumed that choosing the Win64 tools for the Generator would be a good hint for CMake in a 32-bit version of Windows.

I just needed the 64-bit versions of the communication tools so I though I could do it in 32-bit Windows. I agree the setting up a 64-bit Windows machine and build the tools there will be the easy way out.

Thanks again.


Top
 Profile  
 
PostPosted: Thu, 2017-03-16, 11:37 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Mon, 2014-03-03, 09:51
Posts: 228
Location: Oldenburg, Germany
konis wrote:
I assumed that choosing the Win64 tools for the Generator would be a good hint for CMake in a 32-bit version of Windows.

Interesting, I agree that this would seem intuitive. Can you provide the value of 'CMAKE_CROSSCOMPILING' in that case by doing
Code:
MESSAGE("CMAKE_CROSSCOMPILING=${CMAKE_CROSSCOMPILING}")
somewhere in the CMake scripts (e.g. dcmtk/CMakeLists.txt).
If it is really not defined, we could ask the CMake developers to add it in case the "Win64 tools for the Generator" was selected on a 32 bit host. If it is defined, however, I'll have to fix it in my code ;-).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group