Closed johnbaums closed 2 years ago
The same problem is in pkgdown workflow on GHA, which also uses macOS. On Linux (Ubuntu), the package builds fine.
I do not have access to a Mac right now, but I am pretty sure this fixes it.
I can confirm that the package builds fine now on my macOS system. Thanks Robert.
pkgdown and R-universe workflows work too!
terra build is failing on macOS with the following errors:
Full install log
```bash > remotes::install_github('rspatial/terra') Downloading GitHub repo rspatial/terra@HEAD ✔ checking for file ‘/private/var/folders/bl/mxxch6cd6jn6cnj8f24v07ch0000gp/T/RtmpTAHl4w/remotesdf32783ee8a7/rspatial-terra-673a2ac/DESCRIPTION’ ... ─ preparing ‘terra’: ✔ checking DESCRIPTION meta-information ... ─ cleaning src ─ running ‘cleanup’ ─ checking for LF line-endings in source and make files and shell scripts (678ms) ─ checking for empty or unneeded directories ─ building ‘terra_1.6-8.tar.gz’ Installing package into ‘/usr/local/lib/R/4.1/site-library’ (as ‘lib’ is unspecified) * installing *source* package ‘terra’ ... ** using staged installation configure: CC: clang configure: CXX: clang++ -std=gnu++11 checking for gdal-config... /usr/local/bin/gdal-config checking gdal-config usability... yes configure: GDAL: 3.4.2 checking GDAL version >= 2.0.1... yes checking for gcc... clang checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether clang accepts -g... yes checking for clang option to accept ISO C89... none needed checking how to run the C preprocessor... clang -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking gdal.h usability... yes checking gdal.h presence... yes checking for gdal.h... yes checking GDAL: linking with --libs only... yes checking GDAL: /usr/local/Cellar/gdal/3.4.2_2/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.4.2 configure: pkg-config proj exists, will use it configure: using proj.h. configure: PROJ: 9.0.0 checking PROJ: checking whether PROJ and sqlite3 are available for linking:... yes checking for geos-config... /usr/local/bin/geos-config checking geos-config usability... yes configure: GEOS: 3.10.2 checking GEOS version >= 3.4.0... yes checking geos_c.h usability... yes checking geos_c.h presence... yes checking for geos_c.h... yes checking geos: linking with -L/usr/local/Cellar/geos/3.10.2/lib -lgeos_c... yes configure: Package CPP flags: -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include configure: Package LIBS: -L/usr/local/Cellar/proj/9.0.0_1/lib -L/usr/local/Cellar/libtiff/4.3.0/lib -lproj -lc++ -lm -ldl -lsqlite3 -ltiff -ljpeg -lz -lcurl -lldap -lz -L/usr/local/Cellar/gdal/3.4.2_2/lib -lgdal -L/usr/local/Cellar/geos/3.10.2/lib -lgeos_c configure: creating ./config.status config.status: creating src/Makevars ** libs clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c RcppExports.cpp -o RcppExports.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c RcppFunctions.cpp -o RcppFunctions.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c RcppModule.cpp -o RcppModule.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c arith.cpp -o arith.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c crs.cpp -o crs.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c distRaster.cpp -o distRaster.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c distance.cpp -o distance.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c extract.cpp -o extract.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c file_utils.cpp -o file_utils.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c focal.cpp -o focal.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c gcp.cpp -o gcp.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c gdal_algs.cpp -o gdal_algs.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c gdal_multidimensional.cpp -o gdal_multidimensional.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c gdalio.cpp -o gdalio.o clang -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -Wno-implicit-function-declaration -c geodesic.c -o geodesic.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c geos_methods.cpp -o geos_methods.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c geosphere.cpp -o geosphere.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c graticule.cpp -o graticule.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c math_utils.cpp -o math_utils.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c mediancut.cpp -o mediancut.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c memory.cpp -o memory.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c ncdf.cpp -o ncdf.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c ram.cpp -o ram.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c raster_methods.cpp -o raster_methods.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c raster_stats.cpp -o raster_stats.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c rasterize.cpp -o rasterize.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c read.cpp -o read.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c read_gdal.cpp -o read_gdal.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c read_ogr.cpp -o read_ogr.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c sample.cpp -o sample.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c spatBase.cpp -o spatBase.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c spatDataframe.cpp -o spatDataframe.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c spatFactor.cpp -o spatFactor.o clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.1.3/lib/R/include" -DNDEBUG -I/usr/local/Cellar/proj/9.0.0_1/include -I/usr/local/Cellar/libtiff/4.3.0/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.2_2/include -I/usr/local/Cellar/geos/3.10.2/include -I'/usr/local/lib/R/4.1/site-library/Rcpp/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include -fPIC -g -O2 -c spatRaster.cpp -o spatRaster.o In file included from spatRaster.cpp:18: In file included from ./spatRaster.h:18: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:183: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:138: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:14: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string:506: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:175: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:643: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:673: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:149:85: error: no matching constructor for initialization of 'std::__libcpp_numeric_limitsSystem details
```r > version _ platform x86_64-apple-darwin20.6.0 arch x86_64 os darwin20.6.0 system x86_64, darwin20.6.0 status major 4 minor 1.3 year 2022 month 03 day 10 svn rev 81868 language R version.string R version 4.1.3 (2022-03-10) nickname One Push-Up ```It seems the culprit may be
dropLevels
(previous commit 20f337fe270cb6f0b3f8174b0a2c21d197f1d0bc builds fine):https://github.com/rspatial/terra/blob/77badf1cb10da7efa6da037946855d63eb51537e/src/spatRaster.cpp#L1254-L1291