[R-SIG-Mac] install RNetCDF_1.8-1.tar.gz failed

Marc Girondot marc_grt at yahoo.fr
Tue Feb 16 20:50:52 CET 2016


Dear experts... I try to install the lastest version of RNetCDF 
(1.8-1.tar.gz) on MacosX (El Capitan) but without success.
I send you the precise procedure I have used and some tests:

1/ I have installed MacPort as described here:
https://guide.macports.org
And it seems to be ok:
Marc-Girondot-MBA:~ marc$ port version
Version: 2.3.4

2/ I install the ports for udunits, udunits2, hdf5 and netcdf:
sudo port install udunits
sudo port install udunits
sudo port install hdf5
sudo port install netcdf

They seem to be well installed, for example (other ports are ok also):
Marc-Girondot-MBA:~ marc$ port installed hdf5
The following ports are currently installed:
   hdf5 @1.8.15-patch1_0+cxx
   hdf5 @1.8.16_1+cxx+hl (active)

3/ I modify .profile adding the lines:
export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/opt/local/lib:$DYLD_LIBRARY_PATH
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"

4/ I verify that nc-config gave expected results:
Marc-Girondot-MBA:lib marc$ nc-config --libs
-L/opt/local/lib -lnetcdf
Marc-Girondot-MBA:lib marc$ nc-config --includedir
/opt/local/include

5/ I run the command to install the package (it is loaded on the desktop):
Marc-Girondot-MBA:~ marc$ R CMD INSTALL $HOME/desktop/RNetCDF_1.8-1.tar.gz

And it failed at this command:

clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-DPACKAGE_NAME=\"RNetCDF\" -DPACKAGE_TARNAME=\"rnetcdf\" 
-DPACKAGE_VERSION=\"1.8-1\" -DPACKAGE_STRING=\"RNetCDF\ 1.8-1\" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
-DHAVE_UDUNITS2_UDUNITS_H=1 -DHAVE_LIBUDUNITS2=1 -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall 
-mtune=core2 -g -O2  -c RNetCDF.c -o RNetCDF.o
RNetCDF.c:75:12: fatal error: 'udunits2/udunits.h' file not found
   #include <udunits2/udunits.h>

What surprised me is that I don't see -l/opt/local/lib in the list of 
locations as I expected because udunits and udunits2  are there.

As someone being able to install this package ?

Sincerely,

Marc



More information about the R-SIG-Mac mailing list