r-spatial / lwgeom

bindings to the liblwgeom library
https://r-spatial.github.io/lwgeom/
58 stars 23 forks source link

configure: error: neither proj.h nor proj_api.h were found. #49

Closed mykmilligan closed 4 years ago

mykmilligan commented 4 years ago

I having problems installing lwgeom for a CentOS 7.3 based HPC cluster. I'm using R 3.6.2 and the following:

R CMD INSTALL lwgeom_0.1-7.tar.gz --configure-args='--with-proj-lib=/source/directory/proj/5.2.0/lib --with-proj-include=/source/directory/proj/5.2.0/include --with-proj-share=/source/directory/proj/5.2.0/share/proj --with-geos-config=/source/directory/geos/3.6.3/bin/geos-config'

Error:

liblwgeom/lwgeom_geos.c:1079:10: error: ‘POSTGIS_GEOS_VERSION’ undeclared (first use in this function) POSTGIS_GEOS_VERSION); ^ liblwgeom/lwgeom_geos.c:1079:10: note: each undeclared identifier is reported only once for each function it appears in make: *** [liblwgeom/lwgeom_geos.o] Error 1 ERROR: compilation failed for package ‘lwgeom’

When I try the newer version of lwgeom: R CMD INSTALL lwgeom_0.2-1.tar.gz --configure-args='--with-proj-lib=/source/directory/proj/6.1.1/lib --with-proj-include=/source/directory/proj/6.1.1/include/ --with-proj-share=/source/directory/proj/6.1.1/share/proj --with-geos-config=/source/directory/geos/3.6.3/bin/geos-config'

I get this error: checking proj.h usability... no checking proj.h presence... no checking for proj.h... no checking proj_api.h usability... no checking proj_api.h presence... no checking for proj_api.h... no configure: error: neither proj.h nor proj_api.h were found. ERROR: configuration failed for package ‘lwgeom’

Do you have any suggestions for resolving these errors?

edzer commented 4 years ago

There is a new version of lwgeom on CRAN, please try that. If neither proj.h nor proj_api.h are found, you have a problem, also with the new version.

mykmilligan commented 4 years ago

I have tried lwgeom_0.1-7 and lwgeom_0.2-1.tar.gz. Each time I pointed to the proj files as listed above. Is there another way that I can point to the proj.h and proj_api.h when installing lwgeom?

edzer commented 4 years ago

I can confirm this.

JonasGeschke commented 4 years ago

having the same problem here ...

error: neither proj.h nor proj_api.h were found.

would be great if you can help.

edzer commented 4 years ago

Please try again installing from github, the problem might have been solved.

JonasGeschke commented 4 years ago

...

Error: Failed to install 'lwgeom' from GitHub: (converted from warning) installation of package 'Rcpp' had non-zero exit status

now tried it without updating Rcpp:

Error: (converted from warning) Setting LC_CTYPE failed, using "C" Execution halted Error: Failed to install 'lwgeom' from GitHub: (converted from warning) installation of package '/tmp/RtmpdKUS8e/file4e364d25965b/lwgeom_0.2-2.tar.gz' had non-zero exit status

edzer commented 4 years ago

OK, but that sounds like a problem with Rcpp, not lwgeom.

edzer commented 4 years ago

@mykmilligan could you give this a try?