[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #EFZ-614335]: Issue installation netcdf on mac



No problem Jean - enjoy!

Sean

> Hello,
> 
> Oh that's really great ! I followed your instructions and it worked well.
> That's really helpful. I will pass this to my colleagues who also struggled 
> with the installation…
> 
> Thank you very much,
> Jean
> 
> 
> 
> 
> 
> On May 30, 2012, at 2:50 PM, Unidata netCDF Support wrote:
> 
> > Greetings Jean-Baptiste,
> >
> > It looks like you've built a 32 bit version of the FORTRAN libs (see what 
> > the command "file /usr/local/lib/libnetcdff.dylib" says). I would recommend 
> > the following:
> >
> > 1) don't set any *FLAGS variables.
> > 2) make sure to source the intel compiler scripts before building:
> >
> > source <install-dir>/bin/iccvars.sh intel64
> > source <install-dir>/bin/ifortvars.sh intel64
> >
> > 3) Go to the netCDF source directory and execute
> >
> > make clean
> >
> > 4) re-run configure
> >
> > lt_cv_ld_force_load=no ./configure --disable-netcdf-4 --disable-dap
> >
> > 5) run make (just make)
> >
> > 6) if everything *seems* ok, then run
> >
> > make check
> >
> > The output from make check will explicitly tell us if everything is ok...if 
> > it is, then:
> >
> > make install.
> >
> > Please let me know how it goes.
> >
> > Cheers!
> >
> > Sean
> >
> >> Hi,
> >>
> >> I am writing after spending hours on my mac trying to install and link 
> >> netcdf 4 libraries. I want to use them for fortran code that runs 
> >> correctly on other machines (including other macs…).
> >> I have icc and ifort installed on my mac, that runs under lion 10.6.8:
> >>
> >> $icc -V
> >> Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 
> >> 64, Version 12.1.4.328 Build 20120423
> >> Copyright (C) 1985-2012 Intel Corporation.  All rights reserved.
> >>
> >> $ ifort --version
> >> ifort (IFORT) 11.1 20100806
> >> Copyright (C) 1985-2010 Intel Corporation.  All rights reserved.
> >>
> >> ---------------------------
> >> Step 1: installation.
> >>
> >> ---------------------------
> >>
> >> * As recommend the intel website, I typed:
> >> export CC=icc
> >> export CXX=icpc
> >> export CFLAGS='-O3 -xT -ip -no-prec-div -static'
> >> export CXXFLAGS='-O3 -xT -ip -no-prec-div -static'
> >>
> >> export F77=ifort
> >> export FC=ifort
> >> export F90=ifort
> >> export FFLAGS='-O3 -xT -ip -no-prec-div -static'
> >>
> >> export CPP='icc -E'
> >> export CXXCPP='icpc -E'
> >>
> >>
> >> * Then,
> >>
> >> "
> >> export LDFLAGS="-lnetcdf"
> >> lt_cv_ld_force_load=no
> >>
> >> "
> >>
> >> enabled me to successfully do the sequence:
> >>
> >>
> >> ####################################
> >> ./configure --disable-netcdf-4 --disable-dap
> >> make
> >> make check
> >> make install
> >>
> >> ####################################
> >>
> >>
> >>
> >> ####################################
> >>
> >> $ nc-config --all
> >>
> >> This netCDF 4.1.3 has been built with the following features:
> >>
> >> --cc        -> icc
> >> --cflags    ->  -I/usr/local/include
> >> --libs      -> -L/usr/local/lib -lnetcdf
> >>
> >> --cxx       -> icpc
> >> --has-c++   -> yes
> >>
> >> --fc        -> ifort
> >> --fflags    -> -O3 -xT -ip -no-prec-div -static -I/usr/local/include
> >> --flibs     -> -L/usr/local/lib -lnetcdff -lnetcdf
> >> --has-f77   -> yes
> >> --has-f90   -> yes
> >>
> >> --has-dap   -> no
> >> --has-nc2   -> yes
> >> --has-nc4   -> no
> >> --has-hdf5  -> no
> >> --has-hdf4  -> no
> >> --has-pnetcdf-> no
> >> --has-szlib ->
> >>
> >> --prefix    -> /usr/local
> >> --includedir-> /usr/local/include
> >> --version   -> netCDF 4.1.3
> >>
> >> ####################################
> >>
> >>
> >> Ok, everything seems fine.
> >>
> >>
> >>
> >> ---------------------------
> >> Step 2: Compiling my code:
> >>
> >> ---------------------------
> >>
> >>
> >>
> >> When I try to compile linking to the libraries I get:
> >>
> >>
> >> ####################################
> >>
> >> $ nc-config --flibs
> >> -L/usr/local/lib -lnetcdff -lnetcdf
> >>
> >> $ nc-config --includedir
> >> /usr/local/include
> >>
> >> $ifort /lots of things/ -I/usr/local/include -L/usr/local/lib  -lnetcdff 
> >> -lnetcdf
> >>
> >> ld: warning: -macosx_version_min not specificed, assuming 10.6
> >> Undefined symbols for architecture x86_64:
> >> "_nccre_", referenced from:
> >> _outpv_ in outpv.o
> >>
> >> ####################################
> >>
> >>
> >> The strangest thing is that nccre appears in the library:
> >>
> >> $ ls -l /usr/local/lib/libnetcdff.a
> >> -rwxrwxrwx  1 root  wheel  729496 May 25 16:52 /usr/local/lib/libnetcdff.a
> >>
> >> $ nm /usr/local/lib/libnetcdff.a | grep "nccre"
> >> 0000000000000020 T _nccre_
> >> 00000000000038c8 S _nccre_.eh
> >> U _nccreate
> >>
> >> $ nm mkfile/outpv.o | grep "nccre"
> >> U _nccre_
> >>
> >>
> >> ####################################
> >>
> >>
> >> I spent some time searching the web and the mailing list archive without 
> >> success. Could you please help me sorting this out ? That would be so 
> >> helpful !
> >>
> >> Best regards,
> >>
> >> Jean-Baptiste
> >> Woods Hole Oceanic Institution
> >>
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: EFZ-614335
> > Department: Support netCDF
> > Priority: Normal
> > Status: Open
> >
> 
> 


Ticket Details
===================
Ticket ID: EFZ-614335
Department: Support netCDF
Priority: Normal
Status: Closed