[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:
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 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

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 
-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 ?



More information about the R-SIG-Mac mailing list