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

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Feb 16 22:09:44 CET 2016


On 16/02/2016 19:50, Marc Girondot wrote:
> 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 ?

Hmm, if you use MacPorts you are on your own as it is unsupported. 
However, there is a version of udunits2 (and netcdf and hdf5) at 
https://r.research.att.com/libs/ which used to work with RNetCDF 1.7-3: 
1.8-1 is recent and broken, as you can see at
https://cran.r-project.org/web/checks/check_results_RNetCDF.html . (The 
maintainer has been informed, and not responded ....)

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford



More information about the R-SIG-Mac mailing list