[Insight-users] Errors while cross-compiling with mingw in Linux

Yulia.Arzhaeva at csiro.au Yulia.Arzhaeva at csiro.au
Tue Aug 11 19:57:46 EDT 2009


 Hi,

I have solved it myself by reading what's on cross-compiling on Cmake wiki and introducing some changes to CMakeLists.txt in Utilities/kwsys directory.

Cheers,
Yulia

-----Original Message-----
From: insight-users-bounces at itk.org [mailto:insight-users-bounces at itk.org] On Behalf Of Yulia.Arzhaeva at csiro.au
Sent: Monday, 10 August 2009 6:15 PM
To: insight-users at itk.org
Subject: [ExternalEmail] [Insight-users] Errors while cross-compiling with mingw in Linux

Hi,

I've been trying to cross-compile ITK for Windows using Mingw. The host platform is Linux Suse.
Generating build files using cmake and a toolchain file went okay, with the exception of TRY_RUN errors, which is understandable.
However, when I started compilation of ITK, I ran into a problem that seems unresolvable to me.
ITK compilation seems to include compiling and then running several executables, such as itksysEncodeExecutable, itksysProcessFwd9x.exe.
Since I am cross-compiling for another platform, these executable cannot be run on the host platform. These is the compilation error I've got:

Scanning dependencies of target itksysEncodeExecutable
[  0%] Building C object Utilities/kwsys/CMakeFiles/itksysEncodeExecutable.dir/EncodeExecutable.obj
Linking C executable ../../bin/itksysEncodeExecutable.exe
[  0%] Built target itksysEncodeExecutable
Scanning dependencies of target itksysProcessFwd9x
[  0%] Building C object Utilities/kwsys/CMakeFiles/itksysProcessFwd9x.dir/ProcessFwd9x.obj
Linking C executable ../../bin/itksysProcessFwd9x.exe
[  0%] Built target itksysProcessFwd9x
[  1%] Generating itksysProcessFwd9xEnc.c
/bin/sh: ../../bin/itksysEncodeExecutable.exe: cannot execute binary file
make[2]: *** [Utilities/kwsys/itksysProcessFwd9xEnc.c] Error 126
make[1]: *** [Utilities/kwsys/CMakeFiles/itksys.dir/all] Error 2
make: *** [all] Error 2

Maybe, there is a solution to it? Maybe, I need to exclude those files from the compilation process, compile them separately beforehand with gcc?
Any adice will be appreciated. 

Yulia Arzhaeva
CSIRO Mathematical and Information Sciences
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list