When libgeos is installed in a location not in the default system search path (as it is on our HPC system, where it is loaded via a module), the configure script fails to add the correct linker flag to the Makeovers file.
Relevant section of configure output:
checking for geos-config... /apps/libraries/geos/3.7.0/el7/AVX512/intel-2018/bin/geos-config
checking geos-config usability... yes
configure: GEOS: 3.7.0
checking GEOS version >= 3.3.0... yes
checking geos_c.h usability... yes
checking geos_c.h presence... yes
checking for geos_c.h... yes
checking geos: linking with -L/apps/libraries/geos/3.7.0/el7/AVX512/intel-2018/lib -lgeos_c... yes
checking for GEOS_init_r in -lgeos_c... yes
configure: Package CPP flags: -I/apps/libraries/proj/4.9.3/el7/AVX512/intel-2018/include -I/apps/libraries/geos/3.7.0/el7/AVX512/intel-2018/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H
configure: Package LIBS: -L/apps/libraries/proj/4.9.3/el7/AVX512/intel-2018/lib -lproj -lgeos_c
But the final compilation step gives:
Manually editing the second line of src/Makevars to include the -L/apps/libraries/geos/3.7.0/el7/AVX512/intel-2018/lib that configure already detected that it needs allows the library to link and install correctly.
I'm not good at autoconf, so I can't tell whether this is configure using some C++/linker flags that are not then used by R CMD INSTALL, or whether it's a logic bug in configure.ac where a variable is forgotten to be set.
When libgeos is installed in a location not in the default system search path (as it is on our HPC system, where it is loaded via a module), the
configurescript fails to add the correct linker flag to theMakeoversfile.Relevant section of
configureoutput:But the final compilation step gives:
Manually editing the second line of
src/Makevarsto include the-L/apps/libraries/geos/3.7.0/el7/AVX512/intel-2018/libthatconfigurealready detected that it needs allows the library to link and install correctly.I'm not good at autoconf, so I can't tell whether this is
configureusing some C++/linker flags that are not then used byR CMD INSTALL, or whether it's a logic bug inconfigure.acwhere a variable is forgotten to be set.