Closed cmarmstrong closed 4 years ago
Hi Chandler,
Looks like the error is coming from line 1854, which is:
${CXX} ${CXXFLAGS} -o geos_test geos_test.cpp ${GEOS_STATIC_CLIBS} 2> errors.txt
The error message -o: command not found
suggests that both the CXX
and CXXFLAGS
environment variables are undefined. CXX
should be defined on line 1704 as the result of running R CMD config CXX14
.
I tried installing R on a fresh CentOS 7.7 setup, and sure enough, R CMD config CXX14
returns nothing. I'm guessing this is because CentOS 7.7 ships with gcc 4.8.5 (from 2015), which can't compile C++14 (used by exactextractr).
The configure script should have better error message in this case (since it actually has nothing to do with GEOS), but I think you're going to have problems installing quite a few packages with a compiler this old. (I also wasn't able to install sf on this setup because the CentOS 7.7 GDAL is too old.)
thanks I'll see about updating the compilers, or perhaps switching to the new CentOS 8.
I recently switched from Anaconda's R and compilers to (re)building everything from source(rpms), hence I'm now using the old CentOS compilers instead of Anaconda. Given this it sounds like your diagnosis is on the right track, and is happening only now due to the switch from Anaconda.
to confirm: it was the C++14 compiler. Installing and enabling devtoolset-8 from the redhat software collections repo and recompiling R with gcc 8 fixed the issue. thanks!
I've attempted to install exactextractr but have had no luck. I'm on CentOS and have rebuilt most of the geospatial tools from Fedora, including GDAL-2.3.1-3 and geos-3.6.1-10, and installed these along with developmental libraries and headers. I've verified the locations of geos-config and libgeos_c, and that initGEOS_r exists in libgeos_c, but to no avail. I've also tried multiple versions and methods of installing geos, but each had the same result. Lastly, this same error can be found associated with rgeos and other R geospatial packages, but the solutions are varied (often involving installing an older rgeos) and none of these solutions have worked for me.
any help is appreciated! the raster package is simply too slow. FWIW I've successfully installed sf, sp, raster, rgdal, rgeos, gdalUtils, etc etc and every geospatial package save this one installs successfully, so it may be something with exactextractr's configure script (I saw recent updates attempting to resolve a problem with geos).
v/r, Chandler