r-spatial / lwgeom

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

Modified configure.ac to retain CPPFLAGS at final GEOS subsitution #62

Closed justbennet closed 3 years ago

justbennet commented 4 years ago

Line 527 of configure.ac was replacing all the accumulated CPPFLAGS with only those for the GEOS package. Adding the ${CPPFLAGS} to the front of the final substitution so that they are included along with the GEOS PKG_CPPFLAGS seems to work.

All of the changes to configure are a result of running autoreconf.

justbennet commented 4 years ago

For the sake of those who search after. This should fix this problem

trying URL 'https://..../cran/src/contrib/lwgeom_0.2-5.tar.gz'
Content type 'application/octet-stream' length 501653 bytes (489 KB)
==================================================
downloaded 489 KB

* installing *source* package ‘lwgeom’ ...
** package ‘lwgeom’ successfully unpacked and MD5 sums checked
** using staged installation
....
checking proj.h usability... no
checking proj.h presence... no
checking for proj.h... no
checking for pj_init_plus in -lproj... no
configure: error: libproj not found in standard or given locations.
ERROR: configuration failed for package ‘lwgeom’

The real error being detected here is the absence of proj.h, as near as I can tell, and once it is found, the subsequent tests pass.

mikoontz commented 3 years ago

I am getting this error (see https://github.com/r-spatial/lwgeom/issues/64), but this patch doesn't seem to fix it for me. I want to make sure I'm trying to install the patch properly however. I tried both:

remotes::install_github("r-spatial/lwgeom@")

and

remotes::install_github("justbennet/lwgeom")

and still get:

* installing *source* package ‘lwgeom’ ...
** using staged installation
configure: CC: clang
configure: CXX: clang++ -std=gnu++11
configure: pkg-config proj exists, will use it
configure: using proj.h.
configure: PROJ: 7.2.0
checking PROJ: checking whether PROJ and sqlite3 are available for linking:... no
configure: error: libproj not found in standard or given locations.