[ncl-install] gfortran error? installing NCL on Mac OS X Lion
Erik N
nobleeu at gmail.com
Fri Apr 20 11:37:07 MDT 2012
Hi. I agree that this NCL page is confusing.
Simple solution
Go here: http://hpc.sourceforge.net/
Download the gfortran binary for mac (it is best to follow very easy
instructions before the link.)
Then install NCL.
You are good to go.
Cheers,
Erik Noble
_______________________________________________________
Erik Noble
NASA Goddard Institute for Space Studies
2880 Broadway, New York, NY-10025, USA
Tel: +1 (212) 678-5512
Fax: +1 (212) 678-5552
E-mail: erik.noble at nasa.gov
WEB: http://www.giss.nasa.gov/staff/enoble.html
GISS: http://www.giss.nasa.gov
_______________________________________________________
On Thu, Apr 19, 2012 at 10:45 PM, Yoichi Takayama <y.takayama at unsw.edu.au>wrote:
> Please improve this page:
>
> http://www.ncl.ucar.edu/Download/macosx.shtml
>
> The instructions are confusing and probably not clear or contradicting.
>
> My system set up is:
> Mac OS X 1.7
> Xcode 4.3.2
> ncl_ncarg-6.0.0.MacOS_10.6_64bit_gcc421.tar.gz (It is mentioned that this
> should work with OSx 10.7)
> gfortran 4.6.2
>
> Environment (.bash_profile)
> export NCARG_ROOT=/usr/local
> export PATH=$NCARG_ROOT/bin:$PATH
> export DISPLAY=:0.0
>
> Created .hluresfile in $HOME
>
>
> (1) Which gfortran?
>
> The page tells me to do first:
>
> sudo port install gcc45 +gfortran
>
> Then, later it tells me to do this:
>
> fink install gfortran
>
> Also, within the same section, it tells me that you got it from:
>
> http://gcc.gnu.org/wiki/GFortranBinaries#MacOS
>
> All installs different versions of gfortran and probably it is not
> necessary to do all these 3.
>
> Also, later in the part close to the end, it says that the fortran version
> that the NCL binary is built against it should be installed.
>
> I have installed ncl_ncarg-6.0.0.MacOS_10.6_64bit_gcc421.tar.gz, but it is
> not clear what version of gfortran is used (Is it the same as GCC version,
> which is 4.2.1?).
>
> Also, when I installed Xcode 4.3.2, gcc and gfortran were installed
> already.
>
> Also, fink install gfortran did not work, but this may be the one to use:
>
> fink install gfortran-shlibs [virtual library]
>
> This installs gcc47-shlibs-4.7.0-100. Not sure what gfortran version it
> is, but I presume that gfortran is just a part of GCC and probably has the
> same version number???
>
> By any rate, you also mentions that you have used gfortran from
> http://gcc.gnu.org/wiki/GFortranBinaries#MacOS.
>
> This provides only gfortran-4.6.2-x86_64-Lion.dmg for download.
>
> This is the gfortran package installed last on this system.
>
> $ gfortran --version
> GNU Fortran (GCC) 4.6.2 20111019 (prerelease)
> Copyright (C) 2011 Free Software Foundation, Inc.
>
>
>
> (2) Xcode 4.3.2
>
> After installing Xcode 4.3.2, I have "downloaded" command line tools
> previously (before installing the gfortran).
>
> Then ran sudo port install gcc45 +gfortran.
>
> However, this causes warnings to run:
>
> sudo xcode-select -switch /Applications/Xcode.app
>
> Please add this information to the note, since this had better be done
> before issuing the port install command.
>
>
> (3) limit command
>
> I have put limit stacksize unlimited into .bash_profile but:
>
> -bash: limit: command not found
>
> It does not seem to be installed or not in the PATH. Where could it be?
>
>
> (4) How to install the donwloaded NCL binary
>
> There should be a link (or a correct order to do installation) or
> consolidated note about how to install NCL from the downloaded binary.
>
> Typical users will go to this page but will see the link to Mac OS X
> installation note "Running NCL under MacOSX" and would not find a cohesive
> installation instruction there or will not think to combine the
> instructions with this link:
>
> http://www.ncl.ucar.edu/Download/install.shtml
>
> By the way, this page says it would require csh or tcsh, but Mac requires
> only bash.
>
> Please correct it to include Mac OS X, or include the similar instruction
> (step-by-step of how to install and test/run) in the "Running NCL under
> MacOSX".
>
>
> (5) Testing
>
> After installing all these and setting below: (by the way default shell is
> bash, please correct this in your pages, too)
>
> export DYLD_LIBRARY_PATH=/usr/local/lib
>
> I had to hunt for information on how to install the NCL binary and set up
> its environment as (4).
>
> For how to test and use, there should be a link to: (or the same should be
> included on the Mac OS Note page)
>
> http://www.ncl.ucar.edu/get_started.shtm
>
> From install.shml page, these two commands worked:
>
> ng4ex gsun01n
>
> ncl gsun01n.ncl
>
>
> However, this did not:
>
> $ ncargex cpex08 -clean
>
>
> NCAR Graphics Fortran Example <cpex08>
>
> Copying cpex08.f
>
> Copying cpexcc.f
>
> Compiling and linking...
> gfortran -fPIC -fno-range-check -m64 -O -o cpex08 cpexcc.f cpex08.f
> -L/usr/local/lib -L/usr/X11R6/lib -lncarg -lncarg_gks -lncarg_c -lXpm -lX11
> -lXext
> Undefined symbols for architecture x86_64:
> "__gfortran_transfer_character_write", referenced from:
> _capsap_ in ccUEA5Vc.o
> "__gfortran_transfer_integer_write", referenced from:
> _capsap_ in ccUEA5Vc.o
> "__gfortran_set_options", referenced from:
> _main in ccryWR2Q.o
> "__gfortran_os_error", referenced from:
> _mdlnam_ in libncarg.a(mdlnam.o)
> _mdlndr_ in libncarg.a(mdlndr.o)
> _dpgetc_ in libncarg.a(dpgetc.o)
> _dpgetr_ in libncarg.a(dpgetr.o)
> _dpsetc_ in libncarg.a(dpsetc.o)
> _dpsetr_ in libncarg.a(dpsetr.o)
> _icfell_ in libncarg.a(icfell.o)
> ...
> ld: symbol(s) not found for architecture x86_64
> collect2: ld returned 1 exit status
>
> The compile and link failed.
>
> Is this to do with the gfortran version used, or something else is missing
> (such as header files)?
>
>
> Thanks,
> Yoichi
>
> --------------------------------------------------
> Yoichi Takayama, PhD
> Research Officer
> Climate Change Research Centre
> Level 4 Mathews Building
> University of New South Wales
> Sydney, Australia, 2052
> Phone (CCRC): +61 2 9385 8963
> Fax (CCRC): +61 2 9385 8969
> --------------------------------------------------
> UNSW ABN 57 195 873 179, CRICOS Provider 00098G
> IMPORTANT: This email and any attachment(s) transmitted with it
> are intended solely for the use of the addressee(s) and may contain
> information that is confidential or subject to legal privilege. If you
> receive this email in error, please disregard the contents of the email and
> attachment(s), delete them and notify the sender immediately. Please note
> that any copying, distribution or use of this email is prohibited. Any
> views expressed in this message are those of the individual sender, except
> where the sender expressly, and with authority, states them to be the view
> of The University of New South Wales. Before opening any attachments,
> please check for viruses.
>
>
>
> --------------------------------------------------
> Yoichi Takayama, PhD
> Research Officer
> Climate Change Research Centre
> Level 4 Mathews Building
> University of New South Wales
> Sydney, Australia, 2052
> Phone (CCRC): +61 2 9385 8963
> Fax (CCRC): +61 2 9385 8969
> --------------------------------------------------
> UNSW ABN 57 195 873 179, CRICOS Provider 00098G
> IMPORTANT: This email and any attachment(s) transmitted with it
> are intended solely for the use of the addressee(s) and may contain
> information that is confidential or subject to legal privilege. If you
> receive this email in error, please disregard the contents of the email and
> attachment(s), delete them and notify the sender immediately. Please note
> that any copying, distribution or use of this email is prohibited. Any
> views expressed in this message are those of the individual sender, except
> where the sender expressly, and with authority, states them to be the view
> of The University of New South Wales. Before opening any attachments,
> please check for viruses.
>
>
> _______________________________________________
> 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/20120420/1a18426b/attachment.html
More information about the ncl-install
mailing list