Closed
Description
Compiling from source under MacOS Monterey 12.0.1 on M1 (ARM64) fails.
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20.6.0 (64-bit)
Steps :
- reinstall Homebrew for ARM64 (instead of usr/local/ this installs homebrew to the arm64 compatible directory opt/homebrew)
- install pkg-config, GDAL, PROJ and GEOS with
homebrew install
- add these lines to ~/R./Makevars:
FC = /opt/homebrew/bin/gfortran
F77 = /opt/homebrew/bin/gfortran
- run
install.packages("sf")
: Fails with error "gdal-config not found or not executable" - run
install.packages("sf",configure.args = "--with-gdal-config=/opt/homebrew/opt/gdal/bin/gdal-config")
: Solves the gdal-problem, but also fails with this trace:
...
checking GDAL: linking with --libs only... yes
checking GDAL: /opt/homebrew/Cellar/gdal/3.3.3/share/gdal/pcs.csv readable... no
checking GDAL: checking whether PROJ is available for linking:... yes
checking GDAL: checking whether PROJ is available fur running:... yes
configure: GDAL: 3.3.3
./configure: line 3657: pkg-config: command not found
checking proj.h usability... yes
checking proj.h presence... yes
checking for proj.h... yes
checking PROJ: checking whether PROJ and sqlite3 are available for linking:... no
configure: error: libproj or sqlite3 not found in standard or given locations.
ERROR: configuration failed for package ‘sf’
Metadata
Metadata
Assignees
Labels
No labels