While attempting to use 8.4, it does not find a apt version and falls back to trying to compile PHP. It fails during PostgreSQL adding.
I suspect a newer version of PostgreSQL would resolve the problem. But a ppa does exist for 8.4.
2025-06-06T14:33:19.4447050Z /tmp/php-build/source/8.4.8/ext/pgsql/pgsql.c:403:18: error: static declaration of ‘PQchangePassword’ follows non-static declaration
2025-06-06T14:33:19.4450216Z 403 | static PGresult *PQchangePassword(PGconn *conn, const char *user, const char *passwd)
2025-06-06T14:33:19.4452124Z | ^~~~~~~~~~~~~~~~
2025-06-06T14:33:19.4457725Z In file included from /tmp/php-build/source/8.4.8/ext/pgsql/php_pgsql.h:31,
2025-06-06T14:33:19.4460255Z from /tmp/php-build/source/8.4.8/ext/pgsql/pgsql.c:37:
2025-06-06T14:33:19.4463337Z /usr/include/postgresql/libpq-fe.h:717:18: note: previous declaration of ‘PQchangePassword’ with type ‘PGresult *(PGconn *, const char *, const char *)’ {aka ‘struct pg_result *(struct pg_conn *, const char *, const char *)’}
2025-06-06T14:33:19.4479086Z 717 | extern PGresult *PQchangePassword(PGconn *conn, const char *user, const char *passwd);
2025-06-06T14:33:19.4481167Z | ^~~~~~~~~~~~~~~~
2025-06-06T14:33:19.4483141Z /tmp/php-build/source/8.4.8/ext/pgsql/pgsql.c:444:12: error: static declaration of ‘PQsocketPoll’ follows non-static declaration
2025-06-06T14:33:19.4484378Z 444 | static int PQsocketPoll(int socket, int read, int write, time_t timeout)
2025-06-06T14:33:19.4485057Z | ^~~~~~~~~~~~
2025-06-06T14:33:19.4486527Z /usr/include/postgresql/libpq-fe.h:695:17: note: previous declaration of ‘PQsocketPoll’ with type ‘int(int, int, int, pg_usec_time_t)’ {aka ‘int(int, int, int, long int)’}
2025-06-06T14:33:19.4488009Z 695 | extern int PQsocketPoll(int sock, int forRead, int forWrite,
2025-06-06T14:33:19.4488674Z | ^~~~~~~~~~~~
2025-06-06T14:33:19.5049838Z /bin/bash /tmp/php-build/source/8.4.8/libtool --silent --preserve-dup-deps --tag=CC --mode=compile cc -Iext/phar/ -I/tmp/php-build/source/8.4.8/ext/phar/ -I/tmp/php-build/source/8.4.8/main -I/tmp/php-build/source/8.4.8 -I/tmp/php-build/source/8.4.8/ext/date/lib -I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu -I/usr/include/libpng16 -I/tmp/php-build/source/8.4.8/ext/mbstring/libmbfl -I/tmp/php-build/source/8.4.8/ext/mbstring/libmbfl/mbfl -I/usr/include/postgresql -I/usr/local/include -I/usr/include/tidy -I/tmp/php-build/source/8.4.8/TSRM -I/tmp/php-build/source/8.4.8/Zend -D_GNU_SOURCE -fno-common -Wstrict-prototypes -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -g -O2 -ffp-contract=off -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php-build/source/8.4.8/ext/phar/dirstream.c -o ext/phar/dirstream.lo -MMD -MF ext/phar/dirstream.dep -MT ext/phar/dirstream.lo
2025-06-06T14:33:19.7115661Z make: *** [Makefile:2293: ext/pgsql/pgsql.lo] Error 1
2025-06-06T14:33:19.7120397Z make: *** Waiting for unfinished jobs....
2025-06-06T14:33:20.8586576Z
2025-06-06T14:33:20.8587338Z -----------------
2025-06-06T14:33:20.8587740Z | BUILD ERROR |
2025-06-06T14:33:20.8588026Z -----------------
2025-06-06T14:33:20.8588212Z
2025-06-06T14:33:20.8588359Z Here are the last 10 lines from the log:
2025-06-06T14:33:20.8588664Z
2025-06-06T14:33:20.8588802Z -----------------------------------------
2025-06-06T14:33:20.8605660Z | ^~~~~~~~~~~~~~~~
2025-06-06T14:33:20.8607410Z /tmp/php-build/source/8.4.8/ext/pgsql/pgsql.c:444:12: error: static declaration of ‘PQsocketPoll’ follows non-static declaration
2025-06-06T14:33:20.8608541Z 444 | static int PQsocketPoll(int socket, int read, int write, time_t timeout)
2025-06-06T14:33:20.8609137Z | ^~~~~~~~~~~~
2025-06-06T14:33:20.8610460Z /usr/include/postgresql/libpq-fe.h:695:17: note: previous declaration of ‘PQsocketPoll’ with type ‘int(int, int, int, pg_usec_time_t)’ {aka ‘int(int, int, int, long int)’}
2025-06-06T14:33:20.8611741Z 695 | extern int PQsocketPoll(int sock, int forRead, int forWrite,
2025-06-06T14:33:20.8612088Z | ^~~~~~~~~~~~
2025-06-06T14:33:20.8615497Z /bin/bash /tmp/php-build/source/8.4.8/libtool --silent --preserve-dup-deps --tag=CC --mode=compile cc -Iext/phar/ -I/tmp/php-build/source/8.4.8/ext/phar/ -I/tmp/php-build/source/8.4.8/main -I/tmp/php-build/source/8.4.8 -I/tmp/php-build/source/8.4.8/ext/date/lib -I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu -I/usr/include/libpng16 -I/tmp/php-build/source/8.4.8/ext/mbstring/libmbfl -I/tmp/php-build/source/8.4.8/ext/mbstring/libmbfl/mbfl -I/usr/include/postgresql -I/usr/local/include -I/usr/include/tidy -I/tmp/php-build/source/8.4.8/TSRM -I/tmp/php-build/source/8.4.8/Zend -D_GNU_SOURCE -fno-common -Wstrict-prototypes -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -g -O2 -ffp-contract=off -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php-build/source/8.4.8/ext/phar/dirstream.c -o ext/phar/dirstream.lo -MMD -MF ext/phar/dirstream.dep -MT ext/phar/dirstream.lo
2025-06-06T14:33:20.8619186Z make: *** [Makefile:2293: ext/pgsql/pgsql.lo] Error 1
2025-06-06T14:33:20.8619475Z make: *** Waiting for unfinished jobs....
2025-06-06T14:33:20.8619725Z -----------------------------------------
2025-06-06T14:33:20.8619886Z
2025-06-06T14:33:20.8620051Z The full Log is available at '/tmp/php-build.8.4.8.20250606142957.log'.
2025-06-06T14:33:20.8620383Z [Warn]: Aborting build.
2025-06-06T14:33:21.4483556Z ##[error]The process '/home/runner/work/_actions/nanasess/setup-php/master/lib/phpenv-install-php-ubuntu.sh' failed with exit code 2
While attempting to use 8.4, it does not find a apt version and falls back to trying to compile PHP. It fails during PostgreSQL adding.
I suspect a newer version of PostgreSQL would resolve the problem. But a ppa does exist for 8.4.