<div><br></div><div>Hi Kevin,</div><div><br></div><div>Thanks for your help. Your solution for linking X11 library has worked perfectly. However, the solution that aims at C to Fortran library seems to have problems.</div><div><br></div><div>The whole make-output file is in the attachment. Here is one of related errors as following:</div><div><br></div><div><div>Making ./ncarg2d/src/libncarg/conpack</div><div>dyld: Library not loaded: @rpath/libintlc.dylib</div><div>&nbsp; Referenced from: /Users/kian/Downloads/ncl_ncarg-6.4.0/ncarg2d/src/libncarg/conpack/../../../.././ncarg2d/src/libncarg/Iftran/Iftran</div><div>&nbsp; Reason: image not found</div><div>/bin/sh: line 1: 82922 Abort trap: 6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ../../../.././ncarg2d/src/libncarg/Iftran/Iftran &lt; CodeIftran &gt; CodeFortran</div><div>make[5]: *** [IftranRun] Error 134</div><div>Making ./ncarg2d/src/libncarg/conpackt</div><div>dyld: Library not loaded: @rpath/libintlc.dylib</div><div>&nbsp; Referenced from: /Users/kian/Downloads/ncl_ncarg-6.4.0/ncarg2d/src/libncarg/conpackt/../../../.././ncarg2d/src/libncarg/Iftran/Iftran</div><div>&nbsp; Reason: image not found</div><div>/bin/sh: line 1: 82928 Abort trap: 6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ../../../.././ncarg2d/src/libncarg/Iftran/Iftran &lt; CodeIftran &gt; CodeFortran</div></div><div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div><div style="font-size:14px;font-family:Verdana;color:#000;"><div style="text-align: left;">Kian Huang</div></div></div><div>&nbsp;</div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------&nbsp;Original&nbsp;------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From: </b>&nbsp;"Kevin Hallock";&lt;hallock@ucar.edu&gt;;</div><div><b>Date: </b>&nbsp;Sat, Jul 8, 2017 02:15 AM</div><div><b>To: </b>&nbsp;"Kian"&lt;kian-huang@qq.com&gt;; <wbr></div><div><b>Cc: </b>&nbsp;"ncl-install"&lt;ncl-install@ucar.edu&gt;; <wbr></div><div><b>Subject: </b>&nbsp;Re: [ncl-install] Trouble in Building NCL on Mac OS with Ifort andClang</div></div><div><br></div>Hi Kian,<div class=""><br class=""></div><div class="">According to one of our other developers, changing your CtoFLibraries and CtoFLibrariesUser definitions to something like this might fix the linking issue:</div><div class=""><font face="Menlo" class="">#define CtoFLibraries -L "/opt/intel/lib" -lm -lintlc -lsvml -lifcore -lifport -liomp5<br class="">#define CtoFLibrariesUser -L "/opt/intel/lib" -lm -lintlc -lsvml -lifcore -lifport<br class=""></font><br class="">I hope this helps,</div><div class="">Kevin</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 7, 2017, at 11:20 AM, Kevin Hallock &lt;<a href="mailto:hallock@ucar.edu" class="">hallock@ucar.edu</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Kian,<div class=""><br class=""></div><div class="">¡°ft2build.h¡± is provided by XQuartz in the ¡°/opt/X11/include/freetype2¡± directory, so you might need to add ¡°-I/opt/X11/include/freetype2¡± to your clang command.</div><div class=""><br class=""></div><div class="">I don¡¯t have any experience with ifort myself, and I¡¯m not sure why it¡¯s failing to load the appropriate dynamic libraries, but I will ask some of the other NCL developers if they¡¯ve experienced this behavior when using ifort.</div><div class=""><br class=""></div><div class="">Kevin</div><div class=""><br class=""></div><div class=""><div class=""><blockquote type="cite" class=""><div class="">On Jul 7, 2017, at 1:41 AM, Kian &lt;<a href="mailto:kian-huang@qq.com" class="">kian-huang@qq.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""></div><div class="">Hi everyone,</div><div class=""><br class=""></div><div class="">I am trying to build NCL on Mac OS with ifort, clang compilers and XQuartz library these days and I have some trouble. I have solved some of these problem, but still left some. Thank you for reading and hope for solutions.</div><div class=""><br class=""></div><div class="">This is my operational system kernel information:</div><div class="">Darwin Kernel Version 16.6.0</div><div class=""><br class=""></div><div class="">The error information I met list as following:</div><div class=""><br class=""></div><div class=""><div class="">clang &nbsp;-O &nbsp;-I../../../.././include -I/opt/X11/include &nbsp;-DDarwin &nbsp; &nbsp;-DCTXT -DX11 -DPS -DPDF -DPIX &nbsp;-DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped -D__UNIXOS2__ -D_DARWIN_C_SOURCE -DNeedFuncProto &nbsp; &nbsp;-c -o cro_device.o cro_device.c</div><div class="">In file included from cro_device.c:26:</div><div class="">In file included from ./cro.h:147:</div><div class="">/opt/X11/include/cairo/cairo-ft.h:46:10: fatal error: 'ft2build.h' file not found</div><div class="">#include &lt;ft2build.h&gt;</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^</div><div class="">1 error generated.</div><div class="">make[5]: *** [cro_device.o] Error 1</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Previously, I met another problem. Log file (make-output) showed that the compiler can not load the ifort dynamic libraries. I solved it by using static linking by setting</div><div class=""><br class=""></div><div class=""><div class="">#define CtoFLibraries &nbsp;/opt/intel/lib/libifcore.a &nbsp;/opt/intel/lib/libsvml.a &nbsp;/opt/intel/lib/libimf.a /opt/intel/lib/libirc.a /opt/intel/lib/libiomp5.a</div><div class="">#define CtoFLibrariesUser &nbsp;/opt/intel/lib/libifcore.a &nbsp;/opt/intel/lib/libsvml.a /opt/intel/lib/libimf.a /opt/intel/lib/libirc.a /opt/intel/lib/libiomp5.a</div></div><div class=""><br class=""></div><div class="">But it was invalid for ifort -openmp option (Maybe change makefile setting will solve that. I have not tried it yet).</div><div class=""><div style="color:#909090;font-family:Arial Narrow;font-size:12px" class="">------------------</div><div style="font-size: 14px; font-family: Verdana;" class=""><div style="text-align: left;" class="">Kian Huang</div></div></div><div class="">&nbsp;</div>_______________________________________________<br class="">ncl-install mailing list<br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-install" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-install</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div>