Well, it took a little work, but I think I've got php working with postgresql. The key was a missing -lcrypt. The whole problem seems to come about because all of the php config stuff is usually done dynamically and therefore doesn't usually need to pass -lcrypt (even though it does tests for crypt()). The other issue is that this is an indirect dependency resulting from libpq.
I first patched php.spec and then realized I really had to patch apache.specsince it includes it's own distribution of php. Now, is there any better way to handle this? In essence, you can't use -libpq without using -lcrypt (and a few other things, too). Is there some way to get the build options you need to use a package from the source package? Packages like python (and apache?) have tools that capture necessary parts of build state for a particular instance to allow for compiling new components without requiring a build inside the source tree . I realize this could break down somewhere in permutations, but it seems like we need a better way to handle this. Here are the diffs I needed. Is it possible I did something wrong? Is it possible people aren't using php+postgresql? Maybe they wouldn't have noticed, since it wasn't completely broken. I did this BTW, to get Gallery2 ( *gallery*.menalto.com) working. -Dave --- apache.spec 2007-02-11 10:00:55.000000000 -0500 +++ apache.spec.mod 2007-03-12 21:35:38.000000000 -0400 @@ -759,6 +759,9 @@ ORACLE_HOME="`%{l_rc} --query oracle_home`" export ORACLE_HOME %endif +%if "%{with_mod_php_pgsql}" == "yes" + LIBS="$LIBS -lcrypt" +%endif %if "%{with_mod_php_sendmail}" == "yes" PROG_SENDMAIL="%{l_prefix}/sbin/sendmail" \ %else --- php.spec 2007-02-11 09:55:54.000000000 -0500 +++ php.spec.mod 2007-03-12 21:50:53.000000000 -0400 @@ -317,6 +317,9 @@ ORACLE_HOME="`%{l_rc} --query oracle_home`" export ORACLE_HOME %endif +%if "%{with_pgsql}" == "yes" + libs="$libs -lcrypt" +%endif CC="%{l_cc}" \ CFLAGS="$cflags" \ CPPFLAGS="$cppflags" \