From: Markus Schiltknecht on
Hi,

I'm trying to run 'make check' on a 64bit Debian unstable. That aborts
after 60 seconds due to not being able to connect to the postmaster.

I figured that there's nothing wrong with the postmaster, rather psql
can't start up, because it gets linked against an older libpq.so.5. It
looks like for some reason, it doesn't respect the LD_LIBRARY_PATH env
variable, see ldd output:

markus(a)argodan:/home/markus/projects/pgsql/sources/current/pgsql/src/test/regress#
LD_LIBRARY_PATH=/home/markus/projects/pgsql/sources/current/pgsql/src/test/regress/./tmp_check/install//usr/lib
ldd -r -v tmp_check/install/usr/bin/psql
linux-vdso.so.1 => (0x00007fffc2bfe000)
libpq.so.5 => /usr/lib/libpq.so.5 (0x00002ac8e81ba000)
libz.so.1 => /usr/lib/libz.so.1 (0x00002ac8e83db000)
libreadline.so.5 => /lib/libreadline.so.5 (0x00002ac8e8606000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00002ac8e8846000)
libdl.so.2 => /lib/libdl.so.2 (0x00002ac8e8a7e000)
libm.so.6 => /lib/libm.so.6 (0x00002ac8e8c82000)
libc.so.6 => /lib/libc.so.6 (0x00002ac8e8f04000)
libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0x00002ac8e9262000)
libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0x00002ac8e94ae000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00002ac8e983c000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00002ac8e9ad7000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00002ac8e9cd9000)
libncurses.so.5 => /usr/lib/libncurses.so.5 (0x00002ac8e9ef5000)
/lib64/ld-linux-x86-64.so.2 (0x00002ac8e7f9c000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00002ac8ea132000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00002ac8ea357000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00002ac8ea55f000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00002ac8ea761000)
undefined symbol: pg_valid_server_encoding_id
(tmp_check/install/usr/bin/psql)
undefined symbol: PQconnectionNeedsPassword (tmp_check/install/usr/bin/psql)


Giving it an additional LD_PRELOAD for the newish libpq.5.1 helps:

markus(a)argodan:/home/markus/projects/pgsql/sources/current/pgsql/src/test/regress#

LD_PRELOAD=/home/markus/projects/pgsql/sources/current/pgsql/src/test/regress/tmp_check/install/usr/lib/libpq.so.5.1
LD_LIBRARY_PATH=/home/markus/projects/pgsql/sources/current/pgsql/src/test/regress/./tmp_check/install//usr/lib
ldd -r -v tmp_check/install/usr/bin/psql
linux-vdso.so.1 => (0x00007fffe97fe000)
/home/markus/projects/pgsql/sources/current/pgsql/src/test/regress/tmp_check/install/usr/lib/libpq.so.5.1
(0x00002b69c1547000)
libz.so.1 => /usr/lib/libz.so.1 (0x00002b69c1765000)
libreadline.so.5 => /lib/libreadline.so.5 (0x00002b69c1990000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00002b69c1bd0000)
libdl.so.2 => /lib/libdl.so.2 (0x00002b69c1e08000)
libm.so.6 => /lib/libm.so.6 (0x00002b69c200c000)
libc.so.6 => /lib/libc.so.6 (0x00002b69c228e000)
libncurses.so.5 => /usr/lib/libncurses.so.5 (0x00002b69c25ec000)
/lib64/ld-linux-x86-64.so.2 (0x00002b69c1329000)


Somebody have an idea on what's wrong here? Thanks.

Regards

Markus


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(a)postgresql.org so that your
message can get through to the mailing list cleanly

From: Andrew Dunstan on


Markus Schiltknecht wrote:
> Hi,
>
> I'm trying to run 'make check' on a 64bit Debian unstable. That aborts
> after 60 seconds due to not being able to connect to the postmaster.
>
> I figured that there's nothing wrong with the postmaster, rather psql
> can't start up, because it gets linked against an older libpq.so.5. It
> looks like for some reason, it doesn't respect the LD_LIBRARY_PATH env
> variable, see ldd output:
>
> markus(a)argodan:/home/markus/projects/pgsql/sources/current/pgsql/src/test/regress#
> LD_LIBRARY_PATH=/home/markus/projects/pgsql/sources/current/pgsql/src/test/regress/./tmp_check/install//usr/lib
> ldd -r -v tmp_check/install/usr/bin/psql
>
[snip]
> undefined symbol: pg_valid_server_encoding_id
> (tmp_check/install/usr/bin/psql)
> undefined symbol: PQconnectionNeedsPassword
> (tmp_check/install/usr/bin/psql)
>
>
> Giving it an additional LD_PRELOAD for the newish libpq.5.1 helps:
>
> markus(a)argodan:/home/markus/projects/pgsql/sources/current/pgsql/src/test/regress#
>
> LD_PRELOAD=/home/markus/projects/pgsql/sources/current/pgsql/src/test/regress/tmp_check/install/usr/lib/libpq.so.5.1
> LD_LIBRARY_PATH=/home/markus/projects/pgsql/sources/current/pgsql/src/test/regress/./tmp_check/install//usr/lib
> ldd -r -v tmp_check/install/usr/bin/psql
>
[snip]
> Somebody have an idea on what's wrong here? Thanks.
>
>

Smells suspiciously like an rpath problem to me. What are your configure
settings?

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

From: Markus Schiltknecht on
Andrew Dunstan wrote:
> Smells suspiciously like an rpath problem to me. What are your configure
> settings?

Ah, yeah, I see. Using something else than --prefix=/usr helped.

Thanks for the hint!

Regards

Markus


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings