I got it to work by first removing all versions of postgres from my system and then installing the gdal and gdal-dev packages.
I think somehow, somewhere there was a symlink pointing to the wrong version of a lib. On Wed, Sep 30, 2020 at 3:30 PM Matthys Kroon <[email protected]> wrote: > Thanks for your help. > > I do seem to have the file. I have libpq and libpq5 packages installed. > > /usr/lib64#ls -alh libpq.so* > lrwxrwxrwx. 1 root root 13 Aug 20 14:42 libpq.so -> libpq.so.5.12 > lrwxrwxrwx. 1 root root 13 Aug 20 14:42 libpq.so.5 -> libpq.so.5.12 > -rwxr-xr-x. 1 root root 1.3M Aug 20 14:42 libpq.so.5.12 > > > I think it has something to do with the postgres version. All those > references have "@RHPG_9.6" which I assume references postgres 9.6. I > also have postgres 11 and 12 installed on the system (was developing > postgres apps in my previous job). I think somehow I have a later version > of libpq installed. > > I'm going to try and verify that I have the correct version installed. > > > On Wed, Sep 30, 2020 at 2:38 PM Andrew C Aitchison <[email protected]> > wrote: > >> On Wed, 30 Sep 2020, Matthys Kroon wrote: >> >> > Hi, >> > >> > I'm trying to build "sf" package in R on Fedora 32 but it fails to >> > configure gdal. The error output is below: >> > >> > It seems to be some issue referring to a postgres lib? I have >> libpq-devel >> > installed. >> > >> > I googled for hours and I'm still stuck. Please let me know what other >> > information I can provide to help troubleshoot. >> > >> > /usr/bin/ld /usr/lib64/libgdal.so >> > ld: warning: cannot find entry symbol _start; not setting start address >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQcmdStatus@RHPG_9.6 >> ' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQfname@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to >> > `PQsetNoticeProcessor@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQftable@RHPG_9.6' >> >> On RHEL6 /usr/lib64/libpq.so.5.2 is in the package "postgresql-libs"; >> on Ubuntu20.04 /usr/lib/x86_64-linux-gnu/libpq.so.5.12 is in the package >> "libpq5". The dev/devel packages have libpq.so as a symbolic link to >> these numbered .so libraries, so I guess you need a non-devel package >> like libpq or libpq5. >> >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQstatus@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQftablecol@RHPG_9.6 >> ' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQconnectdb@RHPG_9.6 >> ' >> > ld: /usr/lib64/libgdal.so: undefined reference to >> > `PQescapeStringConn@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `lo_close@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQputCopyEnd@RHPG_9.6 >> ' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQgetvalue@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQgetisnull@RHPG_9.6 >> ' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQftype@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQfmod@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `lo_creat@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to >> `PQresultStatus@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `lo_read@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQexec@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to >> > `PQsetClientEncoding@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQgetlength@RHPG_9.6 >> ' >> > ld: /usr/lib64/libgdal.so: undefined reference to >> `PQputCopyData@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQgetResult@RHPG_9.6 >> ' >> > ld: /usr/lib64/libgdal.so: undefined reference to `lo_write@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQfinish@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQclear@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to >> `PQerrorMessage@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQnfields@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `lo_open@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQexecParams@RHPG_9.6 >> ' >> > ld: /usr/lib64/libgdal.so: undefined reference to `PQntuples@RHPG_9.6' >> > ld: /usr/lib64/libgdal.so: undefined reference to >> > `PQresultErrorMessage@RHPG_9.6' >> > >> > Thanks for any help. >> > >> > Regards, >> > >> > Matthys >> > >> >> -- >> Andrew C. Aitchison Kendal, UK >> [email protected] >> >
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
