On Tue, Sep 23, 2025 at 06:37:33AM -0400, Noah Meyerhans wrote:
> I notice the following from the build logs:
> 
> From -6:
> checking for libpq... yes
> checking for PQescapeStringConn in -lpq... yes
> ...
> libtool: link: gcc -shared  -fPIC -DPIC  
> .libs/libdriver_pgsql_la-driver-pgsql.o   -lpq  -g -O2 
> -Werror=implicit-function-declaration 
> -ffile-prefix-map=/build/reproducible-path/dovecot-2.4.1+dfsg1=. -flto=auto 
> -fstack-protector-strong -Werror=format-security -fstack-protector-strong 
> -mfunction-return=keep -mindirect-branch=keep -flto=auto -Wl,-z -Wl,relro 
> -Wl,-z -Wl,now   -Wl,-soname -Wl,libdriver_pgsql.so -o 
> .libs/libdriver_pgsql.so
> 
> From -7:
> checking for libpq... no
> checking for libpq library in expected file paths... using PGSQL_CFLAGS="" 
> and PGSQL_LIBS=""
> checking for PQconnectdb in -lpq... yes
> checking for PQescapeStringConn in -lpq... yes
> 
> 
> It's interesting that the configure script in -7 claims to find some key
> symbols in -lpq, but also claims that it couldn't find libpq itself.  In
> any case, we never see the subsequent linker invocation.
> 
> Since nothing in dovecot changed in this area, it seems likely that this
> was caused by the update to postgres 18 in sid.  I need to investigate
> what's going on in the configure script that prevents it from finding
> -lpq; it may be an issue in the script or with libpq-dev.

It seems that this no longer happens with libpq-dev 18.0-1.  I don't see
anything in the Debian changelogs that would have resolved the issue, so
it may have been upstream.

>From a rebuild today,
checking for libpq... yes
checking for PQescapeStringConn in -lpq... yes

and the resulting object was linked against libpq as expected:

builder@7c54db59ab63:/src/dovecot$ ldd 
debian/dovecot-pgsql/usr/lib/dovecot/modules/libdriver_pgsql.so 2>&1 | grep 
libpq
        libpq.so.5 => /lib/x86_64-linux-gnu/libpq.so.5 (0x00007fadbba96000)

I'm going to reassign this to libpq-dev, just so the maintainers see it.
Other than visibility and possibly record keeping, though, I don't think
there's anything for them to do.

The next dovecot upload will build against libpq-dev 18.0-1 naturally.

noah

Reply via email to