Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small

Arnaud De Groof

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
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small

Roger Bivand
Administrator
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
[hidden email]


________________________________________
Fra: R-sig-Geo <[hidden email]> på vegne av Arnaud De Groof <[hidden email]>
Sendt: tirsdag 28. januar 2020 16.46
Til: [hidden email]
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
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small

Roger Bivand
Administrator
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://r-forge.r-project.org/R/?group_id=884 
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
> [hidden email]
>
>
> ________________________________________
> Fra: R-sig-Geo <[hidden email]> på vegne av Arnaud De Groof <[hidden email]>
> Sendt: tirsdag 28. januar 2020 16.46
> Til: [hidden email]
> 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
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-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: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small

Arnaud De Groof

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 <[hidden email]>
Envoyé : mercredi 29 janvier 2020 12:00
À : Arnaud De Groof; [hidden email]
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
> [hidden email]
>
>
> ________________________________________
> Fra: R-sig-Geo <[hidden email]> på vegne av Arnaud De Groof <[hidden email]>
> Sendt: tirsdag 28. januar 2020 16.46
> Til: [hidden email]
> 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
> [hidden email]
> 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: [hidden email]
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.
-------------------------------------------------------------------------------

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small

Roger Bivand
Administrator
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 <[hidden email]>
Sent: Wednesday, January 29, 2020 4:02:15 PM
To: [hidden email] <[hidden email]>; [hidden email] <[hidden email]>
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 <[hidden email]>
Envoy� : mercredi 29 janvier 2020 12:00
� : Arnaud De Groof; [hidden email]
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
> [hidden email]
>
>
> ________________________________________
> Fra: R-sig-Geo <[hidden email]> p� vegne av Arnaud De Groof <[hidden email]>
> Sendt: tirsdag 28. januar 2020 16.46
> Til: [hidden email]
> 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
> [hidden email]
> 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: [hidden email]
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]]


_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small

Arnaud De Groof


There is alway an error with the installation of rgdal. Is it linked to an issue in the definition of the arguments ('with-proj-lib','with-proj-share',..)?

 install.packages('rgdal', repos='http://R-Forge.R-project.org', configure.args = c('--with-gdal-config=/usr/bin/gdal-config', '--with-proj-include=/usr/local/include', '--with-proj-lib=/usr/local/share/proj', '--with-proj-share=/usr/local/share/proj'))
Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
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

* installing *source* package 'rgdal' ...
** 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.5-3
checking for /usr/bin/svnversion... no
cat: inst/SVN_VERSION: No such file or directory
configure: svn revision: 
configure: gdal-config set to /usr/bin/gdal-config
checking gdal-config exists... yes
checking gdal-config executable... yes
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/stateplane.csv readable... yes
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/share/proj 
checking PROJ header API:... proj_api.h
checking proj_api.h presence and usability... yes
checking PROJ version agreement... yes
checking Using GDAL < 3 with PROJ >= 6... no
checking PROJ version >= 4.8.0... yes
configure: PROJ_LIB: /usr/local/share/proj
checking for gcc... gcc -std=gnu99
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 -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /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 sqlite3.h usability... yes
checking sqlite3.h presence... yes
checking for sqlite3.h... yes
checking for sqlite3_libversion in -lsqlite3... yes
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/share/proj -lproj -lsqlite3
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/share/proj -lproj -lsqlite3 -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_create
Error: loading failed
Execution halted
ERROR: loading failed
* removing '/usr/local/lib/R/site-library/rgdal'



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





De : Roger Bivand <[hidden email]>
Envoyé : mercredi 29 janvier 2020 16:06
À : [hidden email]; Arnaud De Groof
Objet : Re: [R-sig-Geo] Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small
 
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 <[hidden email]>
Sent: Wednesday, January 29, 2020 4:02:15 PM
To: [hidden email] <[hidden email]>; [hidden email] <[hidden email]>
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


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

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
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Error in the installation of rgdal on the docker osgeo/gdal:ubuntu-small

Roger Bivand
Administrator
Please post plain text only.

I am not going to waste time installing the docker image on a desktop
machine in my office when I'm not there. You can easily check out the SVN
source of the package, debug your system, and contribute your patch back.

You have not motivated your need to install in this way, nor have I seen
any contributions to the development marathon of adapting sp/rgdal or sf
to PROJ6/GDAL3:
https://www.youtube.com/watch?v=Rgn4Ns2UgAg&list=PLXUoTpMa_9s10NVk4dBQljNOaOXAOhcE0&index=4&t=0s

Your implicit affiliation is with a company, you can helpfully debug this
and contribute back - you do not seem to be reading around this problem,
but push it back to me as maintainer regardless. It is your problem on
your odddish configuration. I look forward to receiving patches for the
SVN repo.

If you think that:

'--with-proj-lib=/usr/local/share/proj'

looks odd (it does, '--with-proj-lib=/usr/local/lib' is much more likely,
and if you register proj.pc with pkg-config, you  don't need to use those
configure arguments), you are the best person to try alternatives.

Further, the error message now looks like multiple installed versions of
the proj shared object: https://github.com/r-spatial/sf/issues/844.

For an alternative docker image, see
https://github.com/r-spatial/discuss/issues/28#issuecomment-551241421 -
correct GDAL and PROJ versions to current.

On Wed, 29 Jan 2020, Arnaud De Groof wrote:

>
>
> ​There is alway an error with the installation of rgdal. Is it linked to an
> issue in the definition of the arguments
> ('with-proj-lib','with-proj-share',..)?
>
> ​ install.packages('rgdal', repos='http://R-Forge.R-project.org',
> configure.args = c('--with-gdal-config=/usr/bin/gdal-config',
> '--with-proj-include=/usr/local/include',
> '--with-proj-lib=/usr/local/share/proj',
> '--with-proj-share=/usr/local/share/proj'))
> Installing package into '/usr/local/lib/R/site-library'
> (as 'lib' is unspecified)
> 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
>
> * installing *source* package 'rgdal' ...
> ** 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.5-3
> checking for /usr/bin/svnversion... no
> cat: inst/SVN_VERSION: No such file or directory
> configure: svn revision: 
> configure: gdal-config set to /usr/bin/gdal-config
> checking gdal-config exists... yes
> checking gdal-config executable... yes
> 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/stateplane.csv readable... yes
> 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/share/proj 
> checking PROJ header API:... proj_api.h
> checking proj_api.h presence and usability... yes
> checking PROJ version agreement... yes
> checking Using GDAL < 3 with PROJ >= 6... no
> checking PROJ version >= 4.8.0... yes
> configure: PROJ_LIB: /usr/local/share/proj
> checking for gcc... gcc -std=gnu99
> 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 -std=gnu99 accepts -g... yes
> checking for gcc -std=gnu99 option to accept ISO C89... none needed
> checking how to run the C preprocessor... gcc -std=gnu99 -E
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /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 sqlite3.h usability... yes
> checking sqlite3.h presence... yes
> checking for sqlite3.h... yes
> checking for sqlite3_libversion in -lsqlite3... yes
> 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/share/proj -lproj
> -lsqlite3
> 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/share/proj -lproj
> -lsqlite3 -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_create
> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing '/usr/local/lib/R/site-library/rgdal'
> > 
> > 
>
> The downloaded source packages are in
>         '/tmp/Rtmpvt7qpB/downloaded_packages'
> Warning message:
> In install.packages("rgdal", repos = "http://R-Forge.R-project.org",  :
>   installation of package 'rgdal' had non-zero exit status
>
>
>
>
> ____________________________________________________________________________
> De : Roger Bivand <[hidden email]>
> Envoyé : mercredi 29 janvier 2020 16:06
> À : [hidden email]; Arnaud De Groof
> Objet : Re: [R-sig-Geo] Error in the installation of rgdal on the docker
> osgeo/gdal:ubuntu-small  
> 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 <[hidden email]>
> Sent: Wednesday, January 29, 2020 4:02:15 PM
> To: [hidden email] <[hidden email]>; [hidden email]
> <[hidden email]>
> 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/g
> dal', '--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/g
> dal', '--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
>
>
> ---------------------------------------------------------------------------
> ---
>
> 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.
> ---------------------------------------------------------------------------
> ----
>
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway