Friends, I tried to install ncdf package in ubuntu with the following command.
R CMD INSTALL --configure-args="-with-netcdf_incdir=/apps/netcdf/4.0.1/gcc/include -with-netcdf_libdir=/apps/netcdf/4.0.1/gcc/lib" ncdf_1.6.tar.gz The installation was stopped throwing the following error. I tried to google it but didnt find any solution. someone kindly write me what is going wrong. ** libs gcc -std=gnu99 -I/usr/share/R/include -I/apps/netcdf/4.0.1/gcc/include -fpic -g -O2 -c ncdf.c -o ncdf.o ncdf.c: In function R_nc_get_vara_double: ncdf.c:196: warning: format %u expects type unsigned int, but argument 3 has type size_t ncdf.c:202: warning: format %u expects type unsigned int, but argument 3 has type size_t ncdf.c: In function R_nc_get_vara_int: ncdf.c:239: warning: format %u expects type unsigned int, but argument 3 has type size_t ncdf.c:245: warning: format %u expects type unsigned int, but argument 3 has type size_t ncdf.c: In function R_nc_get_vara_text: ncdf.c:296: warning: format %u expects type unsigned int, but argument 3 has type size_t ncdf.c:302: warning: format %u expects type unsigned int, but argument 3 has type size_t ncdf.c: In function R_nc_ttc_to_nctype: ncdf.c:424: warning: implicit declaration of function exit ncdf.c:424: warning: incompatible implicit declaration of built-in function exit ncdf.c: In function R_nc_put_vara_double: ncdf.c:582: warning: format %d expects type int, but argument 3 has type size_t ncdf.c:585: warning: format %d expects type int, but argument 3 has type size_t gcc -std=gnu99 -I/usr/share/R/include -I/apps/netcdf/4.0.1/gcc/include -fpic -g -O2 -c ncdf2.c -o ncdf2.o gcc -std=gnu99 -I/usr/share/R/include -I/apps/netcdf/4.0.1/gcc/include -fpic -g -O2 -c ncdf3.c -o ncdf3.o ncdf3.c: In function R_nc_get_vara_charvarid: ncdf3.c:221: warning: assignment discards qualifiers from pointer target type ncdf3.c: In function R_nc_get_vara_numvarid: ncdf3.c:267: warning: assignment discards qualifiers from pointer target type gcc -std=gnu99 -shared -o ncdf.so ncdf.o ncdf2.o ncdf3.o -L/apps/netcdf/4.0.1/gcc/lib -lnetcdf -L/usr/lib64/R/lib -lR /usr/bin/ld: /apps/netcdf/4.0.1/gcc/lib/libnetcdf.a(attr.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC /apps/netcdf/4.0.1/gcc/lib/libnetcdf.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [ncdf.so] Errore 1 ERROR: compilation failed for package ncdf * Removing /usr/local/lib/R/site-library/ncdf [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.