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

Support for PROJ 7.0.0 ? #1298

Closed
MatthieuStigler opened this issue Mar 13, 2020 · 1 comment
Closed

Support for PROJ 7.0.0 ? #1298

MatthieuStigler opened this issue Mar 13, 2020 · 1 comment

Comments

@MatthieuStigler
Copy link
Contributor

MatthieuStigler commented Mar 13, 2020

Hi

I unfortunately just got Proj 7.0 installed (on a ubuntu 18.04 machine, due to the latest change in the gdal-data from ppa ubuntugis-unstable).

Trying to compile sf, I get the sort of standard error

configure: error: proj_api.h not found in standard or given locations

This is clearly related to issue #42 for lwgeom and #28 for lwgeom.

It is not clear what I should do however? I tried a to add --configure-args="CFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" as suggested in #42 for lwgeom, which brings me then to:

R CMD INSTALL --configure-args="CFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" sf_0.8-1.tar.gz 

checking proj_api.h presence... no
configure: WARNING: proj_api.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: proj_api.h: proceeding with the compiler's result
checking for proj_api.h... yes
checking for pj_init_plus in -lproj... yes
checking PROJ: epsg found and readable... no
Error: proj/epsg not found
Either install missing proj support files, for example
the proj-nad and proj-epsg RPMs on systems using RPMs,
or if installed but not autodetected, set PROJ_LIB to the
correct path, and if need be use the --with-proj-share=

So I tried to indicate the share library, which I believe would be /usr/share/proj on Ubuntu?

R CMD INSTALL --configure-args="CFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H --with-proj-lib=/usr/bin/lib --with-proj-share=/usr/share/proj/"  sf_0.8-1.tar.gz 

This however gives me exactly the same error! But indeed, looking at the share library /usr/share/proj, it seems there is no such epsg file

$ls /usr/share/proj/e*
/usr/share/proj/egm96_15.gtx

How can I ho ahead? Is it fine to use this DACCEPT_USE_OF_DEPRECATED_PROJ_API_H option? And is there an issue with my proj installation?

Thanks!!

@MatthieuStigler
Copy link
Contributor Author

MatthieuStigler commented Mar 13, 2020

Sorry, I think this is exactly #1288!

Indeed, using just:

 remotes::install_github("r-spatial/sf")

solved it for me!

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

1 participant