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

Pablo Rusjan pablo.rusjan at camhpet.ca
Thu Jun 17 11:31:43 EDT 2010


Hello Yulia,
I am stuck in the same step and I can not overcome it. Could you give  me more information about how you solved it, please?
Thanks
Pablo

-----------------------------------------------------------------------------------------


 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
_____________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100617/f7fc0adf/attachment-0001.htm>


More information about the Insight-users mailing list