[ncl-install] Mac OS X 10.11 Incompatability
Mary Haley
haley at ucar.edu
Mon Dec 21 15:15:37 MST 2015
Kyle and all,
I was able to successfully build NCL under MacOS 10.11 (El Capitan), using
version 5.3 of gcc/gfortran.
To try the new NCL, first retrieve the compressed tar file I just created:
wget ftp.ucar.edu:
/pub/scd/haley/ncl_ncarg-6.3.0.MacOS_10.11_64bit_gcc530.tar.gz
Once you have the file, you need to uncompress and untar it wherever you
want the software to reside. For example, if the *.gz file resides in
*/path/to/gzfile/, *and you want the software in /usr/local/ncl-6.3.0-test:
mkdir /usr/local/ncl-6.3.0-test
cd /usr/local/ncl-6.3.0-test
gunzip */path/to/**gzfile**/*ncl_ncarg-6.3.0.MacOS_10.11_64bit_gcc530
.tar.gz
tar -xvf */path/to/**gzfile**/*ncl_ncarg-6.3.0.MacOS_10.11_64bit_gcc530
.tar
You can then remove the file */path/to/**gzfile**/*
ncl_ncarg-6.3.0.MacOS_10.11_64bit_gcc530.tar or save it somewhere.
You also need to setenv NCARG_ROOT to the parent directory (
/usr/local/ncl-6.3.0-test in this case), and make sure $NCARG_ROOT/bin
(/usr/local/bin in this case) is on your search path.
setenv NCARG_ROOT /usr/local/ncl-6.3.0-test
setenv PATH $NCARG_ROOT/bin:$PATH
or
export NCARG_ROOT=/usr/local/ncl-6.3.0-test
export PATH=$NCARG_ROOT/bin:$PATH
Try a couple of quick tests to make sure the binary is working properly:
which ncl
ncl -V
ng4ex gsun02n -clean
The last test should cause an X11 window with a graphic to pop up. You'll
need to click on this window with your left mouse button to cycle through
the rest of the plots.
If the tests don't work, then please keep reading, as you may also need to
install "xcode" for MacOS, and version 5.3 of gcc/gfortran. These versions
provide you with the quadmath and gomp libraries, as well as a few others.
*XCODE*
To get xcode, go to:
https://developer.apple.com/xcode/
and click on "download". You will need an Apple ID to get it. The software
is free.
You may also need to install the MacOS command line tools:
xcode-select --install
*GCC/GFORTRAN V5.3*
To install V5.3 of gcc/gfortran, go to:
http://hpc.sourceforge.net/
and download the gcc-5.3-bin.tar.gz file mentioned in this line:
gcc-5.3-bin.tar.gz
<http://prdownloads.sourceforge.net/hpc/gcc-5.3-bin.tar.gz?download>,
gfortran-5.3-bin.tar.gz
<http://prdownloads.sourceforge.net/hpc/gfortran-5.3-bin.tar.gz?download>
(gfortran
only), updated Dec 2015 (El Capitan).
Extract the files by typing:
cd /
sudo tar -zxf ~/Downloads/gcc-5.3-bin.tar.gz
It is *very* important that you do the "cd /" part first, because the files
are tarred up relative to the root ("/") directory.
Once this is done, you can remove the gcc-5.3-bin.tar.gz file.
I will be out-of-touch the rest of the week. If there are issues with this
NCL, please email them to ncl-install. I might be able to get to them later
today. Otherwise it may have to wait until next week.
Happy Holidays All,
--Mary
On Thu, Dec 17, 2015 at 7:40 AM, Kyle Griffin <ksgriffin2 at wisc.edu> wrote:
> Hi Mary,
>
> No, I haven't built from source yet. I'm going to try first with the
> standard packages I can get/have from MacPorts - it seems like everything
> is there, if you include the g2clib within GDAL. It also seems that GDAL
> made a major update back in September and not sure if any of your
> fixes/alterations to g2clib would've snuck in there or been fixed otherwise.
>
> (text above written yesterday)
>
> Build finished after I left work yesterday, successfully. Interestingly,
> the source tarball I downloaded seems to be quite old! It contains NCL
> 6.1.0-beta, a version that was outdated before I even purchased the
> computer. The executables are all dated 24 May 2012, which appears to be
> consistent with when such a build may have been released.
>
> Regardless, I ran the example - gsun01n.ncl, and it immediately segfaults.
> I think this has to do with me not being able to easily get some of the X11
> development libraries for Mac, which is more on me than anything. Changing
> the wks_type to png immediately allowed the script to run successfully.
> Other libraries I didn't/couldn't get via port include HDF-EOS5 and the
> patched g2clib. All other external software was included and built based
> only on the MacPorts versions available.
>
> Still not sure how the source code contains 6.1.0-beta when downloaded
> from https://www.earthsystemgrid.org/dataset/ncl.630.2.html (I can
> confirm the file size matches the one listed for 6.3.0 source). But
> regardless, build from scratch seems to work well on 10.11 when the
> appropriate paths are provided in the Q&A section of the config.
>
>
> Kyle
>
> ----------------------------------------
> Kyle S. Griffin
> Department of Atmospheric and Oceanic Sciences
> University of Wisconsin - Madison
> Room 1407
> 1225 W Dayton St, Madison, WI 53706
> Email: ksgriffin2 at wisc.edu
>
> On Wed, Dec 16, 2015 at 12:38 PM, Mary Haley <haley at ucar.edu> wrote:
>
>> Hi Kyle,
>>
>> We try to remove as many of these shared library dependencies as
>> possible, and we've been able to get by with this situation with previous
>> versions of MacOS.
>>
>> It doesn't surprise me that Apple has changed things up a bit, and
>> unfortunately, I don't have a 10.11 system to test on yet. I have to be
>> careful about upgrading right away because this usually breaks my ability
>> to run VPN from home, which is critical for work.
>>
>> I'm going to see if it's safe for me to upgrade to 10.11, and then I'll
>> give the NCL build a try.
>>
>> I do appreciate you offering to be a guinea pig. Have you actually tried
>> building NCL from source code?
>>
>> --Mary
>>
>>
>> On Mon, Dec 14, 2015 at 9:37 AM, Kyle Griffin <ksgriffin2 at wisc.edu>
>> wrote:
>>
>>> Hi all,
>>>
>>> I wanted to highlight the result of a bit of research I've had to do
>>> after upgrading a Mac from 10.9 to 10.11 - specifically, that
>>> DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH are no longer supported by
>>> default in OS X. While they can be set, this setting is not recognized in
>>> any automated (cron) calls to scripts. Here's on example output, where I
>>> print the contents of both environmental variables before attempting to run
>>> an NCL script. One environmental variable is set in .profile (manually
>>> sourced at start of the script) and one is set within the script itself.
>>> Both are ignored.
>>>
>>> /opt/local/lib/gcc49:/opt/local/lib/gcc
>>>
>>> /opt/local/lib/gcc49:/opt/local/lib/gcc
>>>
>>> dyld: Library not loaded: /usr/local/lib/libquadmath.0.dylib
>>>
>>> Referenced from: /Users/ksgriffin2/ncl6.3.0.1010/bin/ncl
>>>
>>> Reason: image not found
>>>
>>> The dyld:... error was originally missing libgfortran.3.dylib, but I
>>> manually created a link in /usr/local/lib to the version in
>>> /opt/local/lib/gcc49 try and tackle this problem. It appears that linking
>>> libgfortran.3.dylib, libquadmath.0.dylib, and libgomp.1.dylib does the
>>> trick to allow NCL to function as a workaround, but could be problematic
>>> long-term I would guess? The binary in use here is the Mac 10.10/gcc4.9.2
>>> binary.
>>>
>>> Apple now claims that any software relying on this should, essentially,
>>> not rely on these techniques any more or place them all in /usr/local/ (I'm
>>> using MacPorts, putting things /opt/local/) [see under last heading on the
>>> page]:
>>>
>>> https://developer.apple.com/library/mac/documentation/Security/Conceptual/System_Integrity_Protection_Guide/FileSystemProtections/FileSystemProtections.html#//apple_ref/doc/uid/TP40016462-CH2-DontLinkElementID_2
>>>
>>> This can, in theory, be fixed by accessing the system recovery and
>>> disabling the new "System Integrity Protection" feature that eliminates
>>> these issues, but I feel that is not an appropriate fix for this problem.
>>> For testing purposes, the simple process of disabling SIP is presented at
>>> the bottom of this article:
>>> http://www.macworld.com/article/2986118/security/how-to-modify-system-integrity-protection-in-el-capitan.html
>>>
>>> I should note the NCL appears to work fine from the command line,
>>> although I have to test it in depth.
>>>
>>> So it appears going forward that significant changes may need to be made
>>> to the NCL binaries for OS X in order for them to be functional at all.
>>> I'll be happy to serve as a guinea pig for fixes if a 10.11 system isn't
>>> available for testing...
>>>
>>>
>>> Kyle
>>> ----------------------------------------
>>> Kyle S. Griffin
>>> Department of Atmospheric and Oceanic Sciences
>>> University of Wisconsin - Madison
>>> Room 1407
>>> 1225 W Dayton St, Madison, WI 53706
>>> Email: ksgriffin2 at wisc.edu
>>>
>>> _______________________________________________
>>> 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/20151221/86567fc1/attachment-0001.html
More information about the ncl-install
mailing list