problem cross compiling

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
eninyo
Posts: 9
Joined: Tue, 2019-05-07, 07:27

problem cross compiling

#1 Post by eninyo »

hello,
i'm trying to cmake dcmtk 3.6.4 on windows 10 cross compiling to linux ARM.
this is the error i get:
CMake Warning at CMake/dcmtkTryRun.cmake:78 (message):
Emulation for your target platform is not available, please fill in the
required configure test results manually.
Call Stack (most recent call first):
CMake/dcmtkTryRun.cmake:89 (DCMTK_TRY_RUN_CROSS)
CMake/GenerateDCMTKConfigure.cmake:1361 (DCMTK_TRY_RUN)
CMakeLists.txt:53 (INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES)


CMake Error at CMake/GenerateDCMTKConfigure.cmake:1379 (message):
Call Stack (most recent call first):
CMakeLists.txt:53 (INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES)


Configuring incomplete, errors occurred!
anyone knows what i can do to fix it?

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: problem cross compiling

#2 Post by Jan Schlamelcher »

You need an arith.h file for your target plaftorm that must be placed inside the build directory (config subdirectory I would think). Best case would be to compile config/tests/arith.cc by hand and run that on your target platform to generate arith.h.

eninyo
Posts: 9
Joined: Tue, 2019-05-07, 07:27

Re: problem cross compiling

#3 Post by eninyo »

hi,
thanks for your response.

i'm too new for that, so i don't understand why cmake can do this...
you say that compiling arith.cc will generate arith.h file? (just compile? no make?)
and then what? how can i tell cmake to continue with the configuration?

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: problem cross compiling

#4 Post by Jan Schlamelcher »

eninyo wrote: Tue, 2019-06-11, 15:18 you say that compiling arith.cc will generate arith.h file? (just compile? no make?)
No, I did not:
Jan Schlamelcher wrote: Tue, 2019-06-11, 14:48 compile config/tests/arith.cc by hand and run that on your target platform to generate arith.h.

jdinca
Posts: 13
Joined: Thu, 2012-10-25, 07:18

Re: problem cross compiling

#5 Post by jdinca »

Hello,

I have the same issue running Visual Studio 2019 cross-compiling for Linux. My DCMTK version is 3.6.5.

If, in the cmake settings, I turn off DCMTK_WITH_THREADS I get a different error:

config/include/dcmtk/config/arith.h:1: error: unterminated #ifndef

Are there any work-arounds for this?

jdinca
Posts: 13
Joined: Thu, 2012-10-25, 07:18

Re: problem cross compiling

#6 Post by jdinca »

Tracking this down, it looks to be related to:
https://forum.dcmtk.org/viewtopic.php?t=4539

I am also cross-compiling and have the same error:

1> [CMake] CMake Error at CMake/GenerateDCMTKConfigure.cmake:1406 (message):
1> [CMake] Inspecting fundamental arithmetic types...

MESSAGE("CMAKE_CROSSCOMPILING=${CMAKE_CROSSCOMPILING}")

returns false. My VS configuration is: Linux-GCC-Debug

Any pointers would be appreciated. This is the first time I've tried cross-compiling to a linux target system on my Windows 10 PC (Ubuntu 20.04 LTS).

Thanks,

eninyo
Posts: 9
Joined: Tue, 2019-05-07, 07:27

Re: problem cross compiling

#7 Post by eninyo »

hi,
i don't remember what i did eventually.
but i guess i went back to 3.6.4.
there is not much support as you can see.

if you manage to do something, please share.

jdinca
Posts: 13
Joined: Thu, 2012-10-25, 07:18

Re: problem cross compiling

#8 Post by jdinca »

Hi there,
I'll certainly post if I figure this out. In my case, building for linux and windows from within VS 2019 is more complicated. When you change to the linux build, it copies all files over to the linux subsytem with rsync before you actually to the build. And I can't seem to intervene.

Cross compiling via cmake is working fine, on different systems. VS 2019 cross-compiling within the same solution to different systems is still a little fragile, it'd seem. i.e., if I use cmake within the WSL (ubuntu) on my windows PC, I can compile just fine.

I'm using 3.6.5.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest