BUG #16085: Potential missing version information available for /usr/pgsql-12/lib/libpq.so.5

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: git(at)jjerphan(dot)xyz
Subject: BUG #16085: Potential missing version information available for /usr/pgsql-12/lib/libpq.so.5
Date: 2019-10-29 07:12:01
Message-ID: 16085-99b864314bf49697@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16085
Logged by: Julien Jerphanion
Email address: git(at)jjerphan(dot)xyz
PostgreSQL version: 12.0
Operating system: Fedora 30
Description:

Hello,

I add linking problem when when trying to compile a project that is relying
on libpq, namely [ttk](https://github.com/topology-tool-kit/ttk).

Here is a similar stack trace I got when compiling this project
```
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQfname(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQresStatus(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQftype(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQexec(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQfformat(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQclear(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQntuples(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQstatus(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQconnectdb(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQescapeStringConn(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQgetvalue(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQgetisnull(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQresultStatus(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQfinish(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQerrorMessage(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQnfields(at)RHPG_9(dot)6'
/usr/bin/ld: /usr/lib64/vtk/libvtkIOPostgreSQL.so.1: undefined reference to
`PQresultErrorMessage(at)RHPG_9(dot)6'
```

It seems that this was rather due to missing a library version within
`libpg`:
```bash
$ ldd /usr/lib64/vtk/libvtkIOPostgreSQL.so.1
/usr/lib64/vtk/libvtkIOPostgreSQL.so.1: /usr/pgsql-12/lib/libpq.so.5: no
version information available (required by
/usr/lib64/vtk/libvtkIOPostgreSQL.so.1)
# ...
libpq.so.5 => /usr/pgsql-12/lib/libpq.so.5 (0x00007fa9b39c0000)
# ...
```

On my machine, this latter version was provided by several packages from
PostGreSQL 12, namely:
```bash
$ dnf provides /usr/pgsql-12/lib/libpq.so
postgresql12-devel-12rc1-2PGDG.f30.x86_64 : PostgreSQL development header
files and libraries
Repo : pgdg12
Matched from:
Filename : /usr/pgsql-12/lib/libpq.so

postgresql12-devel-12.0-1PGDG.f30.x86_64 : PostgreSQL development header
files and libraries
Repo : @System
Matched from:
Filename : /usr/pgsql-12/lib/libpq.so

postgresql12-devel-12.0-1PGDG.f30.x86_64 : PostgreSQL development header
files and libraries
Repo : pgdg12
Matched from:
Filename : /usr/pgsql-12/lib/libpq.so

# ...
```
I uninstalled them and it resolves my problem:
```
$ sudo dnf erase postgresql12-devel-12.0-1PGDG.f30.x86_64
$ sudo dnf erase postgresql11-libs-11.5-1PGDG.f30.x86_64
$ sudo dnf erase postgresql12-libs-12.0-1PGDG.f30.x86_64
# ...
```

I think that this is correlated to the release of PostGreSQL 12.

Let me know if you need more information on this problem.

Best regards,
Julien Jerphanion (@jjerphan)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Popov 2019-10-29 08:14:45 Backup/restore problem
Previous Message PG Bug reporting form 2019-10-29 00:19:03 BUG #16084: Server couldn't be contacted