The error: checking for readline in -lreadline... no configure: error: readline library not found !!! Please attach the config.log to your bug report: !!! /var/tmp/portage/php-5.0.4-r1/work/php-5.0.4/config.log the config.log: configure:72928: checking for readline in -lreadline configure:72947: gcc -o conftest -O3 -march=pentium4 -fomit-frame-pointer -Wl,-z,now -Wl,-rpath,/usr/local/lib -L/usr/loca$ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lpq collect2: ld returned 1 exit status configure: failed program was: #line 72936 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char readline(); int main() { readline() ; return 0; } I'd kinda like to know why there are so many libraries being used to check 1 library. Reproducible: Always Steps to Reproduce: 1. have a problem with libpq.so.3 not being there anymore due to an update or something weird happening. 2. try to fix the libpq.so.3 problem by starting with php instead of libpqxx or libpq 3. wait and see the error :)
The full line (darn no line wrapping ;)) configure:72947: gcc -o conftest -O3 -march=pentium4 -fomit-frame-pointer -Wl,-z,now -Wl,-rpath,/usr/local/lib -L/usr/local/lib conftest.c -lreadline -lpspell -lpq -lpanel -lncurses -lmcrypt -lltdl -lldap -llber -lt1 -lfreetype -lpng -lz -ljpeg -lfam -lgdbm -lcurl -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lcurl -lidn -lssl -lcrypto -ldl -lssl -lcrypto -ldl -lz -lxml2 -lz -lm -lodbc 1>&5
Blame upstream PHP for their crappy configure script. Their system repeatedly adds libs onto a list, and builds every test program linking against the complete list of libs at that point. libpq is a postgres thing I think, so I'm passing this to them.
can you reemrge libpq, then php again?
yes that's actually the easy work around. I just reported it so that in future releases it would actually report the right problem. probably should have reported this upstream instead of here as it affects all distributions. my only complaint was that it said readline failed but it was actually libpq that failed. libpq re-merged great.. not sure why I had to re-merge it tho. this unfortunately wouldn't be the first time files suddenly went missing. always happens around an upgrade. I can't reproduce it either. just files go missing once in a while so I have to re-merge it (after I find out that a program isn't loading that is :)).
I have no idea about unclear error message in php configure script. And there was a problem in previous libpq ebuild in ~arch version. I guess you set ~x86(or something)? As you might know, ~arch is for testing. so sometime system becomes unstable. If you want to use system more stable, please use without ~. I'll bump libpq ebuild version to make all user re-emerge later. I'm closing this bug. Feel free to reopen, if you still have probles.
actually I'm using stable. I'm well aware of the ~x86 branch. the bug this describes is just that the configure script for php fails with the -lpq when it's testing -lreadline. truthfully tho this is one to be sent upstream to php. not quite sure why I did it here.