I have been unable to update my copy of rgdal on my up-to-date Windows 10 desktop, running R 4.0 and the new version of RStudio. The error is documented below:
c:/Users/hunsickerl/Documents/R/Rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I../windows/gdal3-3.0.4/include/gdal-3.0.4 -I../windows/gdal3-3.0.4/include/geos-3.8.0 -I../windows/gdal3-3.0.4/include/proj-6.3.1 -DPROJ_H_API -I'C:/ecycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/NTH3XX/Documents/Home/R/win-library/4.0/sp/include' -O3 -Wno-unused-variable -Wno-unused-function -c OGR_write.cpp -o OGR_write.o
In file included from OGR_write.cpp:11:
rgdal.h:15:10: fatal error: sp.h: No such file or directory
Note from the above that g++ is looking for the file "sp.h" in " -I'C:/ecycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/NTH3XX/Documents/Home/R/win-library/4.0/sp/include'
I have checked, and sp.h is in that folder. library(sp) attaches that package correctly, and the sp demo runs correctly. So "sp.h" exists where g++ can't find it, and the sp package works fine.
The installation script has the usual warning, and I may be expected to do something to edit the configuration script manually. But there are no suggestions about what I am supposed to do.
WARNING: this package has a configure script
It probably needs manual configuration
I know that I can just wait until the R windows group fixes up a compiled rgdal package. But I would like to know what I am supposed to do to accomplish "manual configuration." Thanks in advance for any help on this issue.