[Insight-users] Problem cross-compiling ITK 4.2.1 for MX53

Ed Menard emenard at nvs-technologies.com
Sun Dec 9 00:53:02 EST 2012


Hi all,

I'm a newbie to ITK, and am trying to cross-compile ITK 4.2.1 for an MX53
target.

The build platform is the VM supplied by Freescale with the MX53 build
environment - Ubuntu 10.04.
It has a working cross toolchain - am able to cross-compile and run programs
on the target.
I think I followed the ITK cross-compiling instructions in these docs:
- http://www.itk.org/Wiki/ITK/Cross_Compiling
- http://cmake.org/Wiki/CMake_Cross_Compiling	

Here are the steps I performed:
- Created an empty directory (ITK-MX53-4.2.1), peer with the sources
(InsightToolkit-4.2.1)
- Created a ToolChain-MX53.cmake file (including setting CMAKE_SYSTEM_NAME
to Linux and other settings)
- Copied ToolChain-MX53.cmake to ITK-MX53-4.2.1
- From ITK-MX53-4.2.1 ran: cmake
-DCMAKE_TOOLCHAIN_FILE=./Toolchain-MX53.cmake ../InsightToolkit-4.2.1
- Copied the generated cmTryCompileExecXxx files to the target and ran them,
and then copied TryRunResults.cmake to TryRunResults-MX53.cmake and updated
with the obtained results
- From ITK-MX53-4.2.1 ran: cmake -C ./TryRunResults-MX53.cmake
../InsightToolkit-4.2.1
- Ran make

During compilation, the following error came up:
...
Scanning dependencies of target ITKIOJPEG
[ 47%] Building CXX object
Modules/IO/JPEG/src/CMakeFiles/ITKIOJPEG.dir/itkJPEGImageIOFactory.cxx.o
[ 47%] Building CXX object
Modules/IO/JPEG/src/CMakeFiles/ITKIOJPEG.dir/itkJPEGImageIO.cxx.o
/home/lucid/InsightToolkit-4.2.1/Modules/IO/JPEG/src/itkJPEGImageIO.cxx: In
function 'void itk_jpeg_error_exit(jpeg_common_struct*)':
/home/lucid/InsightToolkit-4.2.1/Modules/IO/JPEG/src/itkJPEGImageIO.cxx:37:
warning: cast from 'jpeg_error_mgr*' to 'itk_jpeg_error_mgr*' increases
required alignment of target type
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-long-double"
Linking CXX static library ../../../../lib/libITKIOJPEG-4.2.a
[ 47%] Built target ITKIOJPEG
Scanning dependencies of target itkmkg3states
[ 48%] Building C object
Modules/ThirdParty/TIFF/src/itktiff/CMakeFiles/itkmkg3states.dir/mkg3states.
c.o
Linking C executable itkmkg3states
[ 48%] Built target itkmkg3states
[ 48%] Generating tif_fax3sm.c
/bin/sh: itkmkg3states: not found
make[2]: *** [Modules/ThirdParty/TIFF/src/itktiff/tif_fax3sm.c] Error 127
make[1]: ***
[Modules/ThirdParty/TIFF/src/itktiff/CMakeFiles/itktiff.dir/all] Error 2
make: *** [all] Error 2
lucid at ubuntu:~/ITK-MX53-4.2.1$

I tried using CMAKE 2.8.0 which was supplied with the VM, but then replaced
it the CMAKE 2.8.10.2 - same results in both cases.
I also tried ITK 4.2.0, again with similar results...

Anyone else seen this problem and/or know how to fix it...?
Any help would be greatly appreciated...

Thanks in advance,
--Ed






More information about the Insight-users mailing list