[ITK-dev] Problems with Change in itkStaticConstMacro

Matt McCormick matt.mccormick at kitware.com
Tue Jan 26 10:00:57 EST 2016


Hi Brad,

Thanks for the feedback and help on this.  These patches have been
merged to the release branch, and they will be included in the 4.9.0
release.

Thanks,
Matt

On Mon, Jan 25, 2016 at 9:31 AM, Bradley Lowekamp <brad at lowekamp.net> wrote:
> Matt,
>
>          You latest patch fixes the problems with build SimpleITK on my distribution system. I look forward to it being merged into the release branch!
> Thank you!
> Brad
>
>
>> On Jan 22, 2016, at 10:04 PM, Matt McCormick <matt.mccormick at kitware.com> wrote:
>>
>> Hi,
>>
>> Please test this patch:
>>
>>  http://review.source.kitware.com/#/c/20693/
>>
>> Thanks,
>> Matt
>>
>> On Fri, Jan 22, 2016 at 11:00 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>> I think I am seeing the same error. I get this error on my Mac running gcc 4.2.1
>>> Building CXX object
>>> Modules/Core/Common/test/CMakeFiles/ITKCommon1TestDriver.dir/itkImageRegionExplicitTest.cxx.o
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:
>>> In instantiation of ‘const unsigned int
>>> itk::ImageRegion<1u>::ImageDimension’:
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:92:
>>>  instantiated from ‘itk::ImageRegion<1u>’
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/test/itkImageRegionExplicitTest.cxx:22:
>>>  instantiated from here
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:92:
>>> error: explicit instantiation of
>>> ‘itk::ImageRegion<1u>::ImageDimension’ but no definition available
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:
>>> In instantiation of ‘const unsigned int
>>> itk::ImageRegion<1u>::SliceDimension’:
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:104:
>>>  instantiated from ‘itk::ImageRegion<1u>’
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/test/itkImageRegionExplicitTest.cxx:22:
>>>  instantiated from here
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:104:
>>> error: explicit instantiation of
>>> ‘itk::ImageRegion<1u>::SliceDimension’ but no definition available
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:
>>> In instantiation of ‘const unsigned int
>>> itk::ImageRegion<1u>::ImageDimension’:
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:92:
>>>  instantiated from ‘itk::ImageRegion<1u>’
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/test/itkImageRegionExplicitTest.cxx:22:
>>>  instantiated from here
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:92:
>>> error: explicit instantiation of
>>> ‘itk::ImageRegion<1u>::ImageDimension’ but no definition available
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:
>>> In instantiation of ‘const unsigned int
>>> itk::ImageRegion<1u>::SliceDimension’:
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:104:
>>>  instantiated from ‘itk::ImageRegion<1u>’
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/test/itkImageRegionExplicitTest.cxx:22:
>>>  instantiated from here
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:104/Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:
>>> In instantiation of ‘const unsigned int
>>> itk::ImageRegion<1u>::ImageDimension’:
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:92:
>>>  instantiated from ‘itk::ImageRegion<1u>’
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/test/itkImageRegionExplicitTest.cxx:22:
>>>  instantiated from here
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:92:
>>> error: explicit instantiation of
>>> ‘itk::ImageRegion<1u>::ImageDimension’ but no definition available
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:
>>> In instantiation of ‘const unsigned int
>>> itk::ImageRegion<1u>::SliceDimension’:
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:104:
>>>  instantiated from ‘itk::ImageRegion<1u>’
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/test/itkImageRegionExplicitTest.cxx:22:
>>>  instantiated from here
>>> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/Common/include/itkImageRegion.h:104:
>>> error: explicit instantiation of
>>> ‘itk::ImageRegion<1u>::SliceDimension’ but no definition available
>>> make[2]: *** [Modules/Core/Common/test/CMakeFiles/ITKCommon1TestDriver.dir/itkImageRegionExplicitTest.cxx.o]
>>> Error 1
>>> make[1]: *** [Modules/Core/Common/test/CMakeFiles/ITKCommon1TestDriver.dir/all]
>>> Error 2
>>>
>>>
>>> On Fri, Jan 22, 2016 at 10:05 AM, Bradly Lowekamp <brad at lowekamp.net> wrote:
>>>> I have reproduced this error now with GCC 4.1, 4.2, and 4.3. GCC version 4.5
>>>> works.
>>>>
>>>> Thank you for your help in addressing this problem.
>>>>
>>>> I apologize for not having documentation for the systems and justifications
>>>> for the versions of compilation tools. I certainly should move to docker
>>>> images to build the distributions for Linux as well. We have had great
>>>> success with the portability and availability of the binary distributions
>>>> for SimpleITK. This has involve a lot of testing and modification for the
>>>> build platforms to get where it has been working. I would had for this to be
>>>> reduce due to one preference for implementing static constant integers.
>>>>
>>>> Brad
>>>>
>>>> On Jan 21, 2016, at 4:45 PM, Matt McCormick <matt.mccormick at kitware.com>
>>>> wrote:
>>>>
>>>> On Thu, Jan 21, 2016 at 4:07 PM, Bradly Lowekamp <blowekamp at mail.nih.gov>
>>>> wrote:
>>>>
>>>> Gcc 4.2 runs into the same ITK bug with explicit instantiation too.
>>>>
>>>> On Jan 21, 2016, at 3:35 PM, Matthew McCormick (thewtex)
>>>> <matt at mmmccormick.com> wrote:
>>>>
>>>> On Thu, Jan 21, 2016 at 3:27 PM, Bradly Lowekamp <blowekamp at mail.nih.gov>
>>>> wrote:
>>>>
>>>> It’s certainly would be great if I could rely on using gcc 4.8+ for building
>>>> the distributions for SimpleITK. But my understanding for several situations
>>>> 4.1 is still essentially required.
>>>>
>>>>
>>>> What are the situations?  GCC 4.1 is not required by PEP 513.
>>>>
>>>>
>>>> Anaconda Python 2.7, OSX Python.org distribution and OSX system, need
>>>> apple’s gcc 4.2
>>>>
>>>>
>>>> How is this build environment reproduced (OSX and XCode version)?
>>>>
>>>>
>>>> Your blog post solution for static linking in un-accetable as I don’t want
>>>> to use a GPL license. Along with static linking not being recommended with
>>>> PEP 513, and lastly it can cause conflicts when used in a loaded module with
>>>> an older libc version.
>>>>
>>>>
>>>> My blog post does not say static linking is required or the GPL is required.
>>>>
>>>>
>>>> "Statically linking libstdc++ avoids version compatibility issues.”
>>>>
>>>> Statically, linking an LGPL library such as libstdc++ is “messy”.
>>>>
>>>>
>>>> libstdc++ is different from glibc.
>>>>
>>>> Statically linking libstdc++ in terms of the license is fine.  It is
>>>> available with the GCC Runtime Library Exception:
>>>>
>>>> https://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html
>>>>
>>>>
>>>> PEP 513 clearly says:
>>>>
>>>> GCC <= 4.2.0
>>>>
>>>>
>>>> This excludes GCC 4.1.
>>>>
>>>>
>>>> 4.1 <= 4.2, so it’s included.
>>>>
>>>>
>>>> This excludes GCC 4.1 from being a requirement.  GCC 4.2 would work.
>>>>
>>>>
>>>> Matt
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>>
>>>
>>> --
>>> Unpaid intern in BillsBasement at noware dot com
>


More information about the Insight-developers mailing list