Emerging dev-lang/php-5.1.6-r6 always fails with error "pgsql.c ...undefined reference to `PQsendPrepare'" Reproducible: Always Steps to Reproduce: 1. emerge php 2. 3. Actual Results: +++ SNIP +++ -lpspell -lpq -lpanel -lncurses -lmcrypt -lltdl -lcrypt -lpam -lt1 -lfreetype -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lxml2 -lz -lm -lssl -lcrypto -ldl -lcrypt -lxml2 -lz -lm -lcrypt -o sapi/cli/php /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libc-client.a(osdep.o): In function `ssl_onceonlyinit': : warning: the use of `tmpnam' is dangerous, better use `mkstemp' ext/pgsql/pgsql.o: In function `zif_pg_send_prepare': pgsql.c:(.text+0xb510): undefined reference to `PQsendPrepare' pgsql.c:(.text+0xb55a): undefined reference to `PQsendPrepare' ext/pgsql/pgsql.o: In function `zif_pg_prepare': pgsql.c:(.text+0xdc81): undefined reference to `PQprepare' pgsql.c:(.text+0xde64): undefined reference to `PQprepare' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 !!! ERROR: dev-lang/php-5.1.6-r6 failed. Call stack: ebuild.sh, line 1546: Called dyn_compile ebuild.sh, line 937: Called src_compile php-5.1.6-r6.ebuild, line 173: Called src_compile_normal php-5.1.6-r6.ebuild, line 323: Called php5_1-sapi_src_compile php5_1-sapi.eclass, line 577: Called die !!! make failed !!! If you need support, post the topmost build error, and the call stack if relevant. Expected Results: Successful emerged php Will create attachments
Created attachment 106638 [details] emerge -pvD php
Comment on attachment 106638 [details] emerge -pvD php tux ~ # psql -V psql (PostgreSQL) 8.0.9 contains support for command-line editing
Created attachment 106640 [details] postgres version tux ~ # psql -V psql (PostgreSQL) 8.0.9 contains support for command-line editing
Created attachment 106642 [details] source code for pgsql.c
I have unmerged postgres and all versions of PHP several times and it always fails. I have looked throught pgsql.c and see no #define lines for those two functions.
I do see and old reference to them as patches here (with code): http://svr5.postgresql.org/pgsql-patches/2004-10/msg00279.php
Works here, tested with multiple PgSQL versions... Please try 5.2.1-r3, if it still doesn't work, report upstream. Best regards, CHTEKK.