-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install error in Docker container based on osgeo/gdal image #1518
Comments
Update: running this command before installing
|
Thank you @Robinlovelace for this patch (and many thanks to @cboettig for his work in rocker-org/geospatial#31), but unfortunately it does not solve in my case (which is quite strange, using Docker). Here below my output: cd /tmp
git clone [email protected]:rocker-org/rocker-versioned2
cd rocker-versioned2
docker run --rm -ti -v $(pwd):/home/rstudio/data rocker/verse /bin/bash
rm -R /rocker_scripts/
ln -s /home/rstudio/data/scripts/ /rocker_scripts
bash /home/rstudio/data/scripts/install_gdal_source.sh
Rscript -e 'install.packages("sf", repos = "https://stat.ethz.ch/CRAN")' (I added two lines - EDIT: in my previous version of the chunk they were in the wrong position - to update the scripts, in particular to ensure Robinlovelace/rocker-versioned2@54af48e to be present).
|
@Robinlovelace I'm seeing the same issue as @ranghetti |
Hi @cboettig and @ranghetti now I'm seeing a different issue. I get: cd /tmp
git clone [email protected]:rocker-org/rocker-versioned2
cd rocker-versioned2
docker run --rm -ti -v $(pwd):/home/rstudio/data rocker/verse /bin/bash
bash /home/rstudio/data/scripts/install_gdal_source.sh
install.packages("sf", repos = "https://cloud.r-project.org")
* installing *source* package ‘sf’ ...
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc
configure: CXX: g++ -std=gnu++11
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘sf’
* removing ‘/usr/local/lib/R/site-library/sf’
* restoring previous ‘/usr/local/lib/R/site-library/sf’
The downloaded source packages are in
‘/tmp/Rtmp96aywq/downloaded_packages’ |
@robin |
I didn't say it was, just reporting the result of what I tried. Initially I thought there was an issue with |
My guess is that you're not focusing exclusively on |
True that. Suggest conversation on this specific issue continues here (even though the changes that result from the discussion will likely be made in https://github.com/rocker-org/rocker-versioned2, lots of repos + lots of issues!): rocker-org/geospatial#31 There is more general discussion here: r-spatial/discuss#35 |
@edzer I'm still seeing the error in
I am not clear why My build recipe is here: https://github.com/rocker-org/rocker-versioned2/blob/master/scripts/install_gdal_source.sh (referenced install scripts are in the same folder), running on ubuntu:focal-based container with no PPAs or other non-standard repos. The recipe for installing GDAL, PROJ, and GEOS from source is based on the one from OSGEO, as noted in the comment, and appears to be a standard install that would put these libraries in a standard location -- i.e. you can see, it writes PROJ files to the corresponding locations in proj seems to run fine by itself, so this does seem to be an issue with |
If you want me to look into this in detail, you need to tell me how to build the docker image, the script you point to is just part of the whole install I guess. From your issue and the script you point to I cannot see whether |
Hi Edzer, yes apologies that's a much better idea than just guessing where config might be looking! The easiest way to reproduce is to grab the
Once at the bash shell inside the container, just install sf:
That should reproduce the error. You could alternatively start a bit farther back by running Docker with the base image:
And then run the gdal install script I mentioned:
if you need to see the logs etc. After that script runs, once again trying to install |
I think the clue lies here: https://trac.osgeo.org/gdal/wiki/BuildingOnUnixGDAL25dev It seems you are trying to install an R spatial stack using some docker setup that was developed to install GDAL properly, but not offer a proper PROJ in addition. In
meaning no |
Thanks @edzer , very helpful. Yes, it looks like the OSGeo recipe is doing the essentially same trick that is described on their wiki you point to, building with renamed symbols for an "internal proj". If I've understood the wiki entry correctly, the purpose that approach is to allow users to allow users to also use prebuilt binaries that have been built against other versions of PROJ (?). That suggested to me that I might be able to simply add a standard PROJ install on top of this image, using vanilla It does seem that the "best" route suggested by the wiki, rebuilding everything against the standard sources (without renamed symbols) ought to work, but haven't had luck with that route. I can build PROJ from source without renamed symbols, and build GDAL from source binding those libs, but still hit the wall on my
Probably not an issue with @Robinlovelace let us continue back over on rocker-org/geospatial#31 |
FYI, I keep a number of docker files for my own purposes (testing...) here: https://github.com/r-spatial/sf/tree/master/inst/docker |
Split-out from rocker-org/geospatial#31 it's not clear why
sf
is not installing on a Docker container with the latest version of GDAL compiled from source. Reproducible example (takes some time - aim is to get pre-built images that will save time when testing against dev GDAL versions):That process runs this bash script adapted from this GDAL Dockerfile by @cboettig. It results in the following error message - that suggests it's a question of
sqlite3
or PROJ but both seem to be installed:The text was updated successfully, but these errors were encountered: