Hi All,

I am trying to install ncdf package on a Linux 64-bit machine.

I successfully installed netcdf using this command,

./configure --prefix=/home/challar/netcdf/ --disable-netcdf4

I then tried to install ncdf package in R
R CMD INSTALL --configure-args="-with-netcdf_incdir=/home/challar/netcdf/include -with-netcdf_libdir=/home/challar/netcdf/lib" ncdf_1.6.3.tar.gz

I get this output below

* installing to library â/home/challar/R/R-2.11.1/libraryâ
* installing *source* package âncdfâ ...
checking for gcc... gcc -std=gnu99
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking /home/challar/netcdf/include/netcdf.h usability... yes
checking /home/challar/netcdf/include/netcdf.h presence... yes
checking for /home/challar/netcdf/include/netcdf.h... yes
Using user-specified netCDF include dir=/home/challar/netcdf/include
Found netcdf.h in: /home/challar/netcdf/include
checking for /home/challar/netcdf/lib/libnetcdf.a... yes
Using user-specified netCDF library dir=/home/challar/netcdf/lib
Found netcdf library file libnetcdf.a in directory /home/challar/netcdf/lib
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/home/challar/R/R-2.11.1/include -I/home/challar/netcdf/include -I/usr/local/include    -fpic  -g -O2 -c ncdf.c -o ncdf.o
gcc -std=gnu99 -I/home/challar/R/R-2.11.1/include -I/home/challar/netcdf/include -I/usr/local/include    -fpic  -g -O2 -c ncdf2.c -o ncdf2.o
gcc -std=gnu99 -I/home/challar/R/R-2.11.1/include -I/home/challar/netcdf/include -I/usr/local/include    -fpic  -g -O2 -c ncdf3.c -o ncdf3.o
gcc -std=gnu99 -shared -L/usr/local/lib64 -o ncdf.so ncdf.o ncdf2.o ncdf3.o -L/home/challar/netcdf/lib -lnetcdf
installing to /home/challar/R/R-2.11.1/library/ncdf/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared library '/home/challar/R/R-2.11.1/library/ncdf/libs/ncdf.so':
  /home/challar/R/R-2.11.1/library/ncdf/libs/ncdf.so: undefined symbol: curl_easy_getinfo
ERROR: loading failed
* removing â/home/challar/R/R-2.11.1/library/ncdfâ

Thinking that there is something wrong with curllib I installed curl in a local directory and configured netCDF using “ --with-curl=/home/challar/curl/” option. Even that did not work. Got the same error.

I looked up in the R-mailing list archive and found a thread here<http://www.mail-archive.com/r-help@r-project.org/msg53269.html> that said about disabling SELinux. Is that only way out??

Here is R.version output:
platform       x86_64-unknown-linux-gnu
arch           x86_64
os             linux-gnu
system         x86_64, linux-gnu
status
major          2
minor          11.1
year           2010
month          05
day            31
svn rev        52157
language       R
version.string R version 2.11.1 (2010-05-31)

Your help is appreciated.

Thanks
Sashi

	[[alternative HTML version deleted]]

