r-spatial / lwgeom

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

Wrong error message during installation #57

Closed JVAQUEROM closed 4 years ago

JVAQUEROM commented 4 years ago

I was getting this output when installing lwgeom

> install.packages("lwgeom")
Installing package into ‘/home/javier/R/x86_64-suse-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
probando la URL 'https://cran.rstudio.com/src/contrib/lwgeom_0.2-3.tar.gz'
Content type 'application/x-gzip' length 500834 bytes (489 KB)
==================================================
downloaded 489 KB

* installing *source* package ‘lwgeom’ ...
** package ‘lwgeom’ successfully unpacked and MD5 sums checked
** using staged installation
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
configure: CC: gcc
configure: CXX: g++ -std=gnu++11
configure: pkg-config proj exists, will use it
configure: using proj.h.
configure: PROJ: 5.2.0
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’
* removing ‘/home/javier/R/x86_64-suse-linux-gnu-library/4.0/lwgeom’
Warning in install.packages :
  installation of package ‘lwgeom’ had non-zero exit status

Same with github version. After a long time messing with "libproj" versions and all, I went to the sources. ./configure created an errors.txt file that said:

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lsqlite3
collect2: error: ld returned 1 exit status

So, I saw some sqlite3 there. I decided to instsall package sqlite3-devel and that fixed my problem.

Therefore, I suggest the configure outputs something like "libproj or sqlite3 not found", or even a suggestion to install the corresponding packages.

Thank you for the good work with al the r-spatial and lwgeom! Amazing work!

edzer commented 4 years ago

We now see:

checking PROJ: checking whether PROJ and sqlite3 are available for linking:... yes
JVAQUEROM commented 4 years ago

Actually, that's exactly the same as before. The line that should be changed is (when that line outputs "no"),

configure: error: libproj not found in standard or given locations.

Should be something like:

configure: error: libproj or sqlite3-devel not found in standard or given locations.

edzer commented 4 years ago

The required package is not called sqlite3-devel on every platforms, afaict.

JVAQUEROM commented 4 years ago

Ok, then it could be:

configure: error: libproj or sqlite3 not found in standard or given locations.

edzer commented 4 years ago

Feel free to submit a PR.