<div dir="ltr">I got it to work by first removing all versions of postgres from my system and then installing the gdal and gdal-dev packages.<div><br></div><div>I think somehow, somewhere there was a symlink pointing to the wrong version of a lib.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 30, 2020 at 3:30 PM Matthys Kroon <<a href="mailto:matthysk@gmail.com">matthysk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks for your help.<div><br></div><div>I do seem to have the file. I have libpq and libpq5 packages installed.</div><div><br></div><div><div><span style="font-family:monospace"><span style="color:rgb(255,84,84)">/usr/lib64</span><span style="color:rgb(0,0,0)">#ls -alh libpq.so*
</span><br>lrwxrwxrwx. 1 root root 13 Aug 20 14:42 <span style="font-weight:bold;color:rgb(84,255,255)">libpq.so</span><span style="color:rgb(0,0,0)"> -> </span><span style="font-weight:bold;color:rgb(84,255,84)">libpq.so.5.12</span><span style="color:rgb(0,0,0)">
</span><br>lrwxrwxrwx. 1 root root 13 Aug 20 14:42 <span style="font-weight:bold;color:rgb(84,255,255)">libpq.so.5</span><span style="color:rgb(0,0,0)"> -> </span><span style="font-weight:bold;color:rgb(84,255,84)">libpq.so.5.12</span><span style="color:rgb(0,0,0)">
</span><br>-rwxr-xr-x. 1 root root 1.3M Aug 20 14:42 <span style="font-weight:bold;color:rgb(84,255,84)">libpq.so.5.12</span><br></span></div></div><div><span style="font-family:monospace"><span style="font-weight:bold;color:rgb(84,255,84)"><br></span></span></div><div><div><br></div><div>I think it has something to do with the postgres version. All those references have "<span style="font-family:monospace">@RHPG_9.6" </span>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.</div></div><div><br></div>I'm going to try and verify that I have the correct version installed.<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 30, 2020 at 2:38 PM Andrew C Aitchison <<a href="mailto:andrew@aitchison.me.uk" target="_blank">andrew@aitchison.me.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 30 Sep 2020, Matthys Kroon wrote:<br>
<br>
> Hi,<br>
><br>
> I'm trying to build "sf" package in R on Fedora 32 but it fails to<br>
> configure gdal. The error output is below:<br>
><br>
> It seems to be some issue referring to a postgres lib? I have libpq-devel<br>
> installed.<br>
><br>
> I googled for hours and I'm still stuck. Please let me know what other<br>
> information I can provide to help troubleshoot.<br>
><br>
> /usr/bin/ld /usr/lib64/libgdal.so<br>
> ld: warning: cannot find entry symbol _start; not setting start address<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQcmdStatus@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQfname@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to<br>
> `PQsetNoticeProcessor@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQftable@RHPG_9.6'<br>
<br>
On RHEL6 /usr/lib64/libpq.so.5.2 is in the package "postgresql-libs";<br>
on Ubuntu20.04 /usr/lib/x86_64-linux-gnu/libpq.so.5.12 is in the package <br>
"libpq5". The dev/devel packages have libpq.so as a symbolic link to<br>
these numbered .so libraries, so I guess you need a non-devel package<br>
like libpq or libpq5.<br>
<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQstatus@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQftablecol@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQconnectdb@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to<br>
> `PQescapeStringConn@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `lo_close@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQputCopyEnd@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQgetvalue@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQgetisnull@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQftype@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQfmod@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `lo_creat@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQresultStatus@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `lo_read@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQexec@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to<br>
> `PQsetClientEncoding@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQgetlength@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQputCopyData@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQgetResult@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `lo_write@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQfinish@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQclear@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQerrorMessage@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQnfields@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `lo_open@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQexecParams@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to `PQntuples@RHPG_9.6'<br>
> ld: /usr/lib64/libgdal.so: undefined reference to<br>
> `PQresultErrorMessage@RHPG_9.6'<br>
><br>
> Thanks for any help.<br>
><br>
> Regards,<br>
><br>
> Matthys<br>
><br>
<br>
-- <br>
Andrew C. Aitchison Kendal, UK<br>
<a href="mailto:andrew@aitchison.me.uk" target="_blank">andrew@aitchison.me.uk</a><br>
</blockquote></div>
</blockquote></div>