[ncl-install] problems locating libgomp.1.dylib on new install of ncl from binary on MacOS Mojave

Kevin Hallock hallock at ucar.edu
Mon Sep 16 14:12:59 MDT 2019


Hi,

You may be able to work around the different path to libgomp.1.dylib by setting the environment variable DYLD_LIBRARY_PATH=/opt/local/lib/libgcc, although this might affect the loading of other shared libraries:

export DYLD_LIBRARY_PATH=/opt/local/lib/libgcc
ng4ex xy01n -clean

or

DYLD_LIBRARY_PATH=/opt/local/lib/libgcc ng4ex xy01n -clean

Setting DYLD_LIBRARY_PATH inline with your “ng4ex” or “ncl” command will only modify the shared library (dylib) search path for that particular execution of “ng4ex” or “ncl”, while exporting the environment variable will cause its behavior to persist until you exit your shell/terminal (again, this may cause unexpected behavior).

Another workaround would be to symlink libgomp.1.dylib into /usr/local/lib, although depending on what you have in /usr/local on your machine you may not want to do this.

Alternatively, you could try either installing NCL via conda <https://ncl.ucar.edu/Download/conda.shtml> or installing the “HPC Mac OS X” gfortran compiler <http://hpc.sourceforge.net/> version 7.1 or higher (see our documentation <https://ncl.ucar.edu/Download/macosx.shtml#InstallCompilers> for more info) that was used to compile the Mac binary release of NCL available on our website.

I hope this helps,
Kevin

> On Sep 2, 2019, at 8:40 PM, Scott-Fleming, Ian via ncl-install <ncl-install at ucar.edu> wrote:
> 
> Have installed latest version of ncl on an iMac Pro running MacOS Mojave (10.14.6).  When trying to test following the instructions at 
> https://www.ncl.ucar.edu/Download/install.shtml#DownloadBinary <https://www.ncl.ucar.edu/Download/install.shtml#DownloadBinary>
> 
> "You can quickly test if NCL is installed properly by typing:
>     ng4ex xy01n -clean
>> I get an error saying it can’t locate libgomp.1.dylib.
> 
> I believe I have all appropriate software installed.  From running otool on /opt/local/ncl/bin/ncargpath , it appears to be looking in the wrong place for the dylib.  
> Xcode and its command line tools are installed.  I have gcc and gfortran installed via MacPorts. 
> 
> Note:  I have installed ncl in /opt/local/ncl (symlinked to /opt/local/ncl-6.6.2) , rather than in /usr/local .  However, I have NCARG_ROOT pointing to /opt/local/ncl so that *shouldn’t* be an issue.
> 
> My diagnostics:   (your requested ones are below as well)
> 
> $ ng4ex xy01n -clean
> dyld: Library not loaded: /usr/local/lib/libgomp.1.dylib
>   Referenced from: /opt/local/ncl/bin/ncargpath
>   Reason: image not found
> Abort
> neys:iscottfl:~ $ locate libgomp.1.dylib
> /opt/local/lib/libgcc/libgomp.1.dylib
> 
> neys:iscottfl:~ $ ls -l $(locate libgomp.1.dylib)
> -rwxr-xr-x  1 root  admin  179224 Aug 12 08:43 /opt/local/lib/libgcc/libgomp.1.dylib  <—— actual locate of libgomp.1.dylib
> 
> neys:iscottfl:~ $ otool -L /opt/local/ncl/bin/ncargpath
> /opt/local/ncl/bin/ncargpath:
> /usr/local/lib/libgomp.1.dylib (compatibility version 2.0.0, current version 2.0.0) <—— ncargpath’s expected location.
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
> /usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
> 
> 
> Any help would be appreciated.  I suppose if all else fails I can try building ncl rather than using a precompiled binary?
> 
> Thanks
> 
> Scott-Fleming, Ian
> Climate Science Center
> Texas Tech University
> MS 1005
> Lubbock, TX, 79409
> ian.scott-fleming at ttu.edu <mailto:ian.scott-fleming at ttu.edu>
> (806) 834-3290
> 
> 
> __________________________
> 
> Here are the diagnostics your installation instruction request ( at the bottom of the page https://www.ncl.ucar.edu/Download/macosx.shtml <https://www.ncl.ucar.edu/Download/macosx.shtml> ) :
> 
> 
> neys:iscottfl:~ $ which ncl
> /opt/local/ncl/bin/ncl
> neys:iscottfl:~ $ ncl -V
> dyld: Library not loaded: /usr/local/lib/libgfortran.4.dylib
>   Referenced from: /opt/local/ncl/bin/ncl
>   Reason: image not found
> Abort trap: 6
> neys:iscottfl:~ $ otool -L $(which ncl)
> /opt/local/ncl/bin/ncl:
> /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
> /opt/X11/lib/libfontconfig.1.dylib (compatibility version 11.0.0, current version 11.2.0)
> /opt/X11/lib/libXrender.1.dylib (compatibility version 5.0.0, current version 5.0.0)
> /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
> /opt/X11/lib/libXpm.4.dylib (compatibility version 16.0.0, current version 16.0.0)
> /opt/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
> /opt/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
> /usr/local/lib/libgfortran.4.dylib (compatibility version 5.0.0, current version 5.0.0)
> /usr/local/lib/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
> /usr/local/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.24.0)
> /usr/local/lib/libgomp.1.dylib (compatibility version 2.0.0, current version 2.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
> /usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
> neys:iscottfl:~ $ env | grep NCARG
> NCARG_ROOT=/opt/local/ncl
> neys:iscottfl:~ $ ls -l /opt/local/ncl
> lrwxr-xr-x  1 root  admin  9 Sep  2 19:00 /opt/local/ncl -> ncl-6.6.2
> neys:iscottfl:~ $ which gcc
> /opt/local/bin/gcc
> neys:iscottfl:~ $ which gfortran
> /opt/local/bin/gfortran
> neys:iscottfl:~ $ gcc --version
> gcc (MacPorts gcc9 9.2.0_0) 9.2.0
> Copyright (C) 2019 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> neys:iscottfl:~ $ gfortran --version
> GNU Fortran (MacPorts gcc9 9.2.0_0) 9.2.0
> Copyright (C) 2019 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> Scott-Fleming, Ian
> Climate Science Center
> Texas Tech University
> MS 1005
> Lubbock, TX, 79409
> ian.scott-fleming at ttu.edu <mailto:ian.scott-fleming at ttu.edu>
> (806) 834-3290
> 
> 
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-install/attachments/20190916/3087f3fe/attachment-0001.html>


More information about the ncl-install mailing list