Closed mikoontz closed 3 years ago
Just noticed this PR (https://github.com/r-spatial/lwgeom/pull/62) so I will try that!
edit: that PR didn't solve my problem.
Note I also tried installing using extra configure.args=
as suggested during the install for {sf} (https://r-spatial.github.io/sf/index.html#macos) which did not fix the problem:
install.packages("sf", configure.args = "--with-proj-lib=/usr/local/lib/", type = "source)
Not sure it's exactly the same problem, but I had a similar issue ("checking PROJ: checking whether PROJ and sqlite3 are available for linking:... no"), that was solved when I made the PKG_CONFIG_PATH environment variable point to the directory that contains proj.pc, for my custom installation of PROJ.
Same problem on MacOS, configure does not try pkg-config --libs --static
when trying to link to proj:
* 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.1
checking PROJ: checking whether PROJ and sqlite3 are available for linking:... no
configure: error: libproj not found in standard or given locations.
ERROR: configuration failed for package ‘lwgeom’
It fails because proj7 now requires linking to sqlite, tiff and curl:
# pkg-config --libs --static proj
-L/Users/jeroen/Desktop/gdal-3.2.0-catalina/lib/pkgconfig/../../lib -lproj -lsqlite3 -ltiff -lcurl
I think the solution is to modify the configure script and replace -lproj -lsqlite3
with the output of pkg-config
.
Hi @edzer, as it seems this patch is fixing this issue, can you release a new version of lwgeom
?
I'd like to but quite a bit more than that is needed for a release; see e.g. https://cran.r-project.org/web/checks/check_results_lwgeom.html . Help welcome, my priorities are somewhere else.
lwgeom 0.2-6 is now on CRAN, thanks to @jeroen !
So, --static
causes havoc on platforms where static libraries are not installed by default (several linux distros). @jeroen is this line sufficient to check for MacOS platforms, and suitable to be added before using --static
?
Yes that sounds good.
Hello,
I'm trying to do some spatial transformations directly using PROJ in the {stars} package which, as far as I understand, uses {lwgeom} under the hood for the
st_transform_proj()
function. I'm getting an error, and I suspect it has to do with the incorrect version of PROJ being used. Sure enough, when I load {lwgeom} directly, I get a warning that both the GEOS and PROJ versions differ between {sf} and {lwgeom}:I was trying to install {lwgeom} from source in order to link to the latest installed versions of PROJ and GEOS (which I installed using Homebrew). I get an error that "libproj is not found in the standard location":
However, when I install {sf} from source in order to link to the latest versions of GDAL, PROJ, and GEOS, I am able to do so successfully and make it past the same check in the install process that caused a problem when installing {lwgeom}.
Here's the output when (successfully) installing {sf} from source:
Here is my
sessionInfo()
:Any thoughts as to why {sf} would install properly from source, but not {lwgeom}?