[R-sig-Geo] Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small

Roger Bivand Roger@B|v@nd @end|ng |rom nhh@no
Wed Jan 29 16:06:23 CET 2020


For sp, install from CRAN, or for the development version, remotes::install_github("rsbivand/sp").

Roger

Roger Bivand
Norwegian School of Economics
Bergen, Norway
________________________________
From: Arnaud De Groof <Arnaud.DeGroof using spacebel.be>
Sent: Wednesday, January 29, 2020 4:02:15 PM
To: r-sig-geo using r-project.org <r-sig-geo using r-project.org>; Roger.Bivand using nhh.no <Roger.Bivand using nhh.no>
Subject: RE: [R-sig-Geo] Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small


Thanks Roger,

I have modified the Dockerfile aiming to integrate sqlite3, libsqlite3-dev and rgdal from R-Forge:

RUN R -e "install.packages('rgdal', repos='http://R-Forge.R-project.org', 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', '--with-proj-share=/usr/local/share/proj'))"

Unfortunately, this package have a dependency to 'sp'.

> install.packages('rgdal', repos='http://R-Forge.R-project.org', 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', '--with-proj-share=/usr/local/share/proj'))
Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
Warning: dependency 'sp' is not available
trying URL 'http://R-Forge.R-project.org/src/contrib/rgdal_1.5-3.tar.gz';
Content type 'application/x-gzip' length 1774321 bytes (1.7 MB)
==================================================
downloaded 1.7 MB

ERROR: dependency 'sp' is not available for package 'rgdal'
* removing '/usr/local/lib/R/site-library/rgdal'

The downloaded source packages are in
        '/tmp/Rtmp0aIlx7/downloaded_packages'
Warning message:
In install.packages("rgdal", repos = "http://R-Forge.R-project.org",  :
  installation of package 'rgdal' had non-zero exit status

So, I added the package 'sp' :

RUN R -e "install.packages('sp', repos='http://R-Forge.R-project.org')";

But this package seems not available for the version of R 3.6.2:

install.packages('sp', repos='http://R-Forge.R-project.org')
Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
Warning message:
package 'sp' is not available (for R version 3.6.2)

Solution : downgrade R?

Thanks,

Arnaud


________________________________________
De : Roger Bivand <Roger.Bivand using nhh.no>
Envoy� : mercredi 29 janvier 2020 12:00
� : Arnaud De Groof; r-sig-geo using r-project.org
Objet : Re: [R-sig-Geo] Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small

On Tue, 28 Jan 2020, Roger Bivand wrote:

> 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.

Please try revision 926 from https://clicktime.symantec.com/3DbwF33HwMJWTWsivoeyZxQ6H2?u=https%3A%2F%2Fr-forge.r-project.org%2FR%2F%3Fgroup_id%3D884
once it refreshes (and if the build succeeds); this includes a
non-failing test for sqlite3. Once you report back, I can also modify it
to hard-fail.

Roger

>
> Roger
>
> --
> Roger Bivand
> Norwegian School of Economics
> Helleveien 30, 5045 Bergen, Norway
> Roger.Bivand using nhh.no
>
>
> ________________________________________
> Fra: R-sig-Geo <r-sig-geo-bounces using r-project.org> p� vegne av Arnaud De Groof <Arnaud.DeGroof using spacebel.be>
> Sendt: tirsdag 28. januar 2020 16.46
> Til: r-sig-geo using 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='https://clicktime.symantec.com/3GfSmsMNhbeBczexqVoajwb6H2?u=http%3A%2F%2Fcran.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 'https://clicktime.symantec.com/3MN754oA1SfJBHTyzTfokXH6H2?u=http%3A%2F%2Fcran.rstudio.com%2Fsrc%2Fcontrib%2Fsp_1.3-2.tar.gz';
> Content type 'application/x-gzip' length 1132347 bytes (1.1 MB)
> ==================================================
> downloaded 1.1 MB
>
> trying URL 'https://clicktime.symantec.com/3Er9t6ENqj3etwpXLVu7jiT6H2?u=http%3A%2F%2Fcran.rstudio.com%2Fsrc%2Fcontrib%2Frgdal_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 = "https://clicktime.symantec.com/3GfSmsMNhbeBczexqVoajwb6H2?u=http%3A%2F%2Fcran.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://clicktime.symantec.com/3Ka35BLL2A238jXqRigSBNG6H2?u=https%3A%2F%2Fcloud.r-project.org%2Fbin%2Flinux%2Fubuntu 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='https://clicktime.symantec.com/3GfSmsMNhbeBczexqVoajwb6H2?u=http%3A%2F%2Fcran.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 using r-project.org
> https://clicktime.symantec.com/3EKFV2BJNqorZxbnuyiWfU6H2?u=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-geo
>

--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand using nhh.no
https://clicktime.symantec.com/3ZX1xpwrVfpy8rFktz4yCp6H2?u=https%3A%2F%2Forcid.org%2F0000-0003-2392-6140
https://clicktime.symantec.com/3B7fRQK9gSRQ3cKDJfFaY646H2?u=https%3A%2F%2Fscholar.google.no%2Fcitations%3Fuser%3DAWeghB0AAAAJ%26hl%3Den

------------------------------------------------------------------------------

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.
-------------------------------------------------------------------------------

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list