<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Bitstream Vera Sans; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-- </DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mike Jackson Senior Research Engineer</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Innovative Management & Technology Services</DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR><DIV><DIV>On Mar 7, 2007, at 1:50 PM, Karthik Krishnan wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Thanks for locating this.<BR> <BR>On 3/7/07, <B class="gmail_sendername">Mike Jackson</B> <<A href="mailto:imikejackson@gmail.com">imikejackson@gmail.com</A>> wrote:<DIV><SPAN class="gmail_quote"></SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> InsightToolkit-3.0.1/Utilities/vxl/config/cmake/config/CMakeLists.txt<BR><BR>There is a section in the above file that checks for the math library:<BR>IF(UNIX)<BR> SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};m") <BR>ENDIF(UNIX)<BR><BR>Although generally true, using the latest Intel compiler on OS X<BR>(9.1.036) will add Intel's own libimf.a for math functions. Is there<BR>a way to detect that the Intel Compiler is being used and not run <BR>this section of cmake code? </BLOCKQUOTE><DIV><BR><BR> IF(CMAKE_C_COMPILER MATCHES "icc")<BR> # c compiler is icc<BR> ...<BR> <BR> IF(CMAKE_CXX_COMPILER MATCHES "icpc")<BR> # c++ compiler is icc<BR> ...<BR> <BR></DIV></DIV></BLOCKQUOTE><DIV>Thanks.. I'll look into this.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><BLOCKQUOTE type="cite"><DIV><DIV> I don't know if you need to add a few OsX version check or icc version checks or both in there too.. <BR> <BR> ie. <BR> Is this specific to the Intel math library, libmf version 9.1 <BR> and/or Is it specifc to the Intel math lib libmf on OsX<BR> and/or Is it specifc to the Intel math lib libmf on OsX Tiger ??<BR></DIV></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>For those who don't know, OS X 10.4 was the first OS X to run on Intel, so the OS X version MUST be at least 10.4 (Tiger). The version of the Intel Compiler is at last 9.1 as that was the first version to run (non-beta) on OS X.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I took out the IF(UNIX) thing and the libs are still trying to link against libm. I have no idea where it is coming from at this point.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>According to the intel docs, as long as <FONT class="Apple-style-span" face="Courier New" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;">#include <mathimf.h> </SPAN><FONT class="Apple-style-span" face="Lucida Grande" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;">is somewhere in the includes, the intel compiler will use its own math library (by statically linking), obviating the need for libm.</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New" size="4"><FONT class="Apple-style-span" face="Lucida Grande" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"></SPAN></FONT></FONT> So where all would I start looking to remove the addition of libm into the link_libraries?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"><BLOCKQUOTE type="cite"><DIV><DIV> Nobody I guess has really tried building with the intel compiler on OsX. ICC in itself has very few users. <BR></DIV></DIV></BLOCKQUOTE><DIV> I finally have my intel mini in an accessible location to the internet and I would be more than happy to setup a dash board for ITK (and vtk for that matter) that uses icc/icpc on OS X. I just need some hand holding to get it done.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I also tried to compile as static libs instead of shared and all the warnings about duplicate definitions went away until I started linking some of the itk apps, like itkTestDriver, then I get the following:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Linking CXX executable ../../bin/itkTestDriver</DIV><DIV>cd /Users/Shared/OpenSource/ITK301-Intel/Code/IO && /usr/local/bin/cmake -P CMakeFiles/itkTestDriver.dir/cmake_clean_target.cmake</DIV><DIV>cd /Users/Shared/OpenSource/ITK301-Intel/Code/IO && /usr/bin/icpc -w0 -xP -fno-common -vec-report0 -headerpad_max_install_names "CMakeFiles/itkTestDriver.dir/itkTestDriver.o" -o ../../bin/itkTestDriver -L. -L/Users/Shared/OpenSource/ITK301-Intel/bin -lITKIO -lITKNrrdIO -litkgdcm -litkjpeg12 -litkjpeg16 -litkopenjpeg -litkpng -litktiff -litkjpeg8 -lITKSpatialObject -lITKNumerics -lITKCommon -litkvnl_inst -litkvnl_algo -litkv3p_netlib -litkvnl -litkvcl -lm -lpthread -framework AppKit -lITKMetaIO -litksys -lITKDICOMParser -lITKEXPAT -lITKniftiio -lITKznz -litkzlib -lm </DIV><DIV>ld: warning multiple definitions of symbol ___isnanf</DIV><DIV>/opt/intel/cc/9.1.036/lib/libimf.a(isnan.o) definition of ___isnanf in section (__TEXT,__text)</DIV><DIV>/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../..//libm.dylib(xmm_misc.o) definition of ___isnanf</DIV><DIV>ld: warning multiple definitions of symbol ___isnan</DIV><DIV>/opt/intel/cc/9.1.036/lib/libimf.a(isnan.o) definition of ___isnan in section (__TEXT,__text)</DIV><DIV>/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../..//libm.dylib(xmm_misc.o) definition of ___isnan</DIV><DIV>ld: warning multiple definitions of symbol ___isnand</DIV><DIV>/opt/intel/cc/9.1.036/lib/libimf.a(isnan.o) definition of ___isnand in section (__TEXT,__text)</DIV><DIV>/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../..//libm.dylib(xmm_misc.o) definition of ___isnand</DIV><DIV>ld: warning multiple definitions of symbol _finite</DIV><DIV>/opt/intel/cc/9.1.036/lib/libimf.a(isfinite.o) definition of _finite in section (__TEXT,__text)</DIV><DIV>/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../..//libm.dylib(xmm_misc.o) definition of _finite</DIV><DIV>ld: warning multiple definitions of symbol _pow</DIV><DIV>/opt/intel/cc/9.1.036/lib/libimf.a(pow_stub.o) definition of _pow in section (__TEXT,__text)</DIV><DIV>/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../..//libm.dylib(xmm_power.o) definition of _pow</DIV><DIV>/usr/local/bin/cmake -E cmake_progress_report /Users/Shared/OpenSource/ITK301-Intel/CMakeFiles </DIV><DIV>[100%] Built target itkTestDriver</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Any help is appreciated..</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><BLOCKQUOTE type="cite"><DIV><DIV> <BR> Thanks<BR> --<BR> karthik </DIV><BR><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">or am I missing something completely?<BR><BR>--<BR>Mike Jackson<BR>imikejackson & gmail * com <BR><BR><BR><BR>_______________________________________________<BR>Insight-users mailing list<BR><A href="mailto:Insight-users@itk.org">Insight-users@itk.org</A><BR><A href="http://www.itk.org/mailman/listinfo/insight-users"> http://www.itk.org/mailman/listinfo/insight-users</A><BR></BLOCKQUOTE></DIV><BR><BR clear="all"><BR>-- <BR>Karthik Krishnan<BR>R&D Engineer,<BR>Kitware Inc.</BLOCKQUOTE></DIV><BR></BODY></HTML>