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

Bug 456820

Summary: dev-lang/php-5.3.21-r2 fails to compile with USE="ssl"
Product: Gentoo Linux Reporter: Chris Jowett <cryptk>
Component: [OLD] DevelopmentAssignee: PHP Bugs <php-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: cryptk
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log
emerge --info
emerge -pqv
environment
php-5.3.21-r2.ebuild.patch

Description Chris Jowett 2013-02-11 17:58:19 UTC
When compiling dev-lang/php-5.3.21-r2 (but it affects at least 5.3.18 as well), the compilation fails with error messages relating to openssl.  It appears that the configure syntax that the ebuild is providing is incorrect.  It runs configure with '--with-openssl' when it should be '--with-openssl /usr'

Reproducible: Always

Steps to Reproduce:
1. emerge -av =dev-lang/php-5.3.21-r2
Actual Results:  
PHP compilation fails with openssl errors relating to undefined references

Expected Results:  
compile completes successfully

I have been able to get php to compile successfully by placing a copy of the php-5.3.21-r2.ebuild in my local overlay and modifying line 439 from:

    $(use_with ssl openssl )

to:

    $(use_with ssl openssl /usr )
Comment 1 Chris Jowett 2013-02-11 18:00:03 UTC
Created attachment 338618 [details]
build log
Comment 2 Chris Jowett 2013-02-11 18:00:56 UTC
Created attachment 338620 [details]
emerge --info
Comment 3 Chris Jowett 2013-02-11 18:05:56 UTC
Created attachment 338622 [details]
emerge -pqv
Comment 4 Chris Jowett 2013-02-11 18:06:50 UTC
Created attachment 338624 [details]
environment
Comment 5 Chris Jowett 2013-02-11 18:08:48 UTC
Created attachment 338626 [details, diff]
php-5.3.21-r2.ebuild.patch

This is a patch to the php-5.3.21-r2.ebuild that allows it to compile successfully on my system
Comment 6 Chris Jowett 2013-02-11 18:17:04 UTC
One thing to note is the last libtool line before the errors begin, specifically, the lack of -lssl in it:

-lcrypt -lresolv -lreadline -lncurses -laspell -lpspell -lmcrypt -lltdl -lonig -lldap -llber -lt1 -lfreetype -lpng -lz -ljpeg -ldb-4.8 -lgdbm -lbz2 -lz -lpcre -lcrypt -lrt -lm -ldl -lnsl -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt  -o sapi/cli/php

With the attached patch, -lssl is now present, the errors are gone, and the compilation completes successfully.
Comment 7 Chris Jowett 2013-02-11 18:26:16 UTC
Forgot to mention, I found this during an emptytree rebuild after switching to the new default/linux/amd64/13.0/desktop/kde profile.  I can't confirm if it happens on the old 10.0 profile as that one is no longer available in eselect.
Comment 8 Chris Jowett 2013-02-12 08:54:30 UTC
It appears that my bug here is a duplicate of bug 455040 however this one includes a patch file with a fix.
Comment 9 Ole Markus With (RETIRED) gentoo-dev 2013-03-23 17:58:54 UTC

*** This bug has been marked as a duplicate of bug 455040 ***