[Insight-users] RE: ITK 2.0.1 on OS X compile problem -- Solution

Zhu, Yuanxin Yuanxin.Zhu at kla-tencor.com
Wed Jul 13 17:57:03 EDT 2005


 
Thanks, Zachary. Your solution did solve the problem. I high appreciated
your message.

Best 

Yuanxin

-----Original Message-----
From: Zachary Pincus [mailto:zpincus at stanford.edu] 
Sent: Monday, July 11, 2005 8:56 PM
To: insight-users @ itk. org
Cc: Alexandra Badea; Zhu, Yuanxin; Matthias Schabel
Subject: ITK 2.0.1 on OS X compile problem -- Solution

Hello,

For a while I've been seeing issues on the ITK list about a compile  
problem with ITK 2.0.1 on OS X. I've just realized that though this  
issue was resolved in the ITK CVS tree, people who have had this  
problem may not be aware of this development, because it wasn't made  
clear to everyone who had the issue.

Anyhow, if you (or anyone you know) has been having linker errors  
compiling ITK 2.0.1 on OS X of the following sort:
> Building shared library /Users/mschabel/Code/C++/ITK/  
> InsightToolkit-2.0.1/bin/libitkvnl.dylib...
> ld: vnl_math.o illegal reference for -dynamic code (section   
> difference reference from section (__TEXT,__eh_frame) relocation   
> entry (0) to symbol: ___isnan defined in dylib: /usr/lib/libm.dylib)
> /usr/bin/libtool: internal link edit command failed
> make[9]: *** [/Users/mschabel/Code/C++/ITK/InsightToolkit-2.0.1/ 
> bin/ libitkvnl.dylib] Error 1

The solution is to either
(a) checkout a recent CVS copy of ITK (directions are on the ITK  
download page), or
(b) Edit the file:
[INSIGHT_ROOT]/Utilities/vxl/core/vnl/vnl_math.cxx
changing line 62 from:
# define isnan __isnan
to
# define isnan(x) __isnand((double)x)

This simple fix will allow ITK 2.0.1 to compile on OS X.

Sorry to those CC'd if this is the first help you've gotten on this  
vexing issue!

Zach Pincus

Program in Biomedical Informatics and Department of Biochemistry
Stanford University School of Medicine



More information about the Insight-users mailing list