Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 402357 - dev-lang/php doesn't build with dev-libs/libpcre-8.30-r2
Summary: dev-lang/php doesn't build with dev-libs/libpcre-8.30-r2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL: https://bugs.php.net/bug.php?id=60986
Whiteboard:
Keywords:
: 402377 402451 402491 (view as bug list)
Depends on:
Blocks: 402363
  Show dependency tree
 
Reported: 2012-02-06 09:42 UTC by Helmut Jarausch
Modified: 2012-02-07 10:02 UTC (History)
11 users (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 Helmut Jarausch 2012-02-06 09:42:57 UTC
Trying to build dev-lang/php-5.4.0_rc7 with dev-libs/libpcre-8.30-r2
fails:

php_pcre.c:(.text+0xc6f): undefined reference to `pcre_info'
collect2: ld returned 1 exit status

emerge --info dev-lang/php
Portage 2.2.0_alpha85 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r2, 3.2.2-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.2-gentoo-x86_64-AMD_Phenom-tm-_II_X4_955_Processor-with-gentoo-2.1
Timestamp of tree: Mon, 06 Feb 2012 07:45:01 +0000
ccache version 3.1.7 [disabled]
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.7-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2, 4.6.2, 4.7.0_pre9999::local
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo local sunrise
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=native -O2 -msse3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/lib/neatx/home"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-mtune=native -O2 -msse3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs buildpkg distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo "
LANG="en_US.iso88591"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de"
MAKEOPTS="-j4"
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 /usr/local/portage/layman/sunrise"
SYNC="rsync://rsync.informatik.RWTH-Aachen.de/gentoo-portage"
USE="3dnow 3dnowext 3dnowprefetch X a52 aac acl acpi alsa amd64 atm avahi berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam ffmpeg fftw firefox flac fortran fuse gdbm gdu gfortran gif gimp gnome gpm gtk gtk2 iconv ipv6 jpeg kde lapack lcms libnotify mad mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf png policykit ppds pppd qt qt3support qt4 readline sdl session smp spell sqlite sqlite3 sse sse2 sse3 sse4a ssl startup-notification svg sysfs tcl tcpd threads tiff tk truetype udev unicode usb vorbis x264 xcb xml xorg xulrunner xv xvid 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="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 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 wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="ati radeon" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

dev-lang/php-5.3.10 was built with the following:
USE="apache2 berkdb bzip2 cli crypt ctype curl exif fileinfo filter gd gdbm hash iconv intl ipv6 json (multilib) mysqli nls phar posix readline session simplexml soap spell sqlite sqlite3 ssl threads tokenizer truetype unicode xml xmlrpc zip zlib -bcmath -calendar -cdb -cgi -cjk -curlwrappers -debug -doc -embed -enchant -firebird -flatfile -fpm (-frontbase) -ftp -gmp -imap -inifile -iodbc -kerberos -kolab -ldap -ldap-sasl -libedit -mhash -mssql -mysql -mysqlnd -oci8-instant-client -odbc -pcntl -pdo -pic -postgres -qdbm -recode -sharedmem -snmp -sockets -suhosin (-sybase-ct) -sysvipc -tidy -wddx -xmlreader -xmlwriter -xpm -xsl"


dev-lang/php-5.4.0_rc6 was built with the following:
USE="apache2 berkdb bzip2 cli crypt ctype curl exif fileinfo filter gd gdbm hash iconv intl ipv6 json (multilib) mysqli nls phar posix readline session simplexml soap spell sqlite3 ssl threads tokenizer truetype unicode xml xmlrpc zip zlib -bcmath -calendar -cdb -cgi -cjk -curlwrappers -debug -doc -embed -enchant -firebird -flatfile -fpm (-frontbase) -ftp -gmp -imap -inifile -iodbc -kerberos -kolab -ldap -ldap-sasl -libedit -mhash -mssql -mysql -mysqlnd -oci8-instant-client -odbc -pcntl -pdo -pic -postgres -qdbm -recode -sharedmem -snmp -sockets (-sybase-ct) -sysvipc -tidy -wddx -xmlreader -xmlwriter -xpm -xsl"
Comment 1 Marco Napetti 2012-02-06 10:29:31 UTC
Same problem here, also other packages (www-servers/apache-2.2.21-r1, dev-lang/R-2.14.1, dev-lang/php-5.3.10) fails to build.

Portage 2.1.10.45 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r2, 3.2.2-gentoo x86_64)
=================================================================
System uname: Linux-3.2.2-gentoo-x86_64-Intel-R-_Core-TM-_i5-2520M_CPU_@_2.50GHz-with-gentoo-2.1
Timestamp of tree: Mon, 06 Feb 2012 07:30:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.7-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA skype-eula dlj-1.1 PUEL AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=generic -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /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=core2 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=generic -O2"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=y"
FEATURES="assume-digests binpkg-logs candy distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="it"
MAKEOPTS="-j5"
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="/home"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl addbookmarks alias alsa amd64 amr amuled apache2 audiofile autoreplace avi bash-completion berkdb bluetooth boost branding browserplugin bzip2 cdaudio cdb cdda cddb cdinstall cdio cdparanoia cdr cleartype cli clucene codecs connectionstatus contactnotes cracklib crypt css ctype cups curl custom-optimization cxx dbus decibel dga divx4linux dlloader dri dts dv dvb dvd dvdr dvdread edl emul-linux-x86 encode exif extensions faad fam fame ffmpeg filter firefox flac fontconfig fortran ftp gadu gcj gd gdbm ggi gif gimp gimpprint git glib glitz gnutls gpm groupwise gstreamer highlight history hou iconv idn ieee1394 imagemagick imap imlib inquisitio insecure-drivers ipv6 irc ithreads jack java javascript jingle jpeg jpeg2k kde kdeenablefinal lame lcd lcdfilter libcaca libnotify live lm_sensors lzo mad matroska messenger mikmod mime mjpeg mmx mmxext modules monkey moodbar mozbranding mozdevelop mozilla mp3 mp4 mpeg msn msword mudflap multilib musepack musicbrainz mysql mysqli mythtv ncurses nepomuk netmeeting nls nodrm nowin nowlistening nptl nptlonly nsplugin objc objc++ objc-gc offensive ogg oggvorbis opengl openmp pam pcre pdf phonon php plasma png ppds pppd qt qt-copy qt3support qt4 quicktime rar rdesktop readline remote replytolist samba sametime scanner sdl semantic-desktop sensord session slp smp sms sndfile sou sound speex sqlite sse sse2 ssl startup-notification statistics subversion svg sysfs taglib tcpd telepathy texteffect tga theora threads tidy tiff tokenizer translator truetype truetype-fonts udev unicode upnp usb v4l v4l2 vcd video videos visualization vnc vorbis wavpack webdav webpresence wifi winpopup wlm xanim xattr xcb xcomposite xine xinerama xml xmlpatterns xmlreader xmlwriter xorg xscreensaver xv xvid xvmc yahoo zip zlib" ALSA_CARDS="hda-intel" 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="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby19" SANE_BACKENDS="epson2" USERLAND="GNU" VIDEO_CARDS="intel vesa fbdev" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Steffen 'j0inty' Stollfuß 2012-02-06 12:12:45 UTC
Same here on my box. I reported this to the upstream already.

https://bugs.php.net/bug.php?id=60986

regards
j0inty
Comment 3 Ole Markus With (RETIRED) gentoo-dev 2012-02-06 12:44:33 UTC
Could you also check if you get the same errors with php-5.3.10? There are reports of this also affecting 5.3 branch.
Comment 4 Helmut Jarausch 2012-02-06 12:57:32 UTC
(In reply to comment #3)
> Could you also check if you get the same errors with php-5.3.10? There are
> reports of this also affecting 5.3 branch.

Yes, I've reported it already.
Helmut.
Comment 5 Ole Markus With (RETIRED) gentoo-dev 2012-02-06 13:31:49 UTC
Upstream bug provides a patch, so I'll test and revbump shortly.
Comment 6 Steffen 'j0inty' Stollfuß 2012-02-06 13:36:52 UTC
https://bugs.php.net/bug.php?id=60986&edit=2
[snip]
The problem is the use of the pcre_info function which was deprecated and repalced by pcre_fullinfo 12 years ago.
[/snap]

Thats hard, but apache do the same failure.

j0inty
Comment 7 Ole Markus With (RETIRED) gentoo-dev 2012-02-06 13:45:42 UTC
Pushed an -r1 with the fix that makes php build against libpcre-8.30. Please test.
Comment 8 Ole Markus With (RETIRED) gentoo-dev 2012-02-06 13:47:03 UTC
For php 5.4, I'll just block tho libpcre 8.30. No need to revbump as php 5.4 will not go stable with that version anyway.
Comment 9 Ole Markus With (RETIRED) gentoo-dev 2012-02-06 14:34:24 UTC
*** Bug 402377 has been marked as a duplicate of this bug. ***
Comment 10 John Keeping 2012-02-06 17:07:57 UTC
I'm pretty sure that upstream patch will lead to a null pointer dereference.  It does:

-		if (pcre_info(pce->re, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
+		if (pcre_fullinfo(pce->re, NULL, NULL, NULL) == PCRE_ERROR_BADMAGIC) {

but the implementation of pcre_fullinfo contains:

int pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data,
  int what, void *where) {
... // can return PCRE_ERROR_BADMAGIC here
switch (what)
  {
  case PCRE_INFO_OPTIONS:
  *((unsigned long int *)where) = re->options & PUBLIC_COMPILE_OPTIONS;
  break;
...

and PCRE_INFO_OPTIONS is #define'd as 0.  So in the case where it doesn't hit the BADMAGIC condition, it will try to write to "*where" which is NULL.  A safer patch would be:

@@ -252,10 +252,11 @@
 	   back the compiled pattern, otherwise go on and compile it. */
 	if (zend_hash_find(&PCRE_G(pcre_cache), regex, regex_len+1, (void **)&pce) == SUCCESS) {
 		/*
-		 * We use a quick pcre_info() check to see whether cache is corrupted, and if it
+		 * We use a quick pcre_fullinfo() check to see whether cache is corrupted, and if it
 		 * is, we flush it and compile the pattern from scratch.
 		 */
-		if (pcre_info(pce->re, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
+		int count = 0;
+		if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &count) == PCRE_ERROR_BADMAGIC) {
 			zend_hash_clean(&PCRE_G(pcre_cache));
 		} else {
Comment 11 Ole Markus With (RETIRED) gentoo-dev 2012-02-06 17:23:02 UTC
Yeah, seems like you are right.

I'll leave the -r1 as it is so unstable can get their PHP compiled, but won't close this issue until upstream has an official fix.
Comment 12 Dennis Schridde 2012-02-06 19:59:55 UTC
*** Bug 402451 has been marked as a duplicate of this bug. ***
Comment 13 Ole Markus With (RETIRED) gentoo-dev 2012-02-06 21:22:30 UTC
New revbump committed for those using 5.3 unstable. As it only affects unstable, we'll do the regular 30 day bug-free thingy before filing a stabilisation bug.

As this patch is the same as what closed the upstream bug, I consider this issue closed as well.
Comment 14 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-02-07 10:02:26 UTC
*** Bug 402491 has been marked as a duplicate of this bug. ***