Hi Prof. Ripley-
You mention unpacking the sources and trying to install.
I am not sure exactly how to get this to work. I am able to download and
unpack the ncdf4_1.10.tar.gz.
Then I can cd into the ncdf4 directory and run the configure script
(./configure). This creates the the src/Makevars file, and I was able to
copy (or just edit) the src/Makevars.in file so that my PKG_LIBS line
reflects the location of my netcdf install. But I am unclear how to
continue the build, and install? I don't have a Makefile, so the commands
"make" and "make install" fail.
Is there another step or command to generate the Makefile?
Is there another step I am missing? Or some gross misunderstanding of how
this make/build process works?
Thanks,
Tobey

Date: Wed, 20 Nov 2013 21:25:20 +0000
> From: Prof Brian Ripley <[email protected]>
> To: [email protected]
> Subject: Re: [R-SIG-Mac] Problem installing ncdf4, in Homebrew R
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> On 20/11/2013 20:49, Tobey Carman wrote:
> > Hi -
> > I am not sure if this is the right place for this question. I am fairly
> new
> > to R and still figuring out how to best manage packages. If this is not
> the
> > best venue for this question, please direct me elsewhere.
>
> It will do, but 'the homebrew version of R' is not anything official and
> you would probably do better to ask on R-devel since you are treating OS
> X as another Unix-alike.
>
> The package has a broken configure, and has been reported to the
> so-called maintainer long ago.
>
> You omitted the line with the error.  On my (native OS X) system you can
> see the log at
>
> http://www.r-project.org/nosvn/R.check/r-devel-macosx-x86_64/ncdf4-00install.html
> . Note the link command there:
>
> clang -mtune=native -dynamiclib -Wl,-headerpad_max_install_names
> -undefined dynamic_lookup -single_module -multiply_defined suppress
> -L/usr/local/lib -o ncdf4.so ncdf.o ncdf2.o ncdf3.o src_ncdf4.o
> -Wl,-rpath, -L/usr/local/lib -lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lcurl
> -L/Users/ripley/R/R-devel/lib -lR -dylib_file
> libRblas.dylib:/Users/ripley/R/R-devel/lib/libRblas.dylib -Wl,-framework
> -Wl,CoreFoundation
>
> The use of -Wl,-rpath, is simply wrong and swallows -lnetcdf.  So you
> need to correct it.
>
> One way to do so is to unpack the sources, try to install, copy the
> PKG_LIBS from src/Makevars to src/Makevars.in, correct it and try again.
>
> I have in src/Makevars.in
>
> PKG_LIBS= -L/usr/local/lib -lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lcurl
>
> but your mileage may differ (and probably will if you have a dynamic
> libndetcdf).
>
>
> >
> > I am trying to install the ncdf4 R package using:
> >
> >> install.packages('ncdf4')
> >
> > This command, downloads the package, finds nc-config, appears to collect
> > all the correct settings, and appears to compile ncdf4 with no errors.
> But
> > after compiling, and running a few tests, the command fails during a test
> > to load the just-compiled ncdf4 libraries:
> >
> >> install.packages('ncdf4')
> > ...
> > skipping lots of output for downloading, nc-config, configuring,
> compiling,
> > testing...
> > ...
> > ** testing if installed package can be loaded
> > Error in dyn.load(file, DLLpath = DLLpath, ...) :
> >    unable to load shared object
> >
> '/usr/local/Cellar/r/3.0.0/R.framework/Versions/3.0/Resources/library/ncdf4/libs/ncdf4.so':
> >
> >
> dlopen(/usr/local/Cellar/r/3.0.0/R.framework/Versions/3.0/Resources/library/ncdf4/libs/ncdf4.so,
> > 6): Symbol not found: _nc_close
> >    Referenced from:
> >
> /usr/local/Cellar/r/3.0.0/R.framework/Versions/3.0/Resources/library/ncdf4/libs/ncdf4.so
> >    Expected in: flat namespace
> >   in
> >
> /usr/local/Cellar/r/3.0.0/R.framework/Versions/3.0/Resources/library/ncdf4/libs/ncdf4.so
> > Error: loading failed
> > Execution halted
> > ERROR: loading failed
> > * removing
> >
> ?/usr/local/Cellar/r/3.0.0/R.framework/Versions/3.0/Resources/library/ncdf4?
> > Warning in install.packages :
> >    installation of package ?ncdf4? had non-zero exit status
> >>
> >
> > I am on a Mac, 10.8.2. I am using Homebrew to manage my packages. I have
> > the main netcdf library, 4.2.1.1,  that is installed via Homebrew and has
> > been working fine in several other applications. Likewise I am using a
> > Homebrew version of R.
> >
> > I am not sure how to keep trouble shooting this. I can provide more
> output
> > if necessary.
> > Thanks,
> >
> > Tobey Carman
> >
> > Spatial Ecology Lab,
> > University of Alaska Fairbanks
> >
> >       [[alternative HTML version deleted]]
> >
> >
> >
> > _______________________________________________
> > R-SIG-Mac mailing list
> > [email protected]
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >
>
>
> --
> Brian D. Ripley,                  [email protected]
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>
>
>

        [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to