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) ============================================================================== ``` It looks like that psql required the function `PQservice` in the library but it could not find in the used libpq.so. Since the function has been introduced since PG18, I suspect psql tried to link with .so file for old PG (installed one). IIUC each commands should refer libraries exist in tmp_install, not the system's one. Is this an issue to be solved on PG community, or specification of meson/ninja? Or... could it happen only on my environment? Note ==== I'm using AlmaLinux 9.5. I can give more detail if needed. [1]: ``` $ meson setup -Dinjection_points=true -Dcassert=true --optimization=0 --debug ../postgres/ The Meson build system Version: 0.63.3 ... Project name: postgresql Project version: 18devel ... $ ninja ... ``` [2]: ``` $ meson test --suite setup --suite regress ninja: Entering directory `/home/hayato/builddir' ninja: no work to do. 1/4 postgresql:setup / tmp_install OK 0.82s 2/4 postgresql:setup / install_test_files OK 0.05s 3/4 postgresql:setup / initdb_cache OK 1.88s 4/4 postgresql:regress / regress/regress ERROR 3.66s exit status 2 ... Ok: 3 Expected Fail: 0 Fail: 1 Unexpected Pass: 0 Skipped: 0 Timeout: 0 ``` Best regards, Hayato Kuroda FUJITSU LIMITED