r-spatial / sf

Simple Features for R
https://r-spatial.github.io/sf/
Other
1.35k stars 299 forks source link

Installation fails on Debian 11 (bullseye) for v1.0-10 #2118

Closed benz0li closed 1 year ago

benz0li commented 1 year ago

Describe the bug

Installation fails on Debian 11 (bullseye) for sf v1.0-10.

To Reproduce

Execute

docker build -t r/geospatial .

with the following Dockerfile:

ARG BUILD_ON_IMAGE=registry.gitlab.b-data.ch/r/verse
ARG R_VERSION=4.2.2

FROM ${BUILD_ON_IMAGE}:${R_VERSION}

ARG NCPUS=1

ARG DEBIAN_FRONTEND=noninteractive

ARG BUILD_ON_IMAGE
ARG BUILD_START

ENV PARENT_IMAGE=${BUILD_ON_IMAGE}:${R_VERSION} \
    BUILD_DATE=${BUILD_START}

RUN apt-get update \
  && apt-get install -y --no-install-recommends \
    libfftw3-dev \
    libgdal-dev \
    libgeos-dev \
    libgsl0-dev \
    libhdf4-alt-dev \
    libhdf5-dev \
    libjq-dev \
    libproj-dev \
    libprotobuf-dev \
    libnetcdf-dev \
    libudunits2-dev \
    netcdf-bin \
    postgis \
    protobuf-compiler \
    sqlite3 \
    tk-dev \
  && install2.r --error --skipinstalled -n $NCPUS \
    RNetCDF \
    classInt \
    deldir \
    gstat \
    hdf5r \
    lidR \
    mapdata \
    maptools \
    mapview \
    ncdf4 \
    proj4 \
    raster \
    rgdal \
    rgeos \
    rlas \
    sf \
    sp \
    spacetime \
    spatstat \
    spatialreg \
    spdep \
    stars \
    terra \
    tidync \
    tmap \
    geoR \
    geosphere \
  ## from bioconductor
  && R -e "BiocManager::install('rhdf5', update = FALSE, ask = FALSE)" \
  ## Clean up
  && rm -rf /tmp/* \
  && rm -rf /var/lib/apt/lists/*

If reporting a change from previous versions

Please read https://cran.r-project.org/web/packages/sf/news/news.html first.

Additional context

Installation log (excerpt):

#5 351.0 * installing *source* package ‘sf’ ...
#5 351.0 ** package ‘sf’ successfully unpacked and MD5 sums checked
#5 351.0 ** using staged installation
#5 351.0 configure: CC: gcc
#5 351.0 configure: CXX: g++ -std=gnu++14
#5 351.0 checking for gdal-config... /usr/bin/gdal-config
#5 351.0 checking gdal-config usability... yes
#5 351.0 configure: GDAL: 3.2.2
#5 351.0 checking GDAL version >= 2.0.1... yes
#5 351.0 checking for gcc... gcc
#5 351.0 checking whether the C compiler works... yes
#5 351.0 checking for C compiler default output file name... a.out
#5 351.0 checking for suffix of executables... 
#5 351.0 checking whether we are cross compiling... no
#5 351.0 checking for suffix of object files... o
#5 351.0 checking whether the compiler supports GNU C... yes
#5 351.0 checking whether gcc accepts -g... yes
#5 351.0 checking for gcc option to enable C11 features... none needed
#5 351.0 checking for stdio.h... yes
#5 351.0 checking for stdlib.h... yes
#5 351.0 checking for string.h... yes
#5 351.0 checking for inttypes.h... yes
#5 351.0 checking for stdint.h... yes
#5 351.0 checking for strings.h... yes
#5 351.0 checking for sys/stat.h... yes
#5 351.0 checking for sys/types.h... yes
#5 351.0 checking for unistd.h... yes
#5 351.0 checking for gdal.h... yes
#5 351.0 checking GDAL: linking with --libs only... yes
#5 351.0 checking GDAL: /usr/share/gdal/pcs.csv readable... no
#5 351.0 checking GDAL: checking whether PROJ is available for linking:... yes
#5 351.0 checking GDAL: checking whether PROJ is available fur running:... yes
#5 351.0 configure: GDAL: 3.2.2
#5 351.0 configure: pkg-config proj exists, will use it
#5 351.0 configure: using proj.h.
#5 351.0 configure: PROJ: 7.2.1
#5 351.0 checking PROJ: checking whether PROJ and sqlite3 are available for linking:... yes
#5 351.0 checking for geos-config... /usr/bin/geos-config
#5 351.0 checking geos-config usability... yes
#5 351.0 configure: GEOS: 3.9.0
#5 351.0 checking GEOS version >= 3.4.0... yes
#5 351.0 checking for geos_c.h... yes
#5 351.0 checking geos: linking with -L/usr/lib/aarch64-linux-gnu -lgeos_c... yes
#5 351.0 configure: Package CPP flags:   -DHAVE_PROJ_H -I/usr/include/gdal -I/usr/include
#5 351.0 configure: Package LIBS: -lproj   -L/usr/lib -lgdal -L/usr/lib/aarch64-linux-gnu -lgeos_c
#5 351.0 configure: creating ./config.status
#5 351.0 config.status: creating src/Makevars
#5 351.0 ** libs
#5 351.0 make[1]: Entering directory '/tmp/Rtmpjiou4z/R.INSTALL492b6f3eb0e2/sf/src'
#5 351.0 g++ -std=gnu++14 -I"/usr/local/lib/R/include" -DNDEBUG -DHAVE_PROJ_H -I/usr/include/gdal -I/usr/include -I'/usr/local/lib/R/site-library/Rcpp/include' -I/usr/local/include   -fPIC  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppExports.cpp -o RcppExports.o
#5 351.0 g++ -std=gnu++14 -I"/usr/local/lib/R/include" -DNDEBUG -DHAVE_PROJ_H -I/usr/include/gdal -I/usr/include -I'/usr/local/lib/R/site-library/Rcpp/include' -I/usr/local/include   -fPIC  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c bbox.cpp -o bbox.o
#5 351.0 g++ -std=gnu++14 -I"/usr/local/lib/R/include" -DNDEBUG -DHAVE_PROJ_H -I/usr/include/gdal -I/usr/include -I'/usr/local/lib/R/site-library/Rcpp/include' -I/usr/local/include   -fPIC  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c gdal.cpp -o gdal.o
#5 351.0 gdal.cpp: In function ‘Rcpp::List CPL_crs_parameters(Rcpp::List)’:
#5 351.0 gdal.cpp:328:40: error: no matching function for call to ‘OGRSpatialReference::GetAxis(const char [7], int&, OGRAxisOrientation*, double*)’
#5 351.0   328 |       i, &peOrientation, &pdfConvFactor);
#5 351.0       |                                        ^
#5 351.0 In file included from /usr/include/gdal/ogr_geometry.h:38,
#5 351.0                  from /usr/include/gdal/ogr_feature.h:36,
#5 351.0                  from /usr/include/gdal/gdal_priv.h:80,
#5 351.0                  from gdal.cpp:4:
#5 351.0 /usr/include/gdal/ogr_spatialref.h:257:17: note: candidate: ‘const char* OGRSpatialReference::GetAxis(const char*, int, OGRAxisOrientation*) const’
#5 351.0   257 |     const char *GetAxis( const char *pszTargetKey, int iAxis,
#5 351.0       |                 ^~~~~~~
#5 351.0 /usr/include/gdal/ogr_spatialref.h:257:17: note:   candidate expects 3 arguments, 4 provided
#5 351.0 make[1]: *** [/usr/local/lib/R/etc/Makeconf:178: gdal.o] Error 1
#5 351.0 make[1]: Leaving directory '/tmp/Rtmpjiou4z/R.INSTALL492b6f3eb0e2/sf/src'
#5 351.0 ERROR: compilation failed for package ‘sf’

ℹ️ See also https://gitlab.b-data.ch/r/geospatial/-/jobs/52911.

(Installation succeeds for the 'Ubuntu 22.04 (Jammy)'-based, GPU accelerated image: https://gitlab.b-data.ch/cuda/r/geospatial/-/jobs/52901)

bastistician commented 1 year ago

FWIW, I get the same installation failure on Ubuntu 20.04 (which is based on bullseye). Output from sf::sf_extSoftVersion():

          GEOS           GDAL         proj.4 GDAL_with_GEOS     USE_PROJ_H           PROJ 
       "3.8.0"        "3.0.4"        "6.3.1"         "true"         "true"        "6.3.1" 
edzer commented 1 year ago

Thanks, that should now work.

rCarto commented 1 year ago

I can confirm it was broken and it works now with :

sessionInfo()
#> R version 4.2.2 (2022-10-31)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Debian GNU/Linux 11 (bullseye)
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
#> 
#> locale:
#>  [1] LC_CTYPE=fr_FR.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=fr_FR.UTF-8        LC_COLLATE=fr_FR.UTF-8    
#>  [5] LC_MONETARY=fr_FR.UTF-8    LC_MESSAGES=fr_FR.UTF-8   
#>  [7] LC_PAPER=fr_FR.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C       
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] digest_0.6.31     withr_2.5.0       R.methodsS3_1.8.2 lifecycle_1.0.3  
#>  [5] magrittr_2.0.3    reprex_2.0.2      evaluate_0.20     rlang_1.0.6      
#>  [9] cli_3.6.0         rstudioapi_0.14   fs_1.6.1          R.utils_2.12.2   
#> [13] R.oo_1.25.0       vctrs_0.5.2       styler_1.9.1      rmarkdown_2.20   
#> [17] tools_4.2.2       R.cache_0.16.0    glue_1.6.2        purrr_1.0.1      
#> [21] xfun_0.37         yaml_2.3.7        fastmap_1.1.1     compiler_4.2.2   
#> [25] htmltools_0.5.4   knitr_1.42

Created on 2023-03-13 with reprex v2.0.2

sf::sf_extSoftVersion()
#>           GEOS           GDAL         proj.4 GDAL_with_GEOS     USE_PROJ_H 
#>        "3.9.0"        "3.2.2"        "7.2.1"         "true"         "true" 
#>           PROJ 
#>        "7.2.1"

Created on 2023-03-13 with reprex v2.0.2

dpprdan commented 1 year ago

I get the same error as the OP for the source install on Windows:

c:\rtools42\x86_64-w64-mingw32.static.posix\include\ogr_spatialref.h:258:17: note:   candidate expects 3 arguments, 4 provided
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:260: gdal.o] Error 1
full install log ```r > install.packages("sf") Installing package into ‘C:/Users/Daniel/AppData/Local/R/win-library/4.2’ (as ‘lib’ is unspecified) There is a binary version available but the source version is later: binary source needs_compilation sf 1.0-9 1.0-10 TRUE installing the source package ‘sf’ trying URL 'https://cran.rstudio.com/src/contrib/sf_1.0-10.tar.gz' Content type 'application/x-gzip' length 3482675 bytes (3.3 MB) downloaded 3.3 MB * installing *source* package 'sf' ... ** package 'sf' successfully unpacked and MD5 sums checked ** using staged installation ********************************************** WARNING: this package has a configure script It probably needs manual configuration ********************************************** ** libs rm -f sf.dll RcppExports.o bbox.o gdal.o gdal_geom.o gdal_read.o gdal_utils.o gdal_write.o geos.o hex.o mdim.o ops.o polygonize.o proj.o proj_info.o raster2sf.o sfc-sfg.o signed_area.o stars.o wkb.o zm_range.o cp -r "C:/rtools42/x86_64-w64-mingw32.static.posix/share/gdal" ../inst/ cp -r "C:/rtools42/x86_64-w64-mingw32.static.posix/share/proj" ../inst/ g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c bbox.cpp -o bbox.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c gdal.cpp -o gdal.o gdal.cpp: In function 'Rcpp::List CPL_crs_parameters(Rcpp::List)': gdal.cpp:328:40: error: no matching function for call to 'OGRSpatialReference::GetAxis(const char [7], int&, OGRAxisOrientation*, double*)' 328 | i, &peOrientation, &pdfConvFactor); | ^ In file included from c:\rtools42\x86_64-w64-mingw32.static.posix\include\ogr_geometry.h:38, from c:\rtools42\x86_64-w64-mingw32.static.posix\include\ogr_feature.h:36, from c:\rtools42\x86_64-w64-mingw32.static.posix\include\gdal_priv.h:80, from gdal.cpp:4: c:\rtools42\x86_64-w64-mingw32.static.posix\include\ogr_spatialref.h:258:17: note: candidate: 'const char* OGRSpatialReference::GetAxis(const char*, int, OGRAxisOrientation*) const' 258 | const char *GetAxis( const char *pszTargetKey, int iAxis, | ^~~~~~~ c:\rtools42\x86_64-w64-mingw32.static.posix\include\ogr_spatialref.h:258:17: note: candidate expects 3 arguments, 4 provided make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:260: gdal.o] Error 1 ERROR: compilation failed for package 'sf' * removing 'C:/Users/Daniel/AppData/Local/R/win-library/4.2/sf' * restoring previous 'C:/Users/Daniel/AppData/Local/R/win-library/4.2/sf' Warning in install.packages : installation of package ‘sf’ had non-zero exit status ```

This seems to be fixed in the dev version, but I get another error when trying to install that dev version.

g++ -std=gnu++11 -shared -s -static-libgcc -o sf.dll tmp.def RcppExports.o bbox.o gdal.o gdal_geom.o gdal_read.o gdal_utils.o gdal_write.o geos.o hex.o mdim.o ops.o polygonize.o proj.o proj_info.o raster2sf.o sfc-sfg.o signed_area.o stars.o wkb.o zm_range.o -fopenmp -lgdal -larmadillo -lopenblas -lgfortran -lquadmath -lpq -lpgcommon -lpgport -lodbc32 -lodbccp32 -lblosc -lkea -lhdf5_cpp -lhdf5 -lpoppler -llcms2 -lfreetype -lharfbuzz -lfreetype -llz4 -lpcre2-8 -lxml2 -lopenjp2 -lnetcdf -lmysqlclient -lspatialite -lgeos_c -lgeos -lminizip -lgeos -ljson-c -lgta -lfreexl -lexpat -lssl -lpsapi -lgif -lmfhdf -lhdf5_hl -lcrypto -lportablexdr -ldf -lhdf5 -lsz -lpng16 -lpng -lpoppler -llcms2 -lfreetype -lharfbuzz -lfreetype -llz4 -lpcre2-8 -lpcre -lcurl -lbcrypt -lrtmp -lssl -lssh2 -lidn2 -lunistring -liconv -lgcrypt -lcrypto -lgpg-error -lws2_32 -ltiff -llzma -ljpeg -lz -lcfitsio -lzstd -lwebpdecoder -lwebp -lsbml-static -lgeotiff -lproj -lsqlite3 -lbz2 -lcrypt32 -lwldap32 -lsecur32 -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA~1/R/R-42~1.2/bin/x64 -lR
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: cannot find -lblosc
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: cannot find -lkea
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: cannot find -lsz
collect2.exe: error: ld returned 1 exit status
no DLL was created
full install log ```r > remotes::install_github("r-spatial/sf") Downloading GitHub repo r-spatial/sf@HEAD ── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────────── ✔ checking for file 'C:\Temp\R\RtmpGKr7eh\remotes1f6468e61551\r-spatial-sf-7ffaee8/DESCRIPTION' (766ms) ─ preparing 'sf': (3.7s) ✔ checking DESCRIPTION meta-information ... ─ cleaning src ─ checking for LF line-endings in source and make files and shell scripts (771ms) ─ checking for empty or unneeded directories ─ building 'sf_1.0-11.tar.gz' Warning: file 'sf/cleanup' did not have execute permissions: corrected Warning: file 'sf/configure' did not have execute permissions: corrected Installing package into ‘C:/Users/Daniel/AppData/Local/R/win-library/4.2’ (as ‘lib’ is unspecified) * installing *source* package 'sf' ... ** using staged installation ********************************************** WARNING: this package has a configure script It probably needs manual configuration ********************************************** ** libs rm -f sf.dll RcppExports.o bbox.o gdal.o gdal_geom.o gdal_read.o gdal_utils.o gdal_write.o geos.o hex.o mdim.o ops.o polygonize.o proj.o proj_info.o raster2sf.o sfc-sfg.o signed_area.o stars.o wkb.o zm_range.o cp -r "C:/rtools42/x86_64-w64-mingw32.static.posix/share/gdal" ../inst/ cp -r "C:/rtools42/x86_64-w64-mingw32.static.posix/share/proj" ../inst/ g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c bbox.cpp -o bbox.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c gdal.cpp -o gdal.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c gdal_geom.cpp -o gdal_geom.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c gdal_read.cpp -o gdal_read.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c gdal_utils.cpp -o gdal_utils.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c gdal_write.cpp -o gdal_write.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c geos.cpp -o geos.o geos.cpp: In function 'Rcpp::List CPL_geos_op(std::string, Rcpp::List, Rcpp::NumericVector, Rcpp::IntegerVector, Rcpp::NumericVector, Rcpp::LogicalVector, int, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::NumericVector, Rcpp::LogicalVector)': geos.cpp:807:10: warning: unused variable 'ratio' [-Wunused-variable] 807 | double ratio = bufferDist[0]; | ^~~~~ geos.cpp:808:16: warning: unused variable 'allowHoles' [-Wunused-variable] 808 | unsigned int allowHoles = preserveTopology[0]; | ^~~~~~~~~~ g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c hex.cpp -o hex.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c mdim.cpp -o mdim.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c ops.cpp -o ops.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c polygonize.cpp -o polygonize.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c proj.cpp -o proj.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c proj_info.cpp -o proj_info.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c raster2sf.cpp -o raster2sf.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c sfc-sfg.cpp -o sfc-sfg.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c signed_area.cpp -o signed_area.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c stars.cpp -o stars.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c wkb.cpp -o wkb.o g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -DHAVE_PROJ_H -I'C:/Users/Daniel/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c zm_range.cpp -o zm_range.o g++ -std=gnu++11 -shared -s -static-libgcc -o sf.dll tmp.def RcppExports.o bbox.o gdal.o gdal_geom.o gdal_read.o gdal_utils.o gdal_write.o geos.o hex.o mdim.o ops.o polygonize.o proj.o proj_info.o raster2sf.o sfc-sfg.o signed_area.o stars.o wkb.o zm_range.o -fopenmp -lgdal -larmadillo -lopenblas -lgfortran -lquadmath -lpq -lpgcommon -lpgport -lodbc32 -lodbccp32 -lblosc -lkea -lhdf5_cpp -lhdf5 -lpoppler -llcms2 -lfreetype -lharfbuzz -lfreetype -llz4 -lpcre2-8 -lxml2 -lopenjp2 -lnetcdf -lmysqlclient -lspatialite -lgeos_c -lgeos -lminizip -lgeos -ljson-c -lgta -lfreexl -lexpat -lssl -lpsapi -lgif -lmfhdf -lhdf5_hl -lcrypto -lportablexdr -ldf -lhdf5 -lsz -lpng16 -lpng -lpoppler -llcms2 -lfreetype -lharfbuzz -lfreetype -llz4 -lpcre2-8 -lpcre -lcurl -lbcrypt -lrtmp -lssl -lssh2 -lidn2 -lunistring -liconv -lgcrypt -lcrypto -lgpg-error -lws2_32 -ltiff -llzma -ljpeg -lz -lcfitsio -lzstd -lwebpdecoder -lwebp -lsbml-static -lgeotiff -lproj -lsqlite3 -lbz2 -lcrypt32 -lwldap32 -lsecur32 -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA~1/R/R-42~1.2/bin/x64 -lR C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: cannot find -lblosc C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: cannot find -lkea C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: cannot find -lsz collect2.exe: error: ld returned 1 exit status no DLL was created ERROR: compilation failed for package 'sf' * removing 'C:/Users/Daniel/AppData/Local/R/win-library/4.2/sf' * restoring previous 'C:/Users/Daniel/AppData/Local/R/win-library/4.2/sf' Warning message: In i.p(...) : installation of package ‘C:/Temp/R/RtmpGKr7eh/file1f6461fc17bd/sf_1.0-11.tar.gz’ had non-zero exit stat ```
session info ```r > sessioninfo::session_info() ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────────── setting value version R version 4.2.2 (2022-10-31 ucrt) os Windows 10 x64 (build 19044) system x86_64, mingw32 ui RStudio language en collate German_Germany.utf8 ctype German_Germany.utf8 tz Europe/Berlin date 2023-03-13 rstudio 2022.12.0+353 Elsbeth Geranium (desktop) pandoc 3.1.1 @ C:\\PROGRA~1\\Pandoc\\pandoc.exe ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── package * version date (UTC) lib source callr 3.7.3 2022-11-02 [1] CRAN (R 4.2.2) cli 3.6.0 2023-01-09 [1] CRAN (R 4.2.2) crayon 1.5.2 2022-09-29 [1] RSPM curl 5.0.0 2023-01-12 [1] CRAN (R 4.2.2) desc 1.4.2 2022-09-08 [1] CRAN (R 4.2.1) pkgbuild 1.4.0 2022-11-27 [1] CRAN (R 4.2.2) prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.2.0) processx 3.8.0 2022-10-26 [1] CRAN (R 4.2.1) ps 1.7.2 2022-10-26 [1] CRAN (R 4.2.1) R6 2.5.1 2021-08-19 [1] CRAN (R 4.2.0) remotes 2.4.2 2021-11-30 [1] CRAN (R 4.2.0) rprojroot 2.0.3 2022-04-02 [1] CRAN (R 4.2.0) rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.2.1) sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.0) withr 2.5.0 2022-03-03 [1] CRAN (R 4.2.0) [1] C:/Users/Daniel/AppData/Local/R/win-library/4.2 [2] C:/Program Files/R/R-4.2.2/library ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ```
edzer commented 1 year ago

With winbuilder, it installs fine with both r-release and r-devel (links will expire in a week).

edzer commented 1 year ago

@dpprdan blosc and kea were added in rtools42 revision 5355: https://cran.r-project.org/bin/windows/Rtools/rtools42/news.html

dpprdan commented 1 year ago

@edzer Thanks, the latest rtools42 did it, and sorry for the extra work!

I guess, I still had rtools42-5168-5107.exe installed.

This is extra ☹️, because I had a hunch that it might be due to Rtools and wanted to report its version, but apparently that cannot be easily queried. Rtools not being fully versioned (i.e. it's displaying the same ARP entry for all 4.2 versions) does not help much either, I suppose (not least because else it would have been updated via winget on my machine).

benz0li commented 1 year ago

Thanks, that should now work.

@edzer I will close this issue as soon as https://cran.r-project.org/package=sf is updated to a new version allowing to install on Debian 11.

jennybc commented 1 year ago

Is a release with this fix something that will happen soon-ish? I'm noticing it affects all of the revdep check machinery used by the tidyverse team, meaning we fail to check anything that depends on sf, directly or indirectly. I can imagine a workaround that would install dev sf, but if this will self-resolve pretty quickly, that's even better.

Update: it is a hypothesis that this is why sf is failing to install. It could also be something else, but it's hard for me to get more detailed information.

rsbivand commented 1 year ago

The main problem is the use of GDAL< 3.0.4. 3.6.3 was released recently, 3.7.0 is imminent. A check for a needed function from GDAL tested against 3.0.0, should have been 3.0.4, is with @edzer 's commit yesterday.

edzer commented 1 year ago

should have been 3.0.4

no, 3.4.0, which is quite a leap. Will try to get a fix on CRAN soon!

jennybc commented 1 year ago

Just to follow up, I did eventually dig deep enough to confirm that, yeah, this is the problem, in terms of our revdep check tooling.

benz0li commented 1 year ago

Will try to get a fix on CRAN soon!

🔬 https://nx10.github.io/cransubs/

edzer commented 1 year ago

1.0-11 submitted!

benz0li commented 1 year ago

1.0-11 submitted!

Rejected: https://nx10.github.io/cransubs/pkg#sf_2023-03-14T21%3A08%3A06Z

edzer commented 1 year ago

No, accepted.

benz0li commented 1 year ago

@edzer Thank you.