[Insight-users] Error compiling ITK 4.4.1 using MinGW on WinXP

Dan Mueller dan.muel at gmail.com
Tue Aug 6 02:38:25 EDT 2013


Hi Matt,

I was just googling and found the Insight Developer from Nov 2012
discussing this issue.

I am trying the patch now!

Thanks for your help.

Cheers, Dan

On 6 August 2013 16:06, Matt McCormick <matt.mccormick at kitware.com> wrote:
> Hi Dan,
>
> This is a known bug that comes with the version of the version of GCC
> that is shipped with MinGW.  There is a Windows and a GCC float.h, and
> GCC does not have the requisite #include_next directive.
>
> A workaround is this patch:
>
>   http://review.source.kitware.com/#/c/11391/1
>
> That needs some testing and maybe some modifications.  Could you
> please give it a try?
>
> Thanks,
> Matt
>
> On Tue, Aug 6, 2013 at 2:24 AM, Dan Mueller <dan.muel at gmail.com> wrote:
>> Hi all,
>>
>> I am having trouble compiling ITK 4.41 using MinGW on Windows XP.
>>
>> Here is the error I encountered:
>> [ 42%] Building CXX object
>> Modules/Core/Common/src/CMakeFiles/ITKCommon.dir/itkObjectFactoryBase.cxx.obj
>> [ 42%] Building CXX object
>> Modules/Core/Common/src/CMakeFiles/ITKCommon.dir/itkFloatingPointExceptions.cxx.obj
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:
>> In static member function 'static void
>> itk::FloatingPointExceptions::Enable()':
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:432:14:
>> error: '_EM_DENORMAL' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:432:29:
>> error: '_EM_UNDERFLOW' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:432:45:
>> error: '_EM_INEXACT' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:432:58:
>> error: '_MCW_EM' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:432:65:
>> error: '_controlfp' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:
>> In static member function 'static void
>> itk::FloatingPointExceptions::Disable()':
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:440:14:
>> error: '_EM_INVALID' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:440:28:
>> error: '_EM_DENORMAL' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:440:43:
>> error: '_EM_ZERODIVIDE' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:440:60:
>> error: '_EM_OVERFLOW' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:441:14:
>> error: '_EM_UNDERFLOW' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:441:30:
>> error: '_EM_INEXACT' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:441:43:
>> error: '_MCW_EM' was not declared in this scope
>> C:\ITK\InsightToolkit-4.4.1\Modules\Core\Common\src\itkFloatingPointExceptions.cxx:441:50:
>> error: '_controlfp' was not declared in this scope
>> mingw32-make.exe[2]: ***
>> [Modules/Core/Common/src/CMakeFiles/ITKCommon.dir/itkFloatingPointExceptions.cxx.obj]
>> Error 1
>> mingw32-make.exe[1]: ***
>> [Modules/Core/Common/src/CMakeFiles/ITKCommon.dir/all] Error 2
>> mingw32-make.exe: *** [all] Error 2
>>
>> Here are the steps I followed:
>> 1. Installed MinGW with MSYS, gcc 4.6.2 (MinGW/bin is in path)
>> 2. Installed CMake 2.8.11.1
>> 3. Downloaded and extracted ITK 4.4.1 zip file
>> 4. Opened CMake GUI, set source and build directories
>> 5. Configure
>> 6. Selected "MinGW Makefiles" generator
>> 7. Set BUILD_EXAMPLES=OFF, BUILD_TESTING=OFF, CMAKE_BUILD_TYPE=Release
>> 8. Configure
>> 9. Generate
>> 10. Opened normal Windows command prompt (not MSYS)
>> 11. Changed directory to Build directory
>> 12. Ran the command: mingw32-make.exe
>> 13. Compilation proceeded well until 42%, then error above
>> CMakeCache.txt is available here (144KB):
>> https://dl.dropboxusercontent.com/u/20309490/CMakeCache.txt
>>
>> I would have expected the above procedure to work. However I note the
>> Wiki (http://www.itk.org/Wiki/ITK/Configuring_and_Building/MinGW) says
>> "specify MSYS Makefiles (NOT MinGW Makefiles) as the generator". Could
>> this be the reason? Why does MinGW Makefiles generator not work?
>>
>> Any help appreciated!
>>
>> Cheers, Dan
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> 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