Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 296519

Summary: dev-lang/php-5.2.11-r1 fail to build with configure: error: readline library not found
Product: Gentoo Linux Reporter: Alessandro Surace <zioalex>
Component: [OLD] DevelopmentAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal CC: jmbsvicetto, ormaaj
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
environment.log
Build log
config.log

Description Alessandro Surace 2009-12-11 13:24:12 UTC
After an update of the world I get the follow problem on php:
configure: error: readline library not found
After an analysis I've seen that readline is present and the problem is in the aspell library:
/usr/lib/libaspell.so.15: undefined reference to `operator delete(void*)@GLIBCXX_3.4'
/usr/lib/libaspell.so.15: undefined reference to `vtable for __cxxabiv1::__si_class_type_info@CXXABI_1.3'
/usr/lib/libaspell.so.15: undefined reference to `operator delete[](void*)@GLIBCXX_3.4'
/usr/lib/libaspell.so.15: undefined reference to `operator new(unsigned long)@GLIBCXX_3.4'
/usr/lib/libaspell.so.15: undefined reference to `__cxa_bad_typeid@CXXABI_1.3'
/usr/lib/libaspell.so.15: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info@CXXABI_1.3'

I've tried without the readline USE flag and the same error occours on snmp...
I've tried to reinstall aspell but the problem persist.
Instead I've commented the spell USE flag and php build correctly.


Reproducible: Always

Steps to Reproduce:
1. emerge -av php
2.
3.
Comment 1 Alessandro Surace 2009-12-11 13:24:42 UTC
Created attachment 212697 [details]
emerge --info
Comment 2 Alessandro Surace 2009-12-11 13:25:22 UTC
Created attachment 212698 [details]
environment.log
Comment 3 Alessandro Surace 2009-12-11 13:26:15 UTC
Created attachment 212699 [details]
Build log
Comment 4 Alessandro Surace 2009-12-11 13:27:53 UTC
Created attachment 212701 [details]
config.log
Comment 5 Jorge Manuel B. S. Vicetto (RETIRED) gentoo-dev 2009-12-11 22:49:24 UTC
Have you tried building with ccache disabled?
Comment 6 Rafał Mużyło 2009-12-13 01:48:20 UTC
Looking at those errors, I'd say he upgraded
his gcc and set in back to the older version later.
While for C programs it's rarely ever a problem,
it's completely different matter with C++.
Comment 7 Alessandro Surace 2009-12-15 14:08:06 UTC
Hi Guys,
updating my system I've seen another problems regarding GLIBCXX_3.4 and I begun to find that library...
After some tests I have understood that the problem was in sys-libs/libstdc++-v3 .
I don't know why but, in some way and with some package, it interfere with the correct build.
Removing it I've solved my problem but I think could be useful understand where was the problem.

(In reply to comment #6)
> Looking at those errors, I'd say he upgraded
> his gcc and set in back to the older version later.
> While for C programs it's rarely ever a problem,
> it's completely different matter with C++.
> 

Comment 8 Jeremy 2010-01-12 22:07:01 UTC
I've got the same problem (configure fails on -lreadline), but looking in config.log in the build directory, I think it's related to not catching eselect errors (I had upgraded to a new postgresql, removed the old version, but not eselected the new version).  After eselecting the new postgresql version, the error went away.

The little eselect error message occurs in quite a large number of other configure tests, just readline is the first one to cause a hard error.

--- snip from config.log ---
configure:84204: checking for readline in -lreadline
configure:84229: i686-pc-linux-gnu-gcc -o conftest -I/usr/include -O2 -march=i686 -pipe -D_GNU_SOURCE  -L/usr/lib -Wl,-O1 -Wl,-rpath,/v
ar/tmp/portage/dev-lang/php-5.2.12/work/php-5.2.12/Use eselect to set postgresql version -L/var/tmp/portage/dev-lang/php-5.2.12/work/ph
p-5.2.12/Use eselect to set postgresql version conftest.c -lreadline  -lpspell -lpq -lpanel -lncurses -lmysqlclient -lmcrypt -lltdl -lc
rypt -lpam -lt1 -lfreetype -lpng -lz -ljpeg -ldb -lgdbm -lcurl -lbz2 -lz -lpcre -lcrypt -lrt -lresolv -lm -ldl -lnsl  -lcrypt -lxml2 -l
z -lm -lssl -lcrypto -ldl -lz -lcurl -lrt -lz -lgnutls -lxml2 -lz -lm -lssl -lcrypto -ldl -lz >&5
i686-pc-linux-gnu-gcc: eselect: No such file or directory
i686-pc-linux-gnu-gcc: to: No such file or directory
i686-pc-linux-gnu-gcc: set: No such file or directory
i686-pc-linux-gnu-gcc: postgresql: No such file or directory
i686-pc-linux-gnu-gcc: version: No such file or directory
i686-pc-linux-gnu-gcc: eselect: No such file or directory
i686-pc-linux-gnu-gcc: to: No such file or directory
i686-pc-linux-gnu-gcc: set: No such file or directory
i686-pc-linux-gnu-gcc: postgresql: No such file or directory
i686-pc-linux-gnu-gcc: version: No such file or directory
--- end ---


(In reply to comment #7)
> Hi Guys,
> updating my system I've seen another problems regarding GLIBCXX_3.4 and I begun
> to find that library...
> After some tests I have understood that the problem was in
> sys-libs/libstdc++-v3 .
> I don't know why but, in some way and with some package, it interfere with the
> correct build.
> Removing it I've solved my problem but I think could be useful understand where
> was the problem.
> 
> (In reply to comment #6)
> > Looking at those errors, I'd say he upgraded
> > his gcc and set in back to the older version later.
> > While for C programs it's rarely ever a problem,
> > it's completely different matter with C++.
> > 
> 

Comment 9 Jeremy 2010-01-12 22:13:59 UTC
Ahh sorry for the noise, I hadn't read the other config.log.  Looks like 2 separate problems with the same symptom.
Comment 10 Daniel Douglas 2010-01-28 00:25:32 UTC
I'm having similar problems but not understanding what the issue is from this thread.

(In reply to comment #6)
> Looking at those errors, I'd say he upgraded
> his gcc and set in back to the older version later.
> While for C programs it's rarely ever a problem,
> it's completely different matter with C++.
> 

I do this occasionally, but what is the proper way to do this if any, what problems does it cause, and how do you fix those problems?
Comment 11 Doktor Notor 2010-02-15 14:36:05 UTC
Well, your aspell and whatnot else is pretty much broken after GCC upgrade

http://www.gentoo.org/doc/en/gcc-upgrading.xml. 
Comment 12 Daniel Douglas 2010-02-21 09:02:25 UTC
(In reply to comment #11)
> Well, your aspell and whatnot else is pretty much broken after GCC upgrade
> 
> http://www.gentoo.org/doc/en/gcc-upgrading.xml. 
> 

I've read that before and it sounds like most of those instructions relate to libtool issues, and only apply when upgrading from gcc3 to gcc4. I'm just talking about having a few versions of gcc4 installed and toggling between them with gcc-config, which I do very infrequently. Running the fix_libtool_files.sh never seems to have any effect, and I'm pretty sure it gets run automatically when installing gcc.

In any event, is there a solution to this problem? php is still failing during configure because of the readline issue.
Comment 13 Daniel Douglas 2010-02-21 09:52:11 UTC
Heh, re-merging php with USE="-readline", than merging it again with readline did the trick. No idea, just tried it and it randomly worked. Looks like everyone has a different solution for this.
Comment 14 Doktor Notor 2010-03-07 12:36:18 UTC
Well, than it works, about time to close this bug I guess? Mess resulting from incomplete/improper gcc upgrade is in no way a PHP bug.
Comment 15 Thomas Sachau gentoo-dev 2010-03-11 19:30:38 UTC
Since no issue was with php itself, i will close this bug as invalid