[ITK] [ITK-dev] ITK 4.8, castxml, and 32-bits Debian/gcc

Steve M. Robbins steve at sumost.ca
Sun Sep 20 23:03:20 EDT 2015


Hi,

Just began looking at a build failure for Debian 32-bits that shows up when wrapping is enabled [1].   The failure shows in the build log as:

[ 13%] Building C object Modules/ThirdParty/OpenJPEG/src/openjpeg/CMakeFiles/itkopenjpeg.dir/raw.c.o
cd /home/steve/Packages/insighttoolkit/build-area/insighttoolkit4-4.8.0/BUILD/Modules/ThirdParty/OpenJPEG/src/openjpeg && /usr/bin/cc  -Ditkopenjpeg_EXPORTS -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2   -Wno-uninitialized -Wno-unused-parameter -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-overflow  -w -fPIC -I/usr/include/gdcm-2.4 -I/home/steve/Packages/insighttoolkit/build-area/insighttoolkit4-4.8.0/BUILD/Modules/ThirdParty/OpenJPEG/src/openjpeg -I/home/steve/Packages/insighttoolkit/build-area/insighttoolkit4-4.8.0/Modules/ThirdParty/OpenJPEG/src/openjpeg    -o CMakeFiles/itkopenjpeg.dir/raw.c.o   -c /home/steve/Packages/insighttoolkit/build-area/insighttoolkit4-4.8.0/Modules/ThirdParty/OpenJPEG/src/openjpeg/raw.c
In file included from /home/steve/Packages/insighttoolkit/build-area/insighttoolkit4-4.8.0/BUILD/Wrapping/Modules/ITKCommon/vcl_complex.cxx:5:
In file included from /home/steve/Packages/insighttoolkit/build-area/insighttoolkit4-4.8.0/Modules/Core/Common/include/itkContinuousIndex.h:22:
In file included from /home/steve/Packages/insighttoolkit/build-area/insighttoolkit4-4.8.0/Modules/Core/Common/include/itkIndex.h:23:
In file included from /home/steve/Packages/insighttoolkit/build-area/insighttoolkit4-4.8.0/Modules/Core/Common/include/itkMath.h:32:
In file included from /home/steve/Packages/insighttoolkit/build-area/insighttoolkit4-4.8.0/Modules/Core/Common/include/itkMathDetail.h:43:
/usr/share/castxml/clang/include/emmintrin.h:28:2: error: "SSE2 instruction set not enabled"
#error "SSE2 instruction set not enabled"
 ^


The lines in emmintrin.h tests CPP symbol __SSE2__, which is not defined for 32-bit compiler in Debian.   Interestingly, the content of itkMathDetail.h near line 43 is:

    42  #if defined( ITK_HAVE_EMMINTRIN_H ) && !defined( __GCCXML__ )
    43  #include <emmintrin.h> // sse 2 intrinsics
    44  #endif /* ITK_HAVE_EMMINTRIN_H && ! __GCCXML__ */

First observation: prior to ITK 4.8, we used gccxml which defines __GCCXML__ and thus avoids including emmintrin.h.  Now we are using castxml, which does not define this symbol.  For compatibility, maybe it should?  Brad?


Secondly, I am slightly surprised that ITK should even need to guard against including things when __GCCXML __ is defined.   I had naively assumed that gccxml should be seeing the same code as the regular parser.  Is this a work-around for some gccxml issues of the past or is it still needed?


Thirdly, the emmintrin.h file that castxml uses presumably comes from clang and clearly depends on the symbol __SSE2__ being defined.  However, the emmintrin.h shipped with GCC does not; does this represent an incompatibility between castxml and gcc?

steve at riemann{insighttoolkit4-4.8.0}g++ -E /usr/lib/gcc/i586-linux-gnu/5/include/emmintrin.h  >/dev/null
steve at riemann{insighttoolkit4-4.8.0}g++ -E /usr/share/castxml/clang/include/emmintrin.h >/dev/null
/usr/share/castxml/clang/include/emmintrin.h:28:2: error: #error "SSE2 instruction set not enabled"
 #error "SSE2 instruction set not enabled"
  ^
steve at riemann{insighttoolkit4-4.8.0}

Thanks,
-Steve

[1] https://buildd.debian.org/status/fetch.php?pkg=insighttoolkit4&arch=i386&ver=4.8.0-1&stamp=1440593857

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/community/attachments/20150920/78bfdaa3/attachment.sig>
-------------- next part --------------
_______________________________________________
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://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://public.kitware.com/mailman/listinfo/insight-developers


More information about the Community mailing list