[Insight-users] Building ITK 3.20 with clang on Linux

Stefan Köhnen stefan.khnen at googlemail.com
Wed Nov 9 17:46:26 EST 2011


It builds with clang, after some changes.
Just to be sure there is no error on my end, here are the versions of clang
and ITK I am using.

ITK release-branch (last commit 389c62087f77cf116cf53039f4d667a544c824bc
Merge branch 'comp-clang-3.0' into release).
Clang is build from here http://llvm.org/pre-releases/3.0/rc2/ clang
--version shows version is 3.0 rc2.

I had to change the following files:
Code/Algorithms/itkCurvesLevelSetFunction.h
Code/Algorithms/itkGeodesicActiveContourLevelSetFunction.h
Code/Algorithms/itkGeodesicActiveContourShapePriorLevelSetFunction.h
Code/Algorithms/itkShapeDetectionLevelSetFunction.h
Code/Algorithms/itkVoronoiPartitioningImageFilter.txx
Code/BasicFilters/itkBloxBoundaryPointImageToBloxBoundaryProfileImageFilter.txx
Code/BasicFilters/itkBloxBoundaryProfileImageToBloxCoreAtomImageFilter.txx
Code/BasicFilters/itkTernaryFunctorImageFilter.txx
Code/Common/itkPoint.txx
Code/Common/itkSize.h
Code/Numerics/Statistics/itkWeightedCentroidKdTreeGenerator.txx
Testing/Code/Common/itkMeshSourceGraftOutputTest.cxx

The errors were mostly missing this-Pointer or a missing include. Maybe the
default settings of clang are too strict.

Of course I can provide a patch (if this not some stupid error on my system
:-) ). Maybe I should move this to the developer mailing list.

2011/11/8 Sean McBride <sean at rogue-research.com>

> On Mon, 7 Nov 2011 15:33:51 +0100, Stefan Köhnen said:
>
> >thanks for your reply, I still had to change some lines of code, mostly
> >missing this-Pointer in the test-cases.
>
> Are you saying ITK 3.20.1 does not build with clang?  I believe it should.
>  If not, can you provide a patch?
>
> >The build process worked, but the tests fail. I will try to use the
> >compiled library in an test-application.
>
> The failing tests are probably this bug:
> <http://llvm.org/bugs/show_bug.cgi?id=9395>
>
> Someone needs to create a reduced test case, but I have not had the
> time... If you do, that'd be great. :)
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20111109/1505e577/attachment.htm>


More information about the Insight-users mailing list