Re: Regression test fails when 1) old PG is installed and 2) meson/ninja build is used - Mailing list pgsql-hackers
From | Andres Freund |
---|---|
Subject | Re: Regression test fails when 1) old PG is installed and 2) meson/ninja build is used |
Date | |
Msg-id | h4x4a4ghm22biaz2ydyobbkcgoeyw2qku2ttslzhg2axjstaym@mgkdhs22oihn Whole thread Raw |
In response to | Regression test fails when 1) old PG is installed and 2) meson/ninja build is used ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>) |
List | pgsql-hackers |
Hi, On 2025-04-11 07:53:07 +0000, Hayato Kuroda (Fujitsu) wrote: > Dear hackers, > > While creating patches for older branches I found the $SUBJECT. I do not have much knowledge > for meson thus I'm not sure it is intentional. > Reproducer > ======= > I could reproduce the failure with steps: > > 1. install old PG, e.g., PG16. To your system. .so file must be put on your $$LD_LIBRARY_PATH. > 2. build newer PG, e.g., master, with meson build system [1]. > 3. run regression test and ERROR would be reported [2]. > > This issue does not happen when I used autoconf/make build system. > > Analysis > ===== > > According to the log, the instance could be started but psql could not work correctly: > > ``` > ----------------------------------- stdout ----------------------------------- > # executing test in /home/hayato/builddir/testrun/regress/regress group regress test regress > # initializing database system by copying initdb template > # using temp instance on port 40047 with PID 949892 > Bail out!# test failed > ----------------------------------- stderr ----------------------------------- > psql: symbol lookup error: psql: undefined symbol: PQservice > # command failed: "psql" -X -q -c "CREATE DATABASE \"regression\" ... > > (test program exited with status code 2) > ============================================================================== I can't reproduce this. For me the psql started by pg_regress is the one in tmp_install and so is the libpq it links to. $ killall -STOP psql $ ps aux|grep psql andres 3375208 0.0 0.0 28696 9972 pts/5 T Apr10 0:00 psql tpch_10 andres 3597915 1.0 0.0 36036 10120 ? T 09:42 0:00 psql -X -a -q -d regression -v HIDE_TABLEAM=on -v HIDE_TOAST_COMPRESSION=on andres 3597916 1.0 0.0 36036 10120 ? T 09:42 0:00 psql -X -a -q -d regression -v HIDE_TABLEAM=on -v HIDE_TOAST_COMPRESSION=on andres 3597918 0.6 0.0 36036 10144 ? T 09:42 0:00 psql -X -a -q -d regression -v HIDE_TABLEAM=on -v HIDE_TOAST_COMPRESSION=on andres 3597920 0.3 0.0 36036 10104 ? T 09:42 0:00 psql -X -a -q -d regression -v HIDE_TABLEAM=on -v HIDE_TOAST_COMPRESSION=on andres 3597922 0.6 0.0 36036 10120 ? T 09:42 0:00 psql -X -a -q -d regression -v HIDE_TABLEAM=on -v HIDE_TOAST_COMPRESSION=on andres 3597955 0.0 0.0 6608 2180 pts/0 S+ 09:42 0:00 grep psql $ ls -l /proc/3597918/exe lrwxrwxrwx 1 andres andres 0 Apr 11 09:42 /proc/3597918/exe -> /srv/dev/build/postgres/m-dev-assert/tmp_install/srv/dev/install/postgres/m-dev-assert/bin/psql $ less /proc/3597918/maps ... 000 103:06 4831894711 /srv/dev/build/postgres/m-dev-assert/tmp_install/srv/dev/install/postgres/m-dev-assert/lib/x86_64-linux-gnu/libpq.so.5.18 And meson-logs/testlog.txt shows that the command is executed with PATH=/srv/dev/build/postgres/m-dev-assert/tmp_install//srv/dev/install/postgres/m-dev-assert/bin:<other things> LD_LIBRARY_PATH=/srv/dev/build/postgres/m-dev-assert/tmp_install//srv/dev/install/postgres/m-dev-assert/lib/x86_64-linux-gnu Can you check whether your meson-logs/testlog.txt shows the appropriate PATH/LD_LIBRARY_PATH and whether libpq is in the right place? Greetings, Andres Freund
pgsql-hackers by date: