sf
sf copied to clipboard
Install Issue: 'proj_normalize_for_visualization' was not declared in this scope
I was trying to install on cluster and I have load the module: gdal 2.4.1; geos 3.7.2; proj 6.0.0
And the code for installation is:
install.packages('sf',
configure.args='--with-gdal-config=/cm/shared/apps/gdal/gcc/2.4.1/bin/gdal-config --with-geos-config=/cm/shared/apps/geos/gcc/3.7.2/bin/geos-config --with-proj-include=/cm/shared/apps/proj/gcc/6.0.0/include/ --with-proj-lib=/cm/shared/apps/proj/gcc/6.0.0/lib/')
Full log:
- installing source package 'sf' ... ** package 'sf' successfully unpacked and MD5 sums checked ** using staged installation configure: CC: gcc configure: CXX: g++ -std=gnu++11 configure: gdal-config set to /cm/shared/apps/gdal/gcc/2.4.1/bin/gdal-config checking gdal-config exists... yes checking gdal-config executable... yes checking gdal-config usability... yes configure: GDAL: 2.4.1 checking GDAL version >= 2.0.1... yes checking for gcc... gcc 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 accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -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: /cm/shared/apps/gdal/gcc/2.4.1/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: GDAL: 2.4.1 configure: pkg-config proj exists, will use it configure: using proj.h. checking PROJ: checking whether PROJ and sqlite3 are available for linking:... yes configure: geos-config set to /cm/shared/apps/geos/gcc/3.7.2/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/cm/shared/apps/geos/gcc/3.7.2/lib -lgeos_c... yes configure: Package CPP flags: -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include configure: Package LIBS: -L/cm/shared/apps/proj/gcc/6.0.0/lib/ -lproj -L/cm/shared/apps/gdal/gcc/2.4.1/lib -lgdal -L/cm/shared/apps/geos/gcc/3.7.2/lib -lgeos_c configure: creating ./config.status config.status: creating src/Makevars ** libs g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c RcppExports.cpp -o RcppExports.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c bbox.cpp -o bbox.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c gdal.cpp -o gdal.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c gdal_geom.cpp -o gdal_geom.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c gdal_read.cpp -o gdal_read.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c gdal_utils.cpp -o gdal_utils.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c gdal_write.cpp -o gdal_write.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c geos.cpp -o geos.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c hex.cpp -o hex.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c mdim.cpp -o mdim.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c ops.cpp -o ops.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c polygonize.cpp -o polygonize.o g++ -std=gnu++11 -I"/cm/shared/apps/R/gcc/4.0.2_20201105/R-4.0.2/build3/lib64/R/include" -DNDEBUG -I/cm/shared/apps/proj/gcc/6.0.0/include/ -DHAVE_PROJ_H -I/cm/shared/apps/gdal/gcc/2.4.1/include -I/cm/shared/apps/geos/gcc/3.7.2/include -I'/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include -fpic -fopenmp -O3 -march=sandybridge -c proj.cpp -o proj.o proj.cpp: In function 'Rcpp::NumericMatrix CPL_proj_direct(Rcpp::CharacterVector, Rcpp::NumericMatrix, bool, bool, bool ': proj.cpp:279:64: error: 'proj_normalize_for_visualization' was not declared in this scope PJ *NewP = proj_normalize_for_visualization(PJ_DEFAULT_CTX, P); ^ make: *** [proj.o] Error 1 ERROR: compilation failed for package 'sf'
- removing '/home2/s205236/R/x86_64-pc-linux-gnu-library/4.0/sf'
The downloaded source packages are in '/tmp/Rtmp1d8BDw/downloaded_packages' Warning message: In install.packages("sf", configure.args = "--with-gdal-config=/cm/shared/apps/gdal/gcc/2.4.1/bin/gdal-config --with-geos-config=/cm/shared/apps/geos/gcc/3.7.2/bin/geos-config --with-proj-include=/cm/shared/apps/proj/gcc/6.0.0/include/ --with-proj-lib=/cm/shared/apps/proj/gcc/6.0.0/lib/") : installation of package 'sf' had non-zero exit status
In case you can't fix this yourself, I would suggest trying to work with more up-to-date versions of PROJ, GDAL and GEOS.