Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455040 - dev-lang/php-5.3.21-r1 fails with undefined reference errors
Summary: dev-lang/php-5.3.21-r1 fails with undefined reference errors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
: 456820 462716 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-01 17:58 UTC by Paul Varner (RETIRED)
Modified: 2019-04-26 02:39 UTC (History)
4 users (show)

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


Attachments
Build.log.gz (php-5.3.21-r1-build.log.gz,26.56 KB, application/octet-stream)
2013-02-01 18:01 UTC, Paul Varner (RETIRED)
Details
config.log.gz (config.log.gz,42.78 KB, application/octet-stream)
2013-02-02 02:08 UTC, Paul Varner (RETIRED)
Details
sapis-build/cli/config.log (2_config.log.gz,44.81 KB, application/gzip)
2013-02-04 13:49 UTC, Thomas Deutschmann (RETIRED)
Details
2_build.log (2_build.log.gz,33.69 KB, text/plain)
2013-02-04 13:49 UTC, Thomas Deutschmann (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Varner (RETIRED) gentoo-dev 2013-02-01 17:58:49 UTC
dev-lang/php-5.3.21-r1 fails to build with multiple "undefined reference" errors

Reproducible: Always

Steps to Reproduce:
1. emerge -av1 dev-lang/php-5.3.21-r1
2.
3.
Actual Results:  
Build fails

Expected Results:  
Build succeeds

# emerge --info
Portage 2.1.11.50 (default/linux/amd64/13.0/no-multilib, gcc-4.6.3, glibc-2.16.0, 3.2.1-gentoo-r2 x86_64)
=================================================================
System uname: Linux-3.2.1-gentoo-r2-x86_64-Intel-R-_Xeon-R-_CPU_X5650_@_2.67GHz-with-gentoo-2.2
KiB Mem:     4053996 total,    670412 free
KiB Swap:    2097148 total,   2095584 free
Timestamp of tree: Fri, 01 Feb 2013 08:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p42
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.69
sys-devel/automake:       1.12.6, 1.13.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind /var/www/localhost/htdocs/roundcube/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://gentoo.osuosl.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/local"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="amd64 apache2 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gpm iconv mmx modules mudflap ncurses nls nptl openmp pam readline session sse sse2 ssl tcpd unicode zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3 php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Paul Varner (RETIRED) gentoo-dev 2013-02-01 18:01:06 UTC
Created attachment 337618 [details]
Build.log.gz
Comment 2 Rafał Mużyło 2013-02-01 19:07:52 UTC
Attach the relevant (as there'll be more than one) config.log - it looks as if openssl was detected, but the lib was not added to the linking command.
Comment 3 Paul Varner (RETIRED) gentoo-dev 2013-02-01 21:32:12 UTC
These are the only config.log files that I see:

# pwd
/var/tmp/portage/dev-lang/php-5.3.21-r1
# find . -name 'config.log' -print
./work/sapis-build/apache2/config.log
./work/sapis-build/cli/config.log

Are they the ones that you need?
Comment 4 Rafał Mużyło 2013-02-02 00:22:18 UTC
While one for apache2 is likely just as broken, it's the other one that matters atm.
Comment 5 Paul Varner (RETIRED) gentoo-dev 2013-02-02 02:08:13 UTC
Created attachment 337646 [details]
config.log.gz
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2013-02-04 13:49:09 UTC
Created attachment 337914 [details]
sapis-build/cli/config.log
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2013-02-04 13:49:49 UTC
Created attachment 337918 [details]
2_build.log
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2013-02-04 13:50:18 UTC
I have the same problem. I attached the requested files, too.
Comment 9 Chris Jowett 2013-02-12 09:08:14 UTC
I also experienced this issue.  I did not find this bug report before filing my own, but over in bug 456820 I have a correction to the ebuild that fixes things right up.
Comment 10 Rafał Mużyło 2013-02-12 17:40:58 UTC
(In reply to comment #9)
> I also experienced this issue.  I did not find this bug report before filing
> my own, but over in bug 456820 I have a correction to the ebuild that fixes
> things right up.

Well, the catch is that this correction shouldn't be necessary.
Check what following return:
pkg-config --atleast-version=0.9.6 openssl
pkg-config --libs openssl
pkg-config --variable=includedir openssl

- you'll most likely get the correct values and that would mean it's a case of a problem that happens elsewhere.

I've got a bad feeling about it - could one of you attach the generated configure script ?
Comment 11 Thomas Deutschmann (RETIRED) gentoo-dev 2013-02-12 21:02:19 UTC
(In reply to comment #10)
> Check what following return:
> pkg-config --atleast-version=0.9.6 openssl
> pkg-config --libs openssl
> pkg-config --variable=includedir openssl

From one of my boxes:

gentoo-master ~ # pkg-config --atleast-version=0.9.6 openssl
gentoo-master ~ # pkg-config --libs openssl
-lssl -lcrypto 
gentoo-master ~ # pkg-config --variable=includedir openssl
/usr/include

dev-libs/openssl-1.0.1d-r1 is installed on this system.


> I've got a bad feeling about it - could one of you attach the generated
> configure script ?

Which one? Thought every configure script was already posted. Anyway, I created an archive from /var/tmp/portage/dev-lang/php-5.3.21-r1 - please feel free to grab the files you are looking for: https://www.hidrive.strato.com/lnk/ZmMqi0WS (50MB)
Comment 12 Rafał Mużyło 2013-02-13 20:42:19 UTC
OK, I might have an idea what happens:
'pkg-config --libs openssl' returns '-lsl -lcrypto' (this is OPENSSL_LIBS)
'pkg-config --cflags-only-I openssl' returns '' (this is OPENSSL_INCS)

The condition for appending is 'test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"'.
Now, obviously OPENSSL_INCS will fail the test, even though that wouldn't hurt in this case.

Perhaps instead OPENSSL_INCDIR should be used in the test instead ?

This problem *might* stem from openssl-1.0.0h-pkg-config.patch in dev-libs/openssl, on the other hand though even 'pkg-config --cflags libssl' returns '', so it might be something about pkg-config itself.
Comment 13 Thomas Deutschmann (RETIRED) gentoo-dev 2013-02-20 08:25:40 UTC
Can we raise the severity? This seems to be a blocker for any dev-lang/php-5.3.x version. For example, I am unable to build any dev-lang/php-5.3.x ebuild on any Gentoo system with OpenSSL v1.0.0.

I always get the same error as shown in this bug report. I tried x86 and amd64.

When I downgrade to OpenSSL v0.9.x everything will work.

Note: The initial bug report for dev-lang/php-5.3.21 seems to be the first PHP update *after* OpenSSL v1.0.0 hit the tree (=before php-5.3.21, OpenSSL was at version 0.9.x). I think more and more people will be affected by this bug, when they need to recompile or when the next version will hit the tree.
Comment 14 Ole Markus With (RETIRED) gentoo-dev 2013-02-20 10:44:43 UTC
None of my boxes have any of these issues.

Is only php-5.3.x affected or does this affect 5.4.x as well?
Comment 15 Thomas Deutschmann (RETIRED) gentoo-dev 2013-02-20 12:03:06 UTC
(In reply to comment #14)
> None of my boxes have any of these issues.

You are really able to build dev-lang/php-5.3.x with "ssl" useflag on systems with openssl-1.0.x?

If yes, it would be interesting what's the difference between our systems, causing the problem.

As I said, I tried every available openssl-1.0.x ebuild without success. Only when I go back to openssl-0.9.x dev-lang/php-5.3.x will build with the ssl useflag.

Without the "ssl" useflag - no surprise - I can also build dev-lang/php-5.3.x.


> Is only php-5.3.x affected or does this affect 5.4.x as well?

No, only php-5.3.x.

php-5.4.x is working fine.
Comment 16 Thomas Deutschmann (RETIRED) gentoo-dev 2013-02-20 12:19:04 UTC
The solution from https://bugs.gentoo.org/show_bug.cgi?id=456820 seems to be a valid patch for me. If you compare the php-5.4.x ebuild with the php-5.3.x ebuild that is the only different.

Here's my patch, which works for me:

--- php-5.3.21-r2.ebuild	2013-02-07 14:58:17.000000000 +0100
+++ php-5.3.21-r3.ebuild	2013-02-20 13:17:01.000000000 +0100
@@ -436,7 +436,7 @@
 	$(use_with crypt mcrypt )
 	$(use_with mssql mssql )
 	$(use_with unicode onig /usr)
-	$(use_with ssl openssl )
+	$(use_with ssl openssl /usr)
 	$(use_with ssl openssl-dir /usr)
 	$(use_enable pcntl pcntl )
 	$(use_enable phar phar )
Comment 17 Ole Markus With (RETIRED) gentoo-dev 2013-02-20 12:26:53 UTC
Yep.

On two of my boxes:
openssl 1.0.1c, php5.3.18

On another:
openssl 1.0.0j, php5.3.21-r2

All show something like this:
% scanelf -n /usr/lib/php5.3/bin/php libresolv.so.2,libreadline.so.6,libmcrypt.so.4,libdl.so.2,libonig.so.2,libpng15.so.15,libz.so.1,libjpeg.so.8,libdb-4.8.so,libpthread.so.0,libgdbm.so.3,libcurl.so.4,libbz2.so.1,libpcre.so.0,libm.so.6,libxml2.so.2,libssl.so.1.0.0,libcrypto.so.1.0.0,libicui18n.so.49,libicuuc.so.49,libgcc_s.so.1,libc.so.6,libstdc++.so.6 /usr/lib/php5.3/bin/php 

${EPREFIX}/usr was added to 5.4 for prefix support and should not be necessary for 5.3.
Comment 18 Thomas Deutschmann (RETIRED) gentoo-dev 2013-02-20 13:11:26 UTC
So what could be the reason? Can I help you with comparing our boxes to find the difference why it is working on your boxes?

# pkg-config --atleast-version=0.9.6 openssl
# echo $?
0
# pkg-config --libs openssl
-lssl -lcrypto
# echo $?
0
# pkg-config --cflags-only-I openssl

# echo $?
0
# pkg-config --variable=includedir openssl
/usr/include

Have you seen Rafal's comment #12?

BTW: I emerged openssl-1.0.1c without openssl-1.0.0h-pkg-config.patch and nothing changed. Still the same error.


> ${EPREFIX}/usr was added to 5.4 for prefix support and
> should not be necessary for 5.3.

Sure? I mean there is already

  $(use_with ssl openssl-dir /usr)

in 5.3, so why not also adding this for "openssl" (only openssl-dir looks wrong to me)? If this would be a "wrong" fix, I'd like to know why.
Comment 19 Ole Markus With (RETIRED) gentoo-dev 2013-02-20 13:35:37 UTC
(In reply to comment #18)
> So what could be the reason? Can I help you with comparing our boxes to find
> the difference why it is working on your boxes?
> 
> # pkg-config --atleast-version=0.9.6 openssl
> # echo $?
> 0
> # pkg-config --libs openssl
> -lssl -lcrypto
> # echo $?
> 0
> # pkg-config --cflags-only-I openssl
> 
> # echo $?
> 0
> # pkg-config --variable=includedir openssl
> /usr/include
> 

Output of these are identical to yours.

> 
> 
> > ${EPREFIX}/usr was added to 5.4 for prefix support and
> > should not be necessary for 5.3.
> 
> Sure? I mean there is already
> 
>   $(use_with ssl openssl-dir /usr)
> 
> in 5.3, so why not also adding this for "openssl" (only openssl-dir looks
> wrong to me)? If this would be a "wrong" fix, I'd like to know why.

It is not exactly wrong, but it is more a workaround than a fix. The problem is something else.
Comment 20 Rafał Mużyło 2013-02-21 01:09:06 UTC
@comment 19: given how php handles linking, is there a chance that something else adds the lib for you ?
That is do your useflags match *exactly* ?
Comment 21 Ole Markus With (RETIRED) gentoo-dev 2013-02-21 09:17:12 UTC
(In reply to comment #20)
> @comment 19: given how php handles linking, is there a chance that something
> else adds the lib for you ?
> That is do your useflags match *exactly* ?

Was looking into that. The minimal USE flag combination that works is:
USE="-* cli ldap ssl" emerge -av php:5.3

So apparently ldap adds the lib. Could also explain why more people are not hit by this--ldap is enabled by default.
Comment 22 Thomas Deutschmann (RETIRED) gentoo-dev 2013-02-21 11:11:45 UTC
(In reply to comment #21)
> So apparently ldap adds the lib. Could also explain why more people are not
> hit by this--ldap is enabled by default.

Interesting:

On a "current" system with "default/linux/amd64/13.0" profile,

# grep -nr ldap /etc/portage

returns nothing and the default PHP 5.3 useflags are:

# emerge -pv php:5.3

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-libs/oniguruma-5.9.2-r1  USE="-combination-explosion-check -crnl-as-line-terminator -static-libs" 528 kB
[ebuild  N     ] app-admin/eselect-php-0.6.7  2 kB
[ebuild  N     ] dev-libs/libmcrypt-2.5.8-r2  1,304 kB
[ebuild  N     ] dev-lang/php-5.3.21-r2:5.3  USE="berkdb bzip2 cli crypt ctype fileinfo filter gdbm hash iconv ipv6 json nls phar posix readline session simplexml ssl tokenizer unicode xml zlib -apache2 -bcmath -calendar -cdb -cgi -cjk -curl -curlwrappers -debug -doc -embed -enchant -exif -firebird -flatfile -fpm (-frontbase) -ftp -gd -gmp -imap -inifile -intl -iodbc -kerberos (-kolab) -ldap -ldap-sasl -libedit -mhash -mssql -mysql -mysqli -mysqlnd -oci8-instant-client -odbc -pcntl -pdo -pic -postgres -qdbm -recode (-selinux) -sharedmem -snmp -soap -sockets -spell -sqlite -sqlite2 (-sybase-ct) -sysvipc -threads -tidy -truetype -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -zip" 11,104 kB

No ldap here.

emerge will fail with the undefined reference error.

But yes,

  USE="-* cli ldap ssl" emerge -av php:5.3

will work by the way.

Did I misunderstand you?
Comment 23 Chris Jowett 2013-02-21 11:18:15 UTC
On my system, when I first installed php5.3, I was on the profile before 13.0 (I think it was 10.0).  I did not experience this issue until after I changed to 13.0 and did an emptytree rebuild.

That said, there could have been a change from before the profile change that caused it, but I had also performed an emerge -e about a week prior to the profile change, so it doesn't seem too likely.

It would seem that it's possible that the 13.0 profile has changed something which caused this.

-ChrisJ
Comment 24 Ole Markus With (RETIRED) gentoo-dev 2013-02-21 12:12:37 UTC
(In reply to comment #22)
> (In reply to comment #21)
> > So apparently ldap adds the lib. Could also explain why more people are not
> > hit by this--ldap is enabled by default.
> 
> Interesting:
> 
> On a "current" system with "default/linux/amd64/13.0" profile,
> 
> # grep -nr ldap /etc/portage
> 
> returns nothing and the default PHP 5.3 useflags are:
> 

You are quite right. I was looking on a machine with desktop profile, which has it enabled by default.

So when looking at how my servers were set up:

pkgconfig-0.28: USE="-* ssl cli" emerge php:5.3 << this breaks
pkgconfig-0.27-1: USE="-* ssl cli" emerge php:5.3 << this works
Comment 25 Ole Markus With (RETIRED) gentoo-dev 2013-02-21 12:15:26 UTC
(In reply to comment #23)
> On my system, when I first installed php5.3, I was on the profile before
> 13.0 (I think it was 10.0).  I did not experience this issue until after I
> changed to 13.0 and did an emptytree rebuild.
> 
> That said, there could have been a change from before the profile change
> that caused it, but I had also performed an emerge -e about a week prior to
> the profile change, so it doesn't seem too likely.
> 
> It would seem that it's possible that the 13.0 profile has changed something
> which caused this.
> 

From the comment I made above:

Profile change -> upgrade to EAPI5 -> upgrade pkgconfig on your emptytree rebuild.
Comment 26 Thomas Deutschmann (RETIRED) gentoo-dev 2013-02-21 12:22:35 UTC
(In reply to comment #24)
> So when looking at how my servers were set up:
> 
> pkgconfig-0.28: USE="-* ssl cli" emerge php:5.3 << this breaks
> pkgconfig-0.27-1: USE="-* ssl cli" emerge php:5.3 << this works

Confirmed!
Comment 27 Rafał Mużyło 2013-02-21 13:12:48 UTC
(In reply to comment #24)
> (In reply to comment #22)
> 
> You are quite right. I was looking on a machine with desktop profile, which
> has it enabled by default.
> 
> So when looking at how my servers were set up:
> 
> pkgconfig-0.28: USE="-* ssl cli" emerge php:5.3 << this breaks
> pkgconfig-0.27-1: USE="-* ssl cli" emerge php:5.3 << this works


This might sound bit trollish, but happy to hear that my final theory from comment 12 was right.
Comment 28 Ole Markus With (RETIRED) gentoo-dev 2013-02-21 21:52:13 UTC
> 
> This might sound bit trollish, but happy to hear that my final theory from
> comment 12 was right.

Well. I would probably have been able to confirm it sooner where it not for that my initial attempt resulted in this:

Yep. That is 5.3.18 and pkgconfig 0.28. So it still does not happen on all systems, but on those that do, downgrading pkgconfig helps.

Now, how to fix this?

Portage 2.1.11.50 (default/linux/x86/13.0, gcc-4.5.4, glibc-2.15-r3, 3.5.2-linode45 i686)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.5.2-linode45-i686-Intel-R-_Xeon-R-_CPU_L5520_@_2.27GHz-with-gentoo-2.1
KiB Mem:      508576 total,    102016 free
KiB Swap:     262140 total,     79940 free
Timestamp of tree: Thu, 21 Feb 2013 14:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p37
dev-lang/python:          2.6.6-r2, 3.1.3-r1
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.1-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-olemarkus-overlay
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://mirror.mcs.anl.gov/pub/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo ftp://ftp.gtlib.gatech.edu/pub/gentoo"
LC_ALL="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/olemarkus-overlay"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gpm iconv ipv6 logrotate modules mudflap ncurses nls nptl openmp pam pcre readline session ssl tcpd unicode vhosts vim-syntax x86 zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NGINX_MODULES_HTTP="access fastcgi gzip proxy rewrite memcached" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

dev-lang/php-5.3.18 was built with the following:
USE="cli ssl -apache2 -bcmath -berkdb -bzip2 -calendar -cdb -cgi -cjk -crypt -ctype -curl -curlwrappers -debug -doc -embed -enchant -exif -fileinfo -filter -firebird -flatfile -fpm -frontbase -ftp -gd -gdbm -gmp -hash -iconv -imap -inifile -intl -iodbc -ipv6 -json -kerberos (-kolab) -ldap -ldap-sasl -libedit -mhash -mssql -mysql -mysqli -mysqlnd -nls -oci8-instant-client -odbc -pcntl -pdo -phar -pic -posix -postgres -qdbm -readline -recode (-selinux) -session -sharedmem -simplexml -snmp -soap -sockets -spell -sqlite2 -sqlite3 -sybase-ct -sysvipc -threads -tidy -tokenizer -truetype -unicode -wddx -xml -xmlreader -xmlrpc -xmlwriter -xpm -xsl -zip -zlib"
Comment 29 Thomas Deutschmann (RETIRED) gentoo-dev 2013-02-21 23:48:10 UTC
(In reply to comment #28)
> Now, how to fix this?

(In reply to comment #17)
> ${EPREFIX}/usr was added to 5.4 for prefix support and should not be
> necessary for 5.3.

I changed

        $(use_with ssl openssl "${EPREFIX}"/usr)

into

        $(use_with ssl openssl)

so that the *php-5.4* ebuild is identical with the *php-5.3* ebuild. Guess what happen: php-5.4 will now fail with the same error.

=> I would vote for the patch from #16.

That's the same "fix", php-5.4 is using and openssl-dir has already "/usr" set...

If this fix is not valid, php-5.4 has the same bug. Until we find the right fix, maybe we should port the php-5.4 fix to php-5.3...


@ Comment #12:

I run

# USE="-* cli ssl" ebuild php-5.3.21-r2.ebuild prepare

changed

        test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"

into

        test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCDIR"

and run

# USE="-* cli ssl" ebuild php-5.3.21-r2.ebuild compile

This didn't fix the error. But I am not sure if this is a valid test.


OT: How did you create the "system settings" and "package settings" output?
Comment 30 Rafał Mużyło 2013-02-22 06:33:17 UTC
OK, my little ego trip aside, there's something fishy here.
pkg-config is filtering out -I/usr/include *on purpose*.

Also, for some reason pkg-config by itself doesn't change the output of 'pkg-config openssl --cflags-only-I' between 0.27.1 and 0.28 (at least not if compiled outside portage).

Does the output of 'pkg-config openssl --cflags-only-I --debug' change in any significant way for you between 0.27.1 and 0.28 ?
Comment 31 Rafał Mużyło 2013-02-22 06:49:41 UTC
OK, it seems that I didn't read comment 29 carefully enough.

With such difference between php 5.3 and 5.4 ebuilds, two questions arise:
- why does php upstream use a construct that it would seem won't work on standard setups ?
- how was this not detected before ?


As for eprefixifing, it looks as if not for the macro not working, the macro would eprefixify nearly automatically: pkg-config on prefix adds PKG_CONFIG_PATH to environment, which would have been enough to set OPENSSL_LIBS, OPENSSL_INCS and OPENSSL_INCDIR to their correct values (at least it looks like it should).

Perhaps a better condition than
test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS";
would be
pkg-config --exists openssl 
?
Comment 32 Rafał Mużyło 2013-02-22 06:57:52 UTC
I've got to take it easy with "Save Changes" button.

> I run
>
> # USE="-* cli ssl" ebuild php-5.3.21-r2.ebuild prepare
>
> changed
>
>        test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"
>
> into
>
>        test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCDIR"
>
> and run
>
> # USE="-* cli ssl" ebuild php-5.3.21-r2.ebuild compile

Unless you've changed that in the *generated* configure script, chances are that change wasn't propagated to its proper place.
Comment 33 Ole Markus With (RETIRED) gentoo-dev 2013-02-22 07:43:23 UTC
(In reply to comment #29)
> OT: How did you create the "system settings" and "package settings" output?

Append the package name: emerge --info php:5.3
Comment 34 Ole Markus With (RETIRED) gentoo-dev 2013-02-22 10:07:02 UTC
This is the result when it does not work (0.28): http://bpaste.net/show/79034/
This is where it does work (0.27.1): http://bpaste.net/show/79036/
Comment 35 Rafał Mużyło 2013-02-22 18:39:08 UTC
Actually, that debug output doesn't really matter, cause the real problem is quite ass backwards.

TEST_VAR=`pkg-config --cflags-only-I openssl`; if test -n "${TEST_VAR}"; then echo 1 x${TEST_VAR}x ; else echo 0; fi
for pkg-config 0.27.1, it will print
1 x x
for 0.28
0

So, simply by better string trimming the macro got broken.
:roll:

Well, a reasonable fix is obvious, but makes you wonder if there are more such macros in php and other packages. :sigh:

Of course, there's still the question of proper eprexifing the ebuild, but that's - to a point - an independent matter.
Comment 36 Thomas Deutschmann (RETIRED) gentoo-dev 2013-03-17 21:46:06 UTC
Didn't you want to add the eprefix support to the next PHP release?
dev-lang/php-5.3.23 is still affected :(

When I summarize: We have *no* working PHP ebuild in Gentoo for weeks. Note that PHP 5.4 is concealing the bug, because it has eprefix support. PHP 5.3 is currently lacking of eprefix support, therefore it is affected. Does anybody disagree?

I don't understand what dev-util/pkgconfig is doing here and what should have changed in =dev-util/pkgconfig-0.28 causing this, because with previous pkgconfig versions you are able to build dev-lang/php without eprefix support.

To get this working:
Can somebody raise this issue and maybe talk to the dev-util/pkgconfig maintainer? I would do this, but I think I am the wrong person to do that right now.

If it is a serious bug within pkgconfig, pkgconfig should be fixed (note that =dev-util/pkgconfig-0.28 is stable, https://bugs.gentoo.org/show_bug.cgi?id=455578) or get a mask.

If there is something wrong in PHP, maybe we should talk to upstream?

...and if nobody want to dig into this, shouldn't we just apply the same workaround (=adding the missing prefix) we are applying to PHP 5.4 also to PHP 5.3 to get it back working?
Comment 37 Ole Markus With (RETIRED) gentoo-dev 2013-03-18 10:49:56 UTC
(In reply to comment #36)
> Didn't you want to add the eprefix support to the next PHP release?
> dev-lang/php-5.3.23 is still affected :(

I do not plan to add EPREFIX to older slots, no.

> 
> When I summarize: We have *no* working PHP ebuild in Gentoo for weeks. Note
> that PHP 5.4 is concealing the bug, because it has eprefix support. PHP 5.3
> is currently lacking of eprefix support, therefore it is affected. Does
> anybody disagree?

PHP 5.3 is moving towards EOL anyways, so I suggest working on upgrading to 5.4 rather than relying on 5.3 being around for much longer.

> If it is a serious bug within pkgconfig, pkgconfig should be fixed (note
> that =dev-util/pkgconfig-0.28 is stable,
> https://bugs.gentoo.org/show_bug.cgi?id=455578) or get a mask.
> 

As far as I can tell, pkgconfig is not to blame here.

> If there is something wrong in PHP, maybe we should talk to upstream?
> 

Already done that. But core devs are busy with opcache and such.

> ...and if nobody want to dig into this, shouldn't we just apply the same
> workaround (=adding the missing prefix) we are applying to PHP 5.4 also to
> PHP 5.3 to get it back working?

No. I plan on releasing a proper fix. Should be as simple as splitting that check in two. Meanwhile you have several other ways to work around the issue. Adding some other dep that brings in ssl, upgrade to 5.4 or downgrade to pkgconfig-0.27.1
Comment 38 Thomas Deutschmann (RETIRED) gentoo-dev 2013-03-18 19:32:45 UTC
(In reply to comment #37)
> I do not plan to add EPREFIX to older slots, no.

Well, not sure if you have to add full EPREFIX support. I mean, you would just have to add "/usr" to the "$(use_with ssl openssl )" line like it is already in the next line ($(use_with ssl openssl-dir /usr)) - that's all.


> PHP 5.3 is moving towards EOL anyways, so I suggest working on upgrading to
> 5.4 rather than relying on 5.3 being around for much longer.

Yeah, but that sounds like the bug is fixed in 5.4 - that's wrong. When you change

$(use_with ssl openssl "${EPREFIX}"/usr)

into

$(use_with ssl openssl)

5.4 will fail with the same error.

That's why I don't understand why we cannot just add "/usr" the 5.3 ebuild. Right, it doesn't fix the root cause, but 5.4 has the same bug (which we just don't trigger because of the /usr).
Comment 39 Ole Markus With (RETIRED) gentoo-dev 2013-03-19 08:35:15 UTC
(In reply to comment #38)
> (In reply to comment #37)
> > I do not plan to add EPREFIX to older slots, no.
> 
> Well, not sure if you have to add full EPREFIX support. I mean, you would
> just have to add "/usr" to the "$(use_with ssl openssl )" line like it is
> already in the next line ($(use_with ssl openssl-dir /usr)) - that's all.
> 

There is no point in adding partial EPREFIX support ...

> 
> > PHP 5.3 is moving towards EOL anyways, so I suggest working on upgrading to
> > 5.4 rather than relying on 5.3 being around for much longer.
> 
> Yeah, but that sounds like the bug is fixed in 5.4 - that's wrong. When you
> change
> 

This was just the reasoning for not adding EPREFIX.

> 
> That's why I don't understand why we cannot just add "/usr" the 5.3 ebuild.
> Right, it doesn't fix the root cause, but 5.4 has the same bug (which we
> just don't trigger because of the /usr).

Try dropping this in /etc/portage/patches/dev-lang/php/
http://bpaste.net/show/84708/
Comment 40 Thomas Deutschmann (RETIRED) gentoo-dev 2013-03-19 13:27:10 UTC
(In reply to comment #39)
> Try dropping this in /etc/portage/patches/dev-lang/php/
> http://bpaste.net/show/84708/

This patch seems to fix the error. dev-lang/php-5.3.23:5.3 with USE="cli ssl" build without any errors.
Comment 41 Ole Markus With (RETIRED) gentoo-dev 2013-03-23 12:39:31 UTC
*** Bug 462716 has been marked as a duplicate of this bug. ***
Comment 42 Ole Markus With (RETIRED) gentoo-dev 2013-03-23 12:44:40 UTC
Patch added to latest PHP versions
Comment 43 Ole Markus With (RETIRED) gentoo-dev 2013-03-23 17:58:54 UTC
*** Bug 456820 has been marked as a duplicate of this bug. ***