[ITK] [ITK-dev] Problems with Change in itkStaticConstMacro
Bradly Lowekamp
blowekamp at mail.nih.gov
Wed Jan 20 10:00:19 EST 2016
Hello Luc,
Thanks for looking into this.
This bug is related to the older GCC 4.1 compiler that is found standard with Redhat 5 and Fedora 5 and used for distributions such as Anaconda’s Python. I apologize for the incorrect version before.
Here is some ITK code to reproduce the error:
http://review.source.kitware.com/#/c/20674/
Thank you for exploring a minimal test case. Your code does compile and run OK with GCC 4.1.
As a work around for SimpleITK I have disabled the SimpleITK Explicit library for now [1], this is not an optimal solution, and we should try to get explicit instantiation working again with GCC 4.1
Brad
https://github.com/SimpleITK/SimpleITK/compare/next#diff-af3b638bc2a3e6c650974192a53c7291
> On Jan 20, 2016, at 4:39 AM, Luc Hermitte <luc.hermitte at c-s.fr> wrote:
>
> Le 20/01/2016 09:57, Luc Hermitte a écrit :
>> Hello,
>>
>> Le 19/01/2016 21:19, Bradley Lowekamp a écrit :
>>> Hello,
>>>
>>> My release builds for SimpleITK are having significant problems with the
>>> change done here [1] to the itkStaticConstMacro.
>>>
>>> My builds on Redhat 5, with gcc 5.1, are filling my disk with errors
>>> along the following:
>>> [...]
>> [...]
>
>>> I’ll look into alternatives...
>>
>> Can you isolate the error on a simple test case that reproduce the issue?
>
> I've tried the file attached on https://ideone.com/SGlJ1i but it seems
> valid with GCC 5.1.
>
> However, in C++11, constexpr is required. And my g++ 4.8.2, and clang++
> as well, tell me:
>
> || g++ -std=c++03 -Werror -Wall -pedantic extern-templ.cpp -o
> extern-templ
> extern-templ.cpp|19 col 24| error: ISO C++ 1998 forbids the use of
> 'extern' on explicit instantiations [-Werror=pedantic]
> || extern template struct Bar<Foo<int>, Foo<double> >;
>
>
> What differs in SimpleITK source code?
>
>
> --Luc
> <extern-templ.cpp>
_______________________________________________
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