[ncl-install] ncl-install Digest, Vol 101, Issue 9

Alyssa aatwood at uw.edu
Wed Mar 16 19:19:07 MDT 2016


I wanted to post my solution to the issue I just resolved in downloading NCL on my new Mac (running OS X 10.11.3). I downloaded the OPeNDAP-enabled Mac 10.10 version of NCL (ncl_ncarg-6.3.0.MacOS_10.10_64bit_gcc492). When I tested the code using "ng4ex xy01n -clean”, I received the following error message:

>> ng4ex xy01n -clean

dyld: Library not loaded: /usr/local/lib/libgomp.1.dylib
  Referenced from: /usr/local/bin/ncargpath
  Reason: image not found
Trace/BPT trap

As per the instructions on http://www.ncl.ucar.edu/Download/macosx.shtml#libgomp <http://www.ncl.ucar.edu/Download/macosx.shtml#libgomp>, I had updated my version of gcc to 4.9.3. I confirmed that the missing file libgomp.1.dylib existed in the location: /opt/local/lib/gcc49. As per the instructions, I had also set the environment variable DYLD_FALLBACK_LIBRARY_PATH in .profile:

>> vi .profile

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
export NCARG_ROOT=/usr/local/ncl-6.3.0
export PATH=$NCARG_ROOT/bin:$PATH
export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib/gcc49
export PATH=/opt/local/lib/gcc49:$PATH
export DYLD_LIBRARY_PATH=/opt/local/lib/gcc49

The solution was that I had to activate gcc on my system:

>> sudo port select --set gcc mp-gcc49

and then link the 3 files listed below:

>> cd /usr/local/lib/
>> sudo ln -s /opt/local/lib/gcc49/libgomp.1.dylib .
>> sudo ln -s /opt/local/lib/gcc49/libgfortran.3.dylib .
>>  sudo ln -s /opt/local/lib/gcc49/libquadmath.0.dylib .

The script ("ng4ex xy01n -clean") finally ran without error. Thank you to Andrei Kurbatov for troubleshooting this issue with me!

Alyssa 


> Hi Andrei,
> 
> The NCL script is now working! FYI, the output was the following:
> 
> >> locate libgomp.1.dylib
> 
> /opt/local/lib/gcc49/libgomp.1.dylib
> /opt/local/lib/libgcc/libgomp.1.dylib
> /usr/local/gfortran/lib/i386/libgomp.1.dylib
> /usr/local/gfortran/lib/libgomp.1.dylib
> /usr/local/ncl-6.3.0/lib/libgomp.1.dylib
> 
> I had to link the 3 files below before the script ("ng4ex xy01n -clean") finally ran without error.
> 
> >> cd /usr/local/lib/
> >> sudo ln -s /opt/local/lib/gcc49/libgomp.1.dylib .
> >> sudo ln -s /opt/local/lib/gcc49/libgfortran.3.dylib .
> >>  sudo ln -s /opt/local/lib/gcc49/libquadmath.0.dylib .
> 
> Alyssa

>> 
>> 
>>> On Mar 16, 2016, at 7:17 PM, Andrei Kurbatov <akurbatov at maine.edu <mailto:akurbatov at maine.edu>> wrote:
>>> 
>>> Hi Alyssa,
>>> 
>>> I think it has something todo with EL Capitan sandbox
>>> 
>>> try 
>>> locate libgomp.1.dylib
>>> 
>>> copy output in my computer it was 
>>> 
>>> /opt/local/lib/gcc49/libgomp.1.dylib
>>> /opt/local/lib/libgcc/libgomp.1.dylib
>>> 
>>> 
>>> after that 
>>> 
>>> cd /usr/local/lib/
>>> sudo ln -s /opt/local/lib/gcc49/libgomp.1.dylib .
>>> (NOTE DOT after the space)
>>> 
>>> after that try again
>>> 
>>> 
>>> 
>>> 
>>> Hi Andrei,
>>> 
>>> I have performed the steps you suggested (see below for details), but unfortunately, the problem has not been resolved. The output from "ng4ex xy01n -clean" is still:
>>> 
>>> dyld: Library not loaded: /usr/local/lib/libgomp.1.dylib
>>>   Referenced from: /usr/local/bin/ncargpath
>>>   Reason: image not found
>>> Trace/BPT trap
>>> 
>>> 
>>> The steps you listed produced the following output:
>>> 
>>> >> port select --list gcc
>>> 
>>> Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
>>> Available versions for gcc:
>>> 	mp-gcc49
>>> 	none (active)
>>> 
>>> 
>>> >> sudo port select --set gcc mp-gcc49
>>> 
>>> Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
>>> Selecting 'mp-gcc49' for 'gcc' succeeded. 'mp-gcc49' is now active.
>>> 
>>> >> source ~/.profile
>>> 
>>> Now, the output from "gcc -v” is the following:
>>> 
>>> >> gcc -v
>>> 
>>> Using built-in specs.
>>> COLLECT_GCC=gcc
>>> COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin15/4.9.3/lto-wrapper
>>> Target: x86_64-apple-darwin15
>>> Configured with: /opt/local/var/macports/build/_opt_mports_dports_lang_gcc49/gcc49/work/gcc-4.9.3/configure --prefix=/opt/local --build=x86_64-apple-darwin15 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc49 --includedir=/opt/local/include/gcc49 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.9 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.9 --with-gxx-include-dir=/opt/local/include/gcc49/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --disable-isl-version-check --with-cloog=/opt/local --disable-cloog-version-check --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket <https://trac.macports.org/newticket> --with-pkgversion='MacPorts gcc49 4.9.3_0' --with-build-config=bootstrap-debug
>>> Thread model: posix
>>> gcc version 4.9.3 (MacPorts gcc49 4.9.3_0)
>>> 
>>> 
>>> Do you have any further suggestions?
>>> 
>>> Kind regards,
>>> Alyssa
>>> 
>>> 
>>> 
>>>> On Mar 16, 2016, at 4:13 PM, Andrei Kurbatov <akurbatov at maine.edu <mailto:akurbatov at maine.edu>> wrote:
>>>> 
>>>> Hi Alyssa,
>>>> 
>>>> 
>>>> 1) I think gcc is not activated on your system. Looks like you are using macports
>>>> 
>>>> You have to login as sudo use and type
>>>> port select --list gcc
>>>> 
>>>> it will list something like 
>>>> Available versions for gcc:
>>>>     gcc42
>>>>     llvm-gcc42
>>>>     mp-gcc49
>>>>     none (active)
>>>> 
>>>> after that you have to select 
>>>> $ sudo port select --set gcc mp-gcc49
>>>> 
>>>> 2) You also have to source .profile file after you made changes
>>>> type
>>>> source ~/.profile
>>>> 
>>>> 
>>>> 3) 
>>>>  
>>>> This is the output gcc -v on my system:
>>>> gcc -v
>>>> Using built-in specs.
>>>> COLLECT_GCC=gcc
>>>> COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin14/4.9.3/lto-wrapper
>>>> Target: x86_64-apple-darwin14
>>>> Configured with: /opt/local/var/macports/build/_opt_mports_dports_lang_gcc49/gcc49/work/gcc-4.9.3/configure --prefix=/opt/local --build=x86_64-apple-darwin14 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc49 --includedir=/opt/local/include/gcc49 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.9 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.9 --with-gxx-include-dir=/opt/local/include/gcc49/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --disable-isl-version-check --with-cloog=/opt/local --disable-cloog-version-check --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket <https://trac.macports.org/newticket> --with-pkgversion='MacPorts gcc49 4.9.3_0'
>>>> Thread model: posix
>>>> gcc version 4.9.3 (MacPorts gcc49 4.9.3_0) 
>>>> 
>>>> 
>>>> 
>>>>> On Mar 16, 2016, at 2:21 PM, Alyssa <aatwood at uw.edu <mailto:aatwood at uw.edu>> wrote:
>>>>> 
>>>>> HI Andrei,
>>>>> 
>>>>> Thank you for your help! 
>>>>> 
>>>>> The output to
>>>>> 
>>>>>> echo $DYLD_FALLBACK_LIBRARY_PATH
>>>>> 
>>>>>  is
>>>>> 
>>>>> /opt/local/lib/gcc49
>>>>> 
>>>>> and the output to:
>>>>> 
>>>>>> gcc -v
>>>>> 
>>>>> 
>>>>> is
>>>>> 
>>>>> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
>>>>> Apple LLVM version 7.0.2 (clang-700.1.81)
>>>>> Target: x86_64-apple-darwin15.3.0
>>>>> Thread model: posix
>>>>> 
>>>>> Kind regards,
>>>>> Alyssa
>>>>> 
>>>>>> On Mar 16, 2016, at 2:17 PM, Andrei Kurbatov <akurbatov at maine.edu <mailto:akurbatov at maine.edu>> wrote:
>>>>>> 
>>>>>> Alyssa,
>>>>>> what is the output from these commands?
>>>>>> 
>>>>>> echo $DYLD_FALLBACK_LIBRARY_PATH
>>>>>> 
>>>>>> and 
>>>>>> 
>>>>>> gcc -v
>>>>>> Andrei
>>>>>> 
>>>>>>> On Mar 16, 2016, at 2:00 PM, ncl-install-request at ucar.edu <mailto:ncl-install-request at ucar.edu> wrote:
>>>>>>> 
>>>>>>> Send ncl-install mailing list submissions to
>>>>>>> 	ncl-install at ucar.edu <mailto:ncl-install at ucar.edu>
>>>>>>> 
>>>>>>> To subscribe or unsubscribe via the World Wide Web, visit
>>>>>>> 	http://mailman.ucar.edu/mailman/listinfo/ncl-install <http://mailman.ucar.edu/mailman/listinfo/ncl-install>
>>>>>>> or, via email, send a message with subject or body 'help' to
>>>>>>> 	ncl-install-request at ucar.edu <mailto:ncl-install-request at ucar.edu>
>>>>>>> 
>>>>>>> You can reach the person managing the list at
>>>>>>> 	ncl-install-owner at ucar.edu
>>>>>>> 
>>>>>>> When replying, please edit your Subject line so it is more specific
>>>>>>> than "Re: Contents of ncl-install digest..."
>>>>>>> 
>>>>>>> 
>>>>>>> Today's Topics:
>>>>>>> 
>>>>>>>  1. Re: Ncl Mac Troubleshooting (Alyssa)
>>>>>>> 
>>>>>>> 
>>>>>>> ----------------------------------------------------------------------
>>>>>>> 
>>>>>>> Message: 1
>>>>>>> Date: Wed, 16 Mar 2016 13:35:30 -0400
>>>>>>> From: Alyssa <aatwood at uw.edu>
>>>>>>> Subject: Re: [ncl-install] Ncl Mac Troubleshooting
>>>>>>> To: Mary Haley <haley at ucar.edu>
>>>>>>> Cc: "ncl-install at ucar.edu" <ncl-install at ucar.edu>
>>>>>>> Message-ID: <66595239-0949-42FA-8B03-4B0526F244F7 at uw.edu>
>>>>>>> Content-Type: text/plain; charset="utf-8"
>>>>>>> 
>>>>>>> Hi Mary,
>>>>>>> 
>>>>>>> I have seen the solution you posted below- this is the reason I updated my version of GCC to 4.9.3 (according to the filename of the NCL tar file, it was built with 4.9.2). As per the instructions in the link you sent, I have updated my gcc/gfortran compiler, confirmed that the new compiler is in ?opt/local/lib/gcc49?, and set the environment variable DYLD_FALLBACK_LIBRARY_PATH in .profile.
>>>>>>> 
>>>>>>> These steps have not seemed to resolve the problem. Do you have any thoughts on what else the issue might be?
>>>>>>> 
>>>>>>> Kind regards,
>>>>>>> Alyssa
>>>>>>> 
>>>>>>> 
>>>>>>>> On Mar 16, 2016, at 11:29 AM, Mary Haley <haley at ucar.edu> wrote:
>>>>>>>> 
>>>>>>>> Alyssa,
>>>>>>>> 
>>>>>>>> This problem is likely due to you having an older version of the gnu compilers than what NCL was built with.
>>>>>>>> 
>>>>>>>> We've documented the problem and its solution here:
>>>>>>>> 
>>>>>>>> http://www.ncl.ucar.edu/Download/macosx.shtml#libgomp <http://www.ncl.ucar.edu/Download/macosx.shtml#libgomp>
>>>>>>>> 
>>>>>>>> Please see if this fixes your issue.
>>>>>>>> 
>>>>>>>> Good luck,
>>>>>>>> 
>>>>>>>> --Mary
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Tue, Mar 15, 2016 at 6:42 PM, Alyssa <aatwood at uw.edu <mailto:aatwood at uw.edu>> wrote:
>>>>>>>> Hi Mary,
>>>>>>>> 
>>>>>>>> I am also having troubles downloading NCL on my new Mac (running OS X 10.11.3). I have downloaded the OPeNDAP-enabled Mac 10.10 version of NCL (ncl_ncarg-6.3.0.MacOS_10.10_64bit_gcc492). When I type "ncl -V?, the output is ?6.3.0?. But when I type "ng4ex xy01n -clean?, I receive the following error message:
>>>>>>>> 
>>>>>>>> dyld: Library not loaded: /usr/local/lib/libgomp.1.dylib
>>>>>>>> Referenced from: /usr/local/bin/ncargpath
>>>>>>>> Reason: image not found
>>>>>>>> Trace/BPT trap
>>>>>>>> 
>>>>>>>> I have updated my version of gcc to 4.9.3. The file libgomp.1.dylib exists in the location: /opt/local/lib/gcc49.
>>>>>>>> 
>>>>>>>> In .profile, I have the following:
>>>>>>>> 
>>>>>>>> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
>>>>>>>> # Finished adapting your PATH environment variable for use with MacPorts.
>>>>>>>> export NCARG_ROOT=/usr/local/ncl-6.3.0
>>>>>>>> export PATH=$NCARG_ROOT/bin:$PATH
>>>>>>>> export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib/gcc49
>>>>>>>> export PATH=/opt/local/lib/gcc49:$PATH
>>>>>>>> export DYLD_LIBRARY_PATH=/opt/local/lib/gcc49
>>>>>>>> 
>>>>>>>> Do you know what the issue is here? Thank you in advance for any help you can provide!
>>>>>>>> 
>>>>>>>> Kind regards,
>>>>>>>> Alyssa
>>>>>>>> 
>>>>>>>>> On Mar 14, 2016, at 3:39 PM, Mary Haley <haley at ucar.edu <mailto:haley at ucar.edu>> wrote:
>>>>>>>>> 
>>>>>>>>> Thomas,
>>>>>>>>> 
>>>>>>>>> I think you found an out-dated link that contained a special binary we created for somebody.
>>>>>>>>> 
>>>>>>>>> We recommend these download instructions:
>>>>>>>>> 
>>>>>>>>> http://www.ncl.ucar.edu/Download/ <http://www.ncl.ucar.edu/Download/>
>>>>>>>>> http://www.ncl.ucar.edu/Download/install.shtml <http://www.ncl.ucar.edu/Download/install.shtml>
>>>>>>>>> 
>>>>>>>>> [1] The first step is to "download the appropriate binary" for your system. 
>>>>>>>>> I suggest downloading one of our precompiled binaries for MacOS:
>>>>>>>>> 
>>>>>>>>> OPeNDAP-enabled:
>>>>>>>>> https://www.earthsystemgrid.org/dataset/ncl.630.0.html <https://www.earthsystemgrid.org/dataset/ncl.630.0.html>
>>>>>>>>> 
>>>>>>>>> Non OPeNDAP-enabled:
>>>>>>>>> https://www.earthsystemgrid.org/dataset/ncl.630.1.html <https://www.earthsystemgrid.org/dataset/ncl.630.1.html>
>>>>>>>>> 
>>>>>>>>> With either link, click on the "Download Options" link and select the binary that has "MacOS_10.10" in the name, which should be compatible for your 10.11 system.
>>>>>>>>> 
>>>>>>>>> [2] The second step is to decide where you want NCL V6.3.0 to reside on your system, and then extract the gzipped tar files from this location.
>>>>>>>>> 
>>>>>>>>> http://www.ncl.ucar.edu/Download/install.shtml#ExtractFile <http://www.ncl.ucar.edu/Download/install.shtml#ExtractFile>
>>>>>>>>> 
>>>>>>>>> [3] The third step is to set/update the NCARG_ROOT and PATH environment variables:
>>>>>>>>> 
>>>>>>>>> http://www.ncl.ucar.edu/Download/install.shtml#SetNCARG_ROOT <http://www.ncl.ucar.edu/Download/install.shtml#SetNCARG_ROOT>
>>>>>>>>> 
>>>>>>>>> [4] The final step is to test your NCL installation. You can type these commands:
>>>>>>>>> 
>>>>>>>>>   ncl -V
>>>>>>>>> 
>>>>>>>>> and
>>>>>>>>> 
>>>>>>>>> ng4ex xy01n -clean
>>>>>>>>> 
>>>>>>>>> --Mary
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20160316/72b5c9cd/attachment-0001.html 


More information about the ncl-install mailing list