Thanks for this. The configure script does not check that sqlite is available, and should do that. For now, make sqlite available in the image (PROJ needs it from PROJ 6). Did you know that you are pulling GDAL 3.1.0, which has not been released or checked with R packages (not the problem here)? If the problem with the configure failure gets resolved, you'll need to install from rgdal from R-Forge, no more patch releases for 1.4.*. If you want to experiment with WKT2 CRS, also grab sp from my github master.
Roger -- Roger Bivand Norwegian School of Economics Helleveien 30, 5045 Bergen, Norway roger.biv...@nhh.no ________________________________________ Fra: R-sig-Geo <r-sig-geo-boun...@r-project.org> på vegne av Arnaud De Groof <arnaud.degr...@spacebel.be> Sendt: tirsdag 28. januar 2020 16.46 Til: r-sig-geo@r-project.org Emne: [R-sig-Geo] Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small Hi, I am trying to install the rgdal package on a docker image based on osgeo/gdal:ubuntu-small (latest) but I encounter the following issue: > install.packages('rgdal', repos='http://cran.rstudio.com', configure.args = > c('--with-gdal-config=/usr/bin/gdal-config','--with-gdal-share=/usr/share/gdal', > '--with-proj-include=/usr/include', '--with-proj-lib=/usr/share/proj')) Installing package into '/usr/local/lib/R/site-library' (as 'lib' is unspecified) also installing the dependency 'sp' trying URL 'http://cran.rstudio.com/src/contrib/sp_1.3-2.tar.gz' Content type 'application/x-gzip' length 1132347 bytes (1.1 MB) ================================================== downloaded 1.1 MB trying URL 'http://cran.rstudio.com/src/contrib/rgdal_1.4-8.tar.gz' Content type 'application/x-gzip' length 1698902 bytes (1.6 MB) ================================================== downloaded 1.6 MB * installing *source* package 'sp' ... ** package 'sp' successfully unpacked and MD5 sums checked ** using staged installation ** libs gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Rcentroid.c -o Rcentroid.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c gcdist.c -o gcdist.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c init.c -o init.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c pip.c -o pip.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c pip2.c -o pip2.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c sp_xports.c -o sp_xports.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c surfaceArea.c -o surfaceArea.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c zerodist.c -o zerodist.o gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o sp.so Rcentroid.o gcdist.o init.o pip.o pip2.o sp_xports.o surfaceArea.o zerodist.o -L/usr/lib/R/lib -lR installing to /usr/local/lib/R/site-library/00LOCK-sp/00new/sp/libs ** R ** data ** demo ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (sp) * installing *source* package 'rgdal' ... ** package 'rgdal' successfully unpacked and MD5 sums checked ** using staged installation configure: R_HOME: /usr/lib/R configure: CC: gcc -std=gnu99 configure: CXX: g++ -std=gnu++11 configure: C++11 support available configure: rgdal: 1.4-7 checking for /usr/bin/svnversion... no configure: svn revision: 845 checking for gdal-config... /usr/bin/gdal-config checking gdal-config usability... yes configure: GDAL: 3.1.0 checking GDAL version >= 1.11.4... yes checking GDAL version <= 2.5 or >= 3.0... yes checking gdal: linking with --libs only... yes checking GDAL: gdal-config data directory readable... yes checking GDAL: /usr/share/gdal/pcs.csv readable... no configure: pkg-config proj exists, will use it configure: PROJ version: 6.3.0 configure: Support for PROJ >= 6.0.0 not yet available, deprecated API defined configure: proj CPP flags: -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I/usr/local/include configure: PROJ LIBS: -L/usr/local/lib -lproj checking PROJ header API:... proj_api.h checking proj_api.h presence and usability... yes checking PROJ version agreement... yes checking PROJ version >= 4.8.0... yes /usr/bin/ld: cannot find -lsqlite3 collect2: error: ld returned 1 exit status ./configure: line 2437: ./proj_conf_test2: No such file or directory checking PROJ: proj.db found and readable... yes configure: Package CPP flags: -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H configure: Package LIBS: -L/usr/lib -lgdal -L/usr/local/lib -lproj configure: creating ./config.status config.status: creating src/Makevars ** libs g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c OGR_write.cpp -o OGR_write.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c gdal-bindings.cpp -o gdal-bindings.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c init.c -o init.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c inverser.c -o inverser.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c local_stubs.c -o local_stubs.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c ogr_geom.cpp -o ogr_geom.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c ogr_polygons.c -o ogr_polygons.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c ogr_proj.cpp -o ogr_proj.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c ogrdrivers.cpp -o ogrdrivers.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c ogrsource.cpp -o ogrsource.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c proj_info6.cpp -o proj_info6.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/include -I/usr/local/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -I"/usr/local/lib/R/site-library/sp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c projectit.cpp -o projectit.o g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o rgdal.so OGR_write.o gdal-bindings.o init.o inverser.o local_stubs.o ogr_geom.o ogr_polygons.o ogr_proj.o ogrdrivers.o ogrsource.o proj_info6.o projectit.o -L/usr/lib -lgdal -L/usr/local/lib -lproj -L/usr/lib/R/lib -lR installing to /usr/local/lib/R/site-library/00LOCK-rgdal/00new/rgdal/libs ** R ** data ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location Error: package or namespace load failed for 'rgdal' in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/usr/local/lib/R/site-library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so': /usr/local/lib/R/site-library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so: undefined symbol: proj_list_operations Error: loading failed Execution halted ERROR: loading failed * removing '/usr/local/lib/R/site-library/rgdal' The downloaded source packages are in '/tmp/RtmpeD6Lq2/downloaded_packages' Warning message: In install.packages("rgdal", repos = "http://cran.rstudio.com", : installation of package 'rgdal' had non-zero exit status Here the dockerfile: FROM osgeo/gdal:ubuntu-small-latest ENV DEBIAN_FRONTEND=noninteractive ####################### ### Install RUN apt-get update && apt-get install -y\ zip\ bc\ curl\ lsb-release\ libfreetype6\ #r-base\ default-jre\ pkg-config\ wget\ git\ libproj-dev\ proj-data\ proj-bin\ libcurl4-openssl-dev\ python-pip && \ pip install pip==9.0.1 && \ pip install\ numpy==1.14.1 \ Jinja2 \ geojson \ requests \ rasterstats \ pandas \ pyshp \ Pillow \ scipy RUN apt install -y apt-transport-https software-properties-common RUN gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 RUN gpg -a --export E298A3A825C0D65DFD57CBB651716619E084DAB9 | apt-key add - RUN add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/' && \ apt-get update RUN apt install -y r-base r-base-core r-recommended RUN R --version ENV GDAL_DATA /usr/share/gdal/ ENV PROJ_LIB /usr/share/proj/ RUN R -e "install.packages('rgdal', repos='http://cran.rstudio.com', configure.args = c('--with-gdal-config=/usr/bin/gdal-config','--with-gdal-share=/usr/share/gdal', '--with-proj-include=/usr/include', '--with-proj-lib=/usr/share/proj'))" Thanks, Arnaud ------------------------------------------------------------------------------ E-MAIL DISCLAIMER The present message may contain confidential and/or legally privileged information. If you are not the intended addressee and in case of a transmission error, please notify the sender immediately and destroy this E-mail. Disclosure, reproduction or distribution of this document and its possible attachments is strictly forbidden. SPACEBEL denies all liability for incomplete, improper, inaccurate, intercepted, (partly) destroyed, lost and/or belated transmission of the current information given that unencrypted electronic transmission cannot currently be guaranteed to be secure or error free. Upon request or in conformity with formal, contractual agreements, an originally signed hard copy will be sent to you to confirm the information contained in this E-mail. SPACEBEL denies all liability where E-mail is used for private use. SPACEBEL cannot be held responsible for possible viruses that might corrupt this message and/or your computer system. ------------------------------------------------------------------------------- _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo