Hi Kevin -
You are right, I do have the same syntax error and same final rpath, with
the only difference that I have netcdf 4.2.1.1
I had seen that yesterday, but forgot about it
I have now tried install.packages('ncdf4') with R 3.0.0 and R 3.0.2, with
identical results (except r3.0.0 uses cc, while r3.0.2 uses clang)
Thanks
TobeyOn Wed, Nov 20, 2013 at 12:29 PM, Kevin Ushey <[email protected]> wrote: > Hi Tobey, > > I'm running R on Mac OS X, installed netcdf from Homebrew, and I run into > the same problem when installing ncdf from source. I see one obvious error > in the configure step (my guess is you are having a similar error, but > without your configure output we can't know): > > netcdf.m4: about to set rpath, here is source string: > >-L/usr/local/Cellar/netcdf/4.3.0/lib -lnetcdf< > expr: syntax error > netcdf.m4: final rpath: -Wl,-rpath, > > So, for me, $NETCDF_LDFLAGS == -L/usr/local/Cellar/netcdf/4.3.0/lib > -lnetcdf. This is the part that fails in the configure step: > > for word in $NETCDF_LDFLAGS; do > if test `expr $word : -L/` -eq 3; then > slibdir=`expr substr $word 3 9999` > NETCDF_RPATH="$NETCDF_RPATH -Wl,-rpath,$slibdir" > fi > done > > So, something is wrong with how `expr` is being called, it seems. You > should forward this to the maintainer. Perhaps `expr` is being used in a > non-portable way. > > -Kevin > > > On Wed, Nov 20, 2013 at 12:49 PM, Tobey Carman <[email protected]>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. >> >> 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 >> >> > [[alternative HTML version deleted]]
_______________________________________________ R-SIG-Mac mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-mac
