Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98626 - php configure fails on no -lreadline but it's actually -lpq
Summary: php configure fails on no -lreadline but it's actually -lpq
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-10 22:48 UTC by Stephen Leaf
Modified: 2005-07-11 16:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Leaf 2005-07-10 22:48:20 UTC
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 :)
Comment 1 Stephen Leaf 2005-07-10 22:50:31 UTC
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  
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-11 10:41:21 UTC
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.
Comment 3 Masatomo Nakano (RETIRED) gentoo-dev 2005-07-11 13:25:15 UTC
can you reemrge libpq, then php again?
Comment 4 Stephen Leaf 2005-07-11 13:34:30 UTC
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 :)). 
Comment 5 Masatomo Nakano (RETIRED) gentoo-dev 2005-07-11 14:04:14 UTC
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.
Comment 6 Stephen Leaf 2005-07-11 16:01:24 UTC
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.