[gdal-dev] RGDAL + sqlite3 = ld: cannot find -lsqlite3

Roger Bivand Roger.Bivand at nhh.no
Fri Oct 30 12:16:30 PDT 2020


I don't think this is a relevant list. R-sig-geo is a relevant list if you
are subscribed. Both PROJ and GDAL are themselves built using libsqlite3,
and PROJ used by GDAL and many drivers themselves need it. It isn't needed
by rgdal directly, but there was a (short) period when the rgdal configure
script checked its presence. My closest guess is that the rgdal shared
object is compiled and linked correctly with the given configure arguments,
but that it fails when loading is checked because you have multiple copies
og PROJ and/or GDAL in the load path, and one other than those in the
configure arguments is found first.

Please follow up on R-sig-geo

Roger


Doug Niven wrote
> I’m hoping someone might be able to shed some light on how to fix the
> following message when installing ‘rgdal’:
> 
> /opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld: cannot
> find -lsqlite3
> collect2: error: ld returned 1 exit status
> 
> GDAL, PROJ, GEOS, Postgres 9-11, all installed via Yum on Centos 7.
> 
> Sqlite3’s lib is in my LD_LIBRARY_PATH:
> 
> [root at localhost ~]# echo $LD_LIBRARY_PATH
> /usr/sqlite330/lib:/opt/rh/llvm-toolset-7/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib
> 
> And Sqlite3 is on my PATH:
> 
> [root at localhost ~]# which sqlite3
> /usr/sqlite330/bin/sqlite3
> 
> Command to install used in R:
> 
> install.packages('rgdal', type = "source",
> configure.args=c('--with-gdal-config=/usr/gdal31/bin/gdal-config-64','--with-proj-include=/usr/proj71/include','--with-proj-lib=/usr/proj71/lib’))
> 
> Many thanks for any assistance with this!
> 
> Doug
> _______________________________________________
> gdal-dev mailing list

> gdal-dev at .osgeo

> https://lists.osgeo.org/mailman/listinfo/gdal-dev





-----
Roger Bivand
NHH Norwegian School of Economics, Bergen, Norway
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list