Skip to content

Segfault installing terra on Mac OS 10.14.6 #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mhoban opened this issue Jan 25, 2022 · 5 comments
Closed

Segfault installing terra on Mac OS 10.14.6 #510

mhoban opened this issue Jan 25, 2022 · 5 comments

Comments

@mhoban
Copy link

mhoban commented Jan 25, 2022

I'm getting a segfault when trying to install terra on Mac OS 10.14.6. It seems like the package builds fine but then the error occurs when trying to load. The installation is through renv, if that makes any kind of difference. I've tried rebuilding and reinstalling gdal. Any insight would be appreciated. Thanks!

Here's the complete compilation / installation log:

** using staged installation
configure: CC: gcc-11
configure: CXX: clang++ -mmacosx-version-min=10.13 -std=gnu++11
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.4.1
checking GDAL version >= 2.0.1... yes
checking for gcc... gcc-11
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 gcc-11 accepts -g... yes
checking for gcc-11 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc-11 -E
checking for grep that handles long lines and -e... /usr/local/bin/ggrep
checking for egrep... /usr/local/bin/ggrep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
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.1_1/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.1
configure: pkg-config proj exists, will use it
configure: using proj.h.
configure: PROJ: 8.0.1
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/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include
configure: Package LIBS: -L/usr/local/Cellar/proj/8.0.1/lib -L/usr/local/Cellar/libtiff/4.3.0/lib -lproj -lsqlite3 -ltiff -lcurl -lstdc++   -L/usr/local/Cellar/gdal/3.4.1_1/lib -lgdal -L/usr/local/Cellar/geos/3.10.2/lib -lgeos_c
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppFunctions.cpp -o RcppFunctions.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppModule.cpp -o RcppModule.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c arith.cpp -o arith.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c crs.cpp -o crs.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c distRaster.cpp -o distRaster.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c distance.cpp -o distance.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c extract.cpp -o extract.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c file_utils.cpp -o file_utils.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c focal.cpp -o focal.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c gcp.cpp -o gcp.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c gdal_algs.cpp -o gdal_algs.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c gdal_multidimensional.cpp -o gdal_multidimensional.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c gdalio.cpp -o gdalio.o
"gcc-11" -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c geodesic.c -o geodesic.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c geos_methods.cpp -o geos_methods.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c geosphere.cpp -o geosphere.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c graticule.cpp -o graticule.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c math_utils.cpp -o math_utils.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c mediancut.cpp -o mediancut.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c memory.cpp -o memory.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c ncdf.cpp -o ncdf.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c ram.cpp -o ram.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c raster_methods.cpp -o raster_methods.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c raster_stats.cpp -o raster_stats.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rasterize.cpp -o rasterize.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c read.cpp -o read.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c read_gdal.cpp -o read_gdal.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c read_ogr.cpp -o read_ogr.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c sample.cpp -o sample.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c spatBase.cpp -o spatBase.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c spatDataframe.cpp -o spatDataframe.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c spatRaster.cpp -o spatRaster.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c spatSources.cpp -o spatSources.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c spatTime.cpp -o spatTime.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c spatVector.cpp -o spatVector.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c string_utils.cpp -o string_utils.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c vecmath.cpp -o vecmath.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c vector_methods.cpp -o vector_methods.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c write.cpp -o write.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c write_gdal.cpp -o write_gdal.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/proj/8.0.1/include -DHAVE_PROJ_H -I/usr/local/Cellar/gdal/3.4.1_1/include -I/usr/local/Cellar/geos/3.10.2/include -I'/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/library/R-4.0/x86_64-apple-darwin17.0/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c write_ogr.cpp -o write_ogr.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o terra.so RcppExports.o RcppFunctions.o RcppModule.o arith.o crs.o distRaster.o distance.o extract.o file_utils.o focal.o gcp.o gdal_algs.o gdal_multidimensional.o gdalio.o geodesic.o geos_methods.o geosphere.o graticule.o math_utils.o mediancut.o memory.o ncdf.o ram.o raster_methods.o raster_stats.o rasterize.o read.o read_gdal.o read_ogr.o sample.o spatBase.o spatDataframe.o spatRaster.o spatSources.o spatTime.o spatVector.o string_utils.o vecmath.o vector_methods.o write.o write_gdal.o write_ogr.o -L/usr/local/Cellar/proj/8.0.1/lib -L/usr/local/Cellar/libtiff/4.3.0/lib -lproj -lsqlite3 -ltiff -lcurl -lstdc++ -L/usr/local/Cellar/gdal/3.4.1_1/lib -lgdal -L/usr/local/Cellar/geos/3.10.2/lib -lgeos_c -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/staging/1/00LOCK-terra/00new/terra/libs
** R
** inst
** byte-compile and prepare package for lazy loading
in method for ‘sds’ with signature ‘x="stars"’: no definition for class “stars”
in method for ‘sds’ with signature ‘x="stars_proxy"’: no definition for class “stars_proxy”
in method for ‘coerce’ with signature ‘"stars","SpatRasterDataset"’: no definition for class “stars”
in method for ‘coerce’ with signature ‘"ggmap","SpatRaster"’: no definition for class “ggmap”
in method for ‘coerce’ with signature ‘"sf","SpatVector"’: no definition for class “sf”
in method for ‘coerce’ with signature ‘"sfc","SpatVector"’: no definition for class “sfc”
in method for ‘coerce’ with signature ‘"sfg","SpatVector"’: no definition for class “sfg”
in method for ‘coerce’ with signature ‘"XY","SpatVector"’: no definition for class “XY”
in method for ‘coerce’ with signature ‘"im","SpatRaster"’: no definition for class “im”
in method for ‘coerce’ with signature ‘"SpatVector","Spatial"’: no definition for class “Spatial”
in method for ‘coerce’ with signature ‘"Spatial","SpatVector"’: no definition for class “Spatial”
Creating a generic function for ‘ncol’ from package ‘base’ in package ‘terra’
in method for ‘ext’ with signature ‘x="sf"’: no definition for class “sf”
in method for ‘ext’ with signature ‘x="Extent"’: no definition for class “Extent”
in method for ‘ext’ with signature ‘x="Raster"’: no definition for class “Raster”
in method for ‘ext’ with signature ‘x="Spatial"’: no definition for class “Spatial”
in method for ‘wrap’ with signature ‘x="Spatial"’: no definition for class “Spatial”
in method for ‘rast’ with signature ‘x="stars"’: no definition for class “stars”
in method for ‘rast’ with signature ‘x="stars_proxy"’: no definition for class “stars_proxy”
in method for ‘show’ with signature ‘"Rcpp_SpatDataFrame"’: no definition for class “Rcpp_SpatDataFrame”
in method for ‘show’ with signature ‘"Rcpp_SpatCategories"’: no definition for class “Rcpp_SpatCategories”
in method for ‘geomtype’ with signature ‘x="Spatial"’: no definition for class “Spatial”
in method for ‘vect’ with signature ‘x="Spatial"’: no definition for class “Spatial”
in method for ‘vect’ with signature ‘x="sf"’: no definition for class “sf”
in method for ‘vect’ with signature ‘x="sfc"’: no definition for class “sfc”
in method for ‘vect’ with signature ‘x="XY"’: no definition for class “XY”
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
sh: line 1: 41200 Segmentation fault: 11  R_TESTS= '/Library/Frameworks/R.framework/Resources/bin/R' --no-save --no-restore --no-echo 2>&1 < '/var/folders/f2/tp8t4qxx413fx29_wpsj65km0000gn/T//RtmpzB63GP/file9c5f42fe4bc6'

 *** caught segfault ***
address 0x31, cause 'memory not mapped'

Traceback:
 1: Module(module, mustStart = TRUE, where = env)
 2: doTryCatch(return(expr), name, parentenv, handler)
 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 4: tryCatchList(expr, classes, parentenv, handlers)
 5: tryCatch(Module(module, mustStart = TRUE, where = env), error = function(e) e)
 6: loadModule(module = "spat", what = TRUE, env = ns, loadNow = TRUE)
 7: (function (ns) loadModule(module = "spat", what = TRUE, env = ns, loadNow = TRUE))(<environment>)
 8: doTryCatch(return(expr), name, parentenv, handler)
 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
10: tryCatchList(expr, classes, parentenv, handlers)
11: tryCatch((function (ns) loadModule(module = "spat", what = TRUE, env = ns, loadNow = TRUE))(<environment>),     error = function(e) e)
12: eval(substitute(tryCatch(FUN(WHERE), error = function(e) e),     list(FUN = f, WHERE = where)), where)
13: eval(substitute(tryCatch(FUN(WHERE), error = function(e) e),     list(FUN = f, WHERE = where)), where)
14: .doLoadActions(where, attach)
15: methods::cacheMetaData(ns, TRUE, ns)
16: loadNamespace(package, lib.loc)
17: doTryCatch(return(expr), name, parentenv, handler)
18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
19: tryCatchList(expr, classes, parentenv, handlers)
20: tryCatch({    attr(package, "LibPath") <- which.lib.loc    ns <- loadNamespace(package, lib.loc)    env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)}, error = function(e) {    P <- if (!is.null(cc <- conditionCall(e)))         paste(" in", deparse(cc)[1L])    else ""    msg <- gettextf("package or namespace load failed for %s%s:\n %s",         sQuote(package), P, conditionMessage(e))    if (logical.return)         message(paste("Error:", msg), domain = NA)    else stop(msg, call. = FALSE, domain = NA)})
21: library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE)
22: withCallingHandlers(expr, packageStartupMessage = function(c) tryInvokeRestart("muffleMessage"))
23: suppressPackageStartupMessages(library(pkg_name, lib.loc = lib,     character.only = TRUE, logical.return = TRUE))
24: doTryCatch(return(expr), name, parentenv, handler)
25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
26: tryCatchList(expr, classes, parentenv, handlers)
27: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
28: try(suppressPackageStartupMessages(library(pkg_name, lib.loc = lib,     character.only = TRUE, logical.return = TRUE)))
29: tools:::.test_load_package("terra", "/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/staging/1/00LOCK-terra/00new")
An irrecoverable exception occurred. R is aborting now ...
ERROR: loading failed
* removing ‘/Users/deadbilly/projects/blennies/plagiotremus/plagiotremus/renv/staging/1/terra’
Error: install of package 'terra' failed [error code 1]
Traceback (most recent calls last):
12: renv::install("rspatial/terra")
11: renv_install(records)
10: renv_install_staged(records)
 9: renv_install_default(records)
 8: handler(package, renv_install_impl(record))
 7: renv_install_impl(record)
 6: withCallingHandlers(renv_install_package_local(record), error = function(e) {
        vwritef("\tFAILED")
        writef(e$output)
    })
 5: renv_install_package_local(record)
 4: renv_install_package_local_impl(package, path)
 3: r_cmd_install(package, path)
 2: r_exec_error(package, output, "install", status)
 1: stop(error)
@mhoban
Copy link
Author

mhoban commented Jan 25, 2022

I should note that this seems to happen whether I install from CRAN (presumably a binary version) or build from github. From CRAN, the installation is successful but R crashes when loading the library.

@rhijmans
Copy link
Member

rhijmans commented Jan 26, 2022

What is your R version, and is package Rcpp up to date? Can you install sf from CRAN?

@rhijmans
Copy link
Member

Any updates, or can I close this issue?

@mhoban
Copy link
Author

mhoban commented Jan 27, 2022

sf segfaults when I try to load it, which is weird because it works in other cases (i.e. other R projects with their own renv library). I think the issue is probably external to terra so go ahead and close it. I can always submit something new if I find a more specific issue.

Thanks!

@rhijmans
Copy link
Member

sf had essentially the same dependencies as terra so it is helpful to know that it also fails with sf. This suggests some general issue with GDAL/PROJ. Having multiple versions installed is a common problem as one version may be used for compiling, and another may get used for running the software, leading conflicts. You may not be aware of this if libraries are installed by other programs, but one common reason is updating these packages without first fully removing the old versions. This is a recurrent theme, but here is a thread for sf r-spatial/sf#1850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants