[Insight-users] RE: XCode 2.4 and isnan

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Aug 25 10:42:43 EDT 2006


Sweet.

However, I think Hans Johnson suggestion is good. This current test  
checks internal symbols exist, this seems like very bad practice to  
me. I checked and:

#define isnan(x) std::isnan(x)

builds. I think this would be a better solution and will likely not  
break again in the future. I am suggesting changing/adding at test  
for std::isnan.

Thanks,
Brad

On Aug 25, 2006, at 3:41 AM, Karthik Krishnan wrote:

> Hello,
>
> A TRY_COMPILE has been added to check for the existance of __isnand  
> and __inline_isnand. Please update your CVS and let us know if it  
> works for you.
>
> http://www.itk.org/cgi-bin/viewcvs.cgi/Utilities/vxl/core/ 
> vxl_config.h.in?root=Insight&r1=1.5&r2=1.6
> http://www.itk.org/cgi-bin/viewcvs.cgi/Utilities/vxl/config/cmake/ 
> config/vxl_platform_tests.cxx?root=Insight&r1=1.7&r2=1.8
> http://www.itk.org/cgi-bin/viewcvs.cgi/Utilities/vxl/config/cmake/ 
> config/CMakeLists.txt?root=Insight&r1=1.9&r2=1.10
> http://www.itk.org/cgi-bin/viewcvs.cgi/Utilities/vxl/core/vnl/ 
> vnl_math.cxx?root=Insight&r1=1.12&r2=1.13
>
> Thanks
> -karthik
>
>
> Hans Johnson wrote:
>> Hello All,
>>
>> I just wanted to add some more information.  I got similar results by
>> replacing the same line with :
>>
>> using std::isnan;
>>
>> Hans
>>
>>
>>
>>
>>
>> On 8/16/06 11:30 AM, "Remo Mueller" <remo.mueller at case.edu> wrote:
>>
>>
>>> I'm currently working on MacOSX 10.4.7 with Xcode 2.4 installed, and
>>> I'm compiling the code using gcc version 4.0.1 (Apple Computer, Inc.
>>> build 5363), using CMake 2.4.3.
>>>
>>> I ran into the same problem of isnan not being defined in
>>> vnl_math.cxx, which is located under Utilities/vxl/core/vnl/
>>>
>>> I finally got ITK to compile by changing line 66 in vnl_math.cxx  
>>> from:
>>>
>>> #define isnan(x) __isnand((double)x)
>>>
>>> to
>>>
>>> #define isnan(x) __inline_isnand((double)x)
>>>
>>> This line is defined in the #if defined (__APPLE__) code block.
>>>
>>> I'm not sure if this is correct, but it seems to fix the problem.
>>> This problem exists in ITK 2.8.1 and the current version of CVS.   
>>> Can
>>> someone who's more knowledgeable about the inner workings of ITK
>>> verify if this fixes the original problem? Thanks
>>>
>>> I hope this helps,
>>> Remo Mueller
>>>
>>> Case Western Reserve University
>>> Computer Science BS/MS Program
>>>
>>>
>>>
>>>
>>>> This is regarding the following build errors:
>>>>
>>>> http://www.itk.org/Testing/Sites/eno/Darwin-Xcode2.4-rel/
>>>> 20060811-0100-Nightly/BuildError.html
>>>>
>>>> Last week a new version of Xcode was release. It seems to mostly  
>>>> work
>>>> with ITK and CMake. However, there was a minor change to the isnan.
>>>> The internal symbol __isnand is no longer used in the isnan macro,
>>>> instead the marco reference __inline__isnan[fd]? inlined  
>>>> function is
>>>> used. I was not able to figure what was going on in this header  
>>>> file
>>>> and why the isnan macro would not work.
>>>>
>>>> I also suspect that this same problem will occur with a unix make
>>>> file since it it a change to a system header file.
>>>>
>>>> Thanks,
>>>> Brad
>>>>
>>>> ========================================================
>>>> Bradley Lowekamp
>>>> Management Systems Designers Contractor for
>>>> Office of High Performance Computing and Communications
>>>> National Library of Medicine
>>>> blowekamp at mail.nih.gov
>>>>
>>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>

========================================================
Bradley Lowekamp
Management Systems Designers Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060825/04cfee24/attachment-0001.html


More information about the Insight-users mailing list