pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Rogge <andreas.rogge@bareos.com>
To: pgsql-pkg-yum@lists.postgresql.org
Subject: Re: BUG #18833: libpq.so doesn't contain declared symbol in rpm --provides
Date: Tue, 11 Mar 2025 18:25:18 +0100
Message-ID: <fee4ea5b-6bfe-4d03-9c2f-8b2d7431ec9d@bareos.com> (raw)
In-Reply-To: <Z9AMuwfI9v_qVHnS@msg.df7cb.de>
References: <202503101708.hmyugfg4rjpn@alvherre.pgsql>
	<425a672c6ca591a0ccee2a5d373764b6b561966f.camel@gunduz.org>
	<2082217.Jadu78ljVU@x-wing>
	<Z9AMuwfI9v_qVHnS@msg.df7cb.de>

Am 11.03.25 um 11:13 schrieb Christoph Berg:
> Is this only hitting Bareos and not every other application
> distributed by RH itself? If so, why?

That depends on what you call "hitting".
As far as I can tell the warning messsage
"/lib64/libpq.so.5: no version information available (required by ...)"
is emitted by ld.so for everything that was linked at build-time to 
redhat's version of libpq and then run with pgdg's libpq5.

In in a fresh rhel9 ubi container you can do the following:

# dnf install rhel-9-x86_64/pgdg-redhat-repo-42.0-46PGDG.noarch.rpm
# dnf install libpq5
# dnf install postfix-pgsql
# ldd /usr/lib64/postfix/postfix-pgsql.so
(here you'll see the message)

It seems like you will not see the warning message in postfix, because 
postfix-pgsql.so is loaded using dlopen(). When dynamic linking occurs 
during dlopen() ld.so will not write a message to stderr, of course.

It looks like most (if not all) of the things in the rhel repos that 
link to libpq are plugins that will be loaded with dlopen(). At least I 
couldn't quickly find any program that directly links to libpq.

Nevertheless, the problem Bareos hits can be reproduced easily:
1. set up a rhel9 system without PGDG
2. install compiler + libpq-devel
3. build "libpq Example Program 1" [1] and link with RH's libpq
4. move resulting program to a system with libpq5 from PGDG and run it

When libpq is dynamically linked during initial program setup by ld.so, 
you will see the warning message.

Best Regards,
Andreas

[1] https://www.postgresql.org/docs/current/libpq-example.html
-- 
Andreas Rogge                             andreas.rogge@bareos.com
   Bareos GmbH & Co. KG                      Phone: +49 221-630693-86
   http://www.bareos.com

   Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
   Komplementär: Bareos Verwaltungs-GmbH
   Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz






view thread (15+ messages)  latest in thread

Message-ID: <fee4ea5b-6bfe-4d03-9c2f-8b2d7431ec9d@bareos.com>
Permalink:  ../fee4ea5b-6bfe-4d03-9c2f-8b2d7431ec9d@bareos.com/
Also on:    postgresql.org/message-id/fee4ea5b-6bfe-4d03-9c2f-8b2d7431ec9d@bareos.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: andreas.rogge@bareos.com, pgsql-pkg-yum@lists.postgresql.org
  Subject: Re: BUG #18833: libpq.so doesn't contain declared symbol in rpm --provides
  In-Reply-To: <fee4ea5b-6bfe-4d03-9c2f-8b2d7431ec9d@bareos.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox