OSGeo / homebrew-osgeo4mac

Mac homebrew tap for maintaining a stable work environment for the OSGeo.org geospatial toolset
https://git.io/fhh3X
BSD 3-Clause "New" or "Revised" License
364 stars 111 forks source link

R package `rgdal` cannot be installed with `osgeo-gdal` and `osgeo-proj` #1389

Closed pat-s closed 4 years ago

pat-s commented 4 years ago

Everything works with homebrew-core gdal and proj.

It might be related to osgeo-proj due to configure: pkg-config proj not available. Seems like pkg-config searches for proj but cannot find it - could it be that it is named osgeo-proj somewhere and therefore it cannot be found?

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /Library/Frameworks/R.framework/Resources
configure: CC: ccache clang
configure: CXX: ccache clang++
configure: CXX11 is: ccache clang++, CXX11STD is: -std=gnu++11
configure: CXX is: ccache clang++ -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.5-12
checking for /usr/bin/svnversion... yes
configure: svn revision: 1018
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.1.2
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5 or >= 3.0... yes
checking GDAL: linking with --libs only... yes
checking GDAL: gdal-config data directory readable... yes
checking GDAL: /usr/local/Cellar/osgeo-gdal/3.1.2/share/gdal/stateplane.csv readable... yes
configure: pkg-config proj not available
  set PKG_CONFIG_PATH to the directory containing proj.pc
configure: PROJ version not determined using pkg-config proj
configure: PROJ CPP flags:  -I/usr/local/Cellar/osgeo-gdal/3.1.2/include
configure: PROJ LIBS:  -lproj
checking PROJ header API:... yes
configure: API to be used as yet undetermined, searching ...
configure: error: API to be used not found
ERROR: configuration failed for package ‘rgdal’
* removing ‘/Users/pjs/Library/R/4.0/library/rgdal’
* restoring previous ‘/Users/pjs/Library/R/4.0/library/rgdal’
pat-s commented 4 years ago

My mistake, osgeo-proj was not linked.

alazarolop commented 4 years ago

@pat-s I'm glad you fix it!

Just for the record, a small set of instructions to get tap versions working https://stat.ethz.ch/pipermail/r-sig-mac/2020-June/013607.html