[Insight-developers] Re: Swig errors with Intel Linux compiler
Brad King
brad.king at kitware.com
Tue, 06 Apr 2004 14:43:47 -0400
Lorensen, William E (Research) wrote:
> Brad,
> I'm running the intel linux compiler version 7.1 Build 20031225Z
>
> I'm using the nightly checkouts of Insight and CableSwig. I assume it is
> some config problem.
>
> I get the following errors:
>
> make[5]: Entering directory
> `/home/lorensen2/Insight-linux-intel/Wrapping/CSwig/Common'
> Building wrap_ITKCommonBase.xml from
> /home/lorensen2/Insight-linux-intel/Wrapping/CSwig/Common/wrap_ITKCommonBase
> .xml...
> /home/lorensen2/Insight-linux-intel/bin/gccxml -fxml-start=_cable_ -DCSWIG
> -DCABLE_CONFIGURATION
> /home/lorensen/Insight/Wrapping/CSwig/Common/wrap_ITKCommonBase.cxx
> -fxml=/home/lorensen2/Insight-linux-intel/Wrapping/CSwig/Common/wrap_ITKComm
> onBase.xml -I/home/lorensen2/Insight-linux-intel
> -I/home/lorensen/Insight/Code/Algorithms
> -I/home/lorensen/Insight/Code/BasicFilters
> -I/home/lorensen/Insight/Code/Common -I/home/lorensen/Insight/Code/Numerics
> -I/home/lorensen/Insight/Code/IO -I/home/lorensen/Insight/Code/Numerics/FEM
> -I/home/lorensen/Insight/Code/Numerics/Statistics
> -I/home/lorensen/Insight/Code/SpatialObject
> -I/home/lorensen/Insight/Utilities/MetaIO
> -I/home/lorensen/Insight/Utilities/DICOMParser
> -I/home/lorensen2/Insight-linux-intel/Utilities/DICOMParser
> -I/home/lorensen2/Insight-linux-intel/Utilities/expat
> -I/home/lorensen/Insight/Utilities/expat
> -I/home/lorensen2/Insight-linux-intel/Utilities
> -I/home/lorensen/Insight/Utilities/vxl/vcl
> -I/home/lorensen/Insight/Utilities/vxl/core
> -I/home/lorensen2/Insight-linux-intel/Utilities/vxl/vcl
> -I/home/lorensen2/Insight-linux-intel/Utilities/vxl/core
> -I/home/lorensen/Insight/Utilities/vxl/v3p/netlib
> -I/home/lorensen/Insight/Utilities/zlib
> -I/home/lorensen2/Insight-linux-intel/Utilities/zlib
> -I/home/lorensen/Insight/Utilities/png
> -I/home/lorensen2/Insight-linux-intel/Utilities/png
> -I/home/lorensen/Insight/Utilities/jpeg
> -I/home/lorensen2/Insight-linux-intel/Utilities/jpeg
> -I/home/lorensen/Insight/Utilities/tiff
> -I/home/lorensen2/Insight-linux-intel/Utilities/tiff -I/usr/include
> -I/home/lorensen/Insight/Wrapping/CSwig
> -I/home/lorensen/Insight/Wrapping/CSwig/Common
> -I/home/lorensen/Insight/Wrapping/CSwig/VXLNumerics
> -I/home/lorensen/Insight/Wrapping/CSwig/Numerics
> -I/home/lorensen/Insight/Wrapping/CSwig/BasicFilters
> -I/home/lorensen/Insight/Wrapping/CSwig/IO
> -I/home/lorensen/Insight/Wrapping/CSwig/Algorithms -I/usr/include
> In file included from
> /home/lorensen/Insight/Code/Common/itkSimpleFastMutexLock.h:30,
> from
> /home/lorensen/Insight/Code/Common/itkLightObject.h:30,
> from /home/lorensen/Insight/Code/Common/itkObject.h:23,
> from /home/lorensen/Insight/Code/Common/itkCommand.h:20,
> from
> /home/lorensen/Insight/Wrapping/CSwig/Common/wrap_ITKCommonBase.cxx:21:
> /usr/include/pthread.h:163: error: syntax error before `__thread'
> /usr/include/pthread.h:165: error: `pthread_create' declared as function
> returning a function
> /usr/include/pthread.h:166: error: syntax error before `void'
> /usr/include/pthread.h:591: error: storage class specifiers invalid in
> parameter declarations
> /usr/include/pthread.h:591: error: storage class specified for parameter `
> parameter'
The problem is that "__thread" was made a keyword in GCC 3.3 even though
many distributions of pthread.h use __thread as a parameter name in a
function declaration. I've committed a fix.
-Brad