Skip to content
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

CRAN install fails with PROJ 6.1 #11

Closed
rsbivand opened this issue May 24, 2019 · 5 comments
Closed

CRAN install fails with PROJ 6.1 #11

rsbivand opened this issue May 24, 2019 · 5 comments

Comments

@rsbivand
Copy link
Contributor

Unfortunately:

> sf::sf_extSoftVersion()
          GEOS           GDAL         proj.4 GDAL_with_GEOS 
       "3.7.2"        "3.0.0"        "6.1.0"         "true" 
> install.packages("gdalcubes")
Installing package into ‘/home/rsb/lib/r_libs’
(as ‘lib’ is unspecified)
trying URL 'https://cran.uib.no/src/contrib/gdalcubes_0.1.0.tar.gz'
Content type 'application/x-gzip' length 2761840 bytes (2.6 MB)
==================================================
downloaded 2.6 MB

* installing *source* package ‘gdalcubes’ ...
** package ‘gdalcubes’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.0.0
checking GDAL version >= 2.0.1... yes
checking gdal: linking with --libs only... yes
checking GDAL: gdal-config data directory readable... yes
checking GDAL: /usr/local/share/gdal/pcs.csv readable... no
configure: error: pcs.csv not found in GDAL data directory.
ERROR: configuration failed for package ‘gdalcubes’
* removing ‘/home/rsb/lib/r_libs/gdalcubes’

The downloaded source packages are in
	‘/tmp/Rtmp9t6Bzy/downloaded_packages’
Warning message:
In install.packages("gdalcubes") :
  installation of package ‘gdalcubes’ had non-zero exit status

With master, a different failure (Fedora 29):

> remotes::install_github("appelmar/gdalcubes_R")
Downloading GitHub repo appelmar/gdalcubes_R@master
   checking for file ‘/tmp/Rtmp9t6Bzy/remotesb9d14bed1b8/appelmar-gdalcubes_R-e4✔  checking for file ‘/tmp/Rtmp9t6Bzy/remotesb9d14bed1b8/appelmar-gdalcubes_R-e4ff0c4/DESCRIPTION’
─  preparing ‘gdalcubes’:
✔  checking DESCRIPTION meta-information ... 
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Removed empty directory ‘gdalcubes/src/gdalcubes’
─  building ‘gdalcubes_0.1.0.tar.gz’
   
Installing package into ‘/home/rsb/lib/r_libs’
(as ‘lib’ is unspecified)
* installing *source* package ‘gdalcubes’ ...
** using staged installation
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config exists... yes
checking pkg-config knows gdal... yes
configure: GDAL_CFLAGS=-I/usr/local/include 
configure: GDAL_LIBS=-L/usr/local/lib -lgdal 
checking pkg-config knows proj... yes
configure: PROJ_CFLAGS=-I/usr/local/include 
configure: PROJ_LIBS=-L/usr/local/lib -lproj 
checking pkg-config knows netcdf... yes
configure: NC_CFLAGS=
configure: NC_LIBS=-lnetcdf 
checking pkg-config knows libcurl... yes
configure: CURL_CFLAGS= -I/usr/include/curl
configure: CURL_LIBS=-lcurl 
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
...
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking iostream.h usability... no
checking iostream.h presence... no
checking for iostream.h... no
configure: Package CPP flags:   -I/usr/local/include   -I/usr/local/include   -I/usr/include/curl -DR_PACKAGE
configure: Package LIBS:  -L/usr/local/lib -lgdal  -lnetcdf  -L/usr/local/lib -lproj  -lcurl 
configure: creating ./config.status
config.status: creating src/Makevars
** libs
make: *** No rule to make target 'gdalcubes/src/apply_pixel.o', needed by 'gdalcubes.so'.  Stop.
ERROR: compilation failed for package ‘gdalcubes’
* removing ‘/home/rsb/lib/r_libs/gdalcubes’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/tmp/Rtmp9t6Bzy/fileb9d5887331b/gdalcubes_0.1.0.tar.gz’ had non-zero exit status
@appelmar
Copy link
Owner

Thanks, the second failure is most likely caused by install_github not cloning the git submodule under src/gdalcubes. Typically devtools::install_git("https://github.com/appelmar/gdalcubes_R", args="--recursive") should work. However, the master branch now points to the CRAN release, meaning that you will likely end up with the first issue.

I saw that you solved some GDAL / PROJ issues for rgdal and sf (r-spatial/sf#988). AFAICS, updating configure.ac accordingly will fix this.

@appelmar
Copy link
Owner

@rsbivand I missed it so far but please let me know if you want to be listed as a contributor to the package, some parts of the configure.ac originate from rgdal.

@rsbivand
Copy link
Contributor Author

I created a PR, but although master and CRAN with the new files get to trying to build the libs, both fail with:

** libs
make: *** No rule to make target 'gdalcubes/src/apply_pixel.o', needed by 'gdalcubes.so'.  Stop.
ERROR: compilation failed for package ‘gdalcubes’

** libs
make: *** No rule to make target 'gdalcubes/src/apply_pixel.o', needed by 'gdalcubes.so'.  Stop.
ERROR: compilation failed for package ‘gdalcubes’

@appelmar
Copy link
Owner

Great, many thanks! It builds successfully on my machine with GDAL 3.0.0 and proj 6.1.0 on Ubuntu 18.04.

Are there any files under src/gdalcubes in your local working copy? If not, can you run

git submodule init
git submodule update

within your local working copy and try again?

@rsbivand
Copy link
Contributor Author

Yes, that looks better, INSTALL ran correctly.

appelmar added a commit that referenced this issue May 25, 2019
copied current rgdal check for version wrt pcs.csv #11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants