Created
July 24, 2019 02:33
-
-
Save tabe/522e576293cde7a663e166ef27df1224 to your computer and use it in GitHub Desktop.
How to install sf 0.7-6 on macOS Mojave with MacPorts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to install sf 0.7-6 on macOS Mojave with MacPorts | |
Prerequisites: | |
- installing R, pkg-config, and gdal via MacPorts. | |
Note that proj (proj5) is automatically installed as a dependency for gdal. | |
- downloading the source tarball sf_0.7-6.tar.gz in the current directory | |
Then: | |
$ PKG_CONFIG_PATH=/opt/local/lib/proj5/lib/pkgconfig R CMD INSTALL sf_0.7-6.tar.gz --configure-args='-with-gdal-config=/opt/local/bin/gdal-config -with-geos-config=/opt/local/bin/geos-config --with-proj-api=yes' | |
* installing to library ‘/Users/abe/Library/R/3.5/library’ | |
* installing *source* package ‘sf’ ... | |
** package ‘sf’ successfully unpacked and MD5 sums checked | |
configure: CC: /usr/bin/clang | |
configure: CXX: /usr/bin/clang++ -std=gnu++11 | |
configure: gdal-config set to /opt/local/bin/gdal-config | |
checking gdal-config exists... yes | |
checking gdal-config executable... yes | |
checking gdal-config usability... yes | |
configure: GDAL: 2.3.2 | |
checking GDAL version >= 2.0.1... yes | |
checking for gcc... /usr/bin/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 /usr/bin/clang accepts -g... yes | |
checking for /usr/bin/clang option to accept ISO C89... none needed | |
checking how to run the C preprocessor... /usr/bin/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: /opt/local/share/gdal/pcs.csv readable... yes | |
checking GDAL: checking whether PROJ is available for linking:... yes | |
checking GDAL: checking whether PROJ is available fur running:... yes | |
configure: pkg-config proj exists, will use it | |
checking proj_api.h usability... yes | |
checking proj_api.h presence... yes | |
checking for proj_api.h... yes | |
configure: PROJ: 5.2.0 | |
checking for pj_init_plus in -lproj... yes | |
checking PROJ: epsg found and readable... yes | |
configure: geos-config set to /opt/local/bin/geos-config | |
checking geos-config exists... yes | |
checking geos-config executable... yes | |
checking geos-config usability... yes | |
configure: GEOS: 3.7.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/opt/local/lib -lgeos_c... yes | |
configure: Package CPP flags: -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include | |
configure: Package LIBS: -L/opt/local/lib/proj5/lib -lproj -L/opt/local/lib -lgdal -L/opt/local/lib -lgeos_c | |
configure: creating ./config.status | |
config.status: creating src/Makevars | |
** libs | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c RcppExports.cpp -o RcppExports.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c bbox.cpp -o bbox.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c gdal.cpp -o gdal.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c gdal_geom.cpp -o gdal_geom.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c gdal_read.cpp -o gdal_read.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c gdal_utils.cpp -o gdal_utils.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c gdal_write.cpp -o gdal_write.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c geos.cpp -o geos.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c hex.cpp -o hex.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c ops.cpp -o ops.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c polygonize.cpp -o polygonize.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c proj.cpp -o proj.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c proj_info.cpp -o proj_info.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c raster2sf.cpp -o raster2sf.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c sfg.cpp -o sfg.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c signed_area.cpp -o signed_area.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c stars.cpp -o stars.o | |
/usr/bin/clang++ -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/lib/proj5/include -I/opt/local/include -I/opt/local/include -I"/Users/abe/Library/R/3.5/library/Rcpp/include" -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -c wkb.cpp -o wkb.o | |
/usr/bin/clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/opt/local/Library/Frameworks/R.framework/Resources/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -o sf.so RcppExports.o bbox.o gdal.o gdal_geom.o gdal_read.o gdal_utils.o gdal_write.o geos.o hex.o ops.o polygonize.o proj.o proj_info.o raster2sf.o sfg.o signed_area.o stars.o wkb.o -L/opt/local/lib/proj5/lib -lproj -L/opt/local/lib -lgdal -L/opt/local/lib -lgeos_c -F/opt/local/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation | |
installing to /Users/abe/Library/R/3.5/library/sf/libs | |
** R | |
** demo | |
** inst | |
** byte-compile and prepare package for lazy loading | |
in method for ‘dbWriteTable’ with signature ‘"PostgreSQLConnection","character","sf"’: no definition for class “PostgreSQLConnection” | |
in method for ‘dbDataType’ with signature ‘"PostgreSQLConnection","sf"’: no definition for class “PostgreSQLConnection” | |
in method for ‘coerce’ with signature ‘"Spatial","sf"’: no definition for class “Spatial” | |
in method for ‘coerce’ with signature ‘"Spatial","sfc"’: no definition for class “Spatial” | |
in method for ‘coerce’ with signature ‘"sf","Spatial"’: no definition for class “Spatial” | |
in method for ‘coerce’ with signature ‘"sfc","Spatial"’: no definition for class “Spatial” | |
in method for ‘coerce’ with signature ‘"XY","Spatial"’: no definition for class “Spatial” | |
** help | |
*** installing help indices | |
*** copying figures | |
** building package indices | |
** installing vignettes | |
** testing if installed package can be loaded | |
* DONE (sf) | |
$ R --no-save | |
R version 3.5.1 (2018-07-02) -- "Feather Spray" | |
Copyright (C) 2018 The R Foundation for Statistical Computing | |
Platform: x86_64-apple-darwin18.6.0 (64-bit) | |
R is free software and comes with ABSOLUTELY NO WARRANTY. | |
You are welcome to redistribute it under certain conditions. | |
Type 'license()' or 'licence()' for distribution details. | |
Natural language support but running in an English locale | |
R is a collaborative project with many contributors. | |
Type 'contributors()' for more information and | |
'citation()' on how to cite R or R packages in publications. | |
Type 'demo()' for some demos, 'help()' for on-line help, or | |
'help.start()' for an HTML browser interface to help. | |
Type 'q()' to quit R. | |
> require(sf) | |
Loading required package: sf | |
Linking to GEOS 3.7.2, GDAL 2.3.2, PROJ 5.2.0 | |
> | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment