Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89582 - dev-php/php-4.3.11 dies on PEAR installation
Summary: dev-php/php-4.3.11 dies on PEAR installation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL: http://pastebin.com/272981
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-18 14:32 UTC by Hunter Cook
Modified: 2006-01-20 01:25 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 Hunter Cook 2005-04-18 14:32:15 UTC
I initially had no problem upgrading to php-4.3.11. But about 4 days ago I used some php from the command line for the first time since that upgrade, and found that doing anything at all with the php binary segfaulted. So I went to remerge the package, and now I find that the build fails. The pastebin contains the full error, but here it is again:

----------------------------------------------------------------------
Libraries have been installed in:
   /var/tmp/portage/php-4.3.11/work/php-4.3.11/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/lib/gcc-lib/../libc-client.a(osdep.o)(.text+0x993a): In function `ssl_onceonlyinit':
: warning: the use of `tmpnam' is dangerous, better use `mkstemp'

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

>>> Test phase [not enabled]: dev-php/php-4.3.11

>>> Install php-4.3.11 into /var/tmp/portage/php-4.3.11/image/ category dev-php
* Running make INSTALL_ROOT=/var/tmp/portage/php-4.3.11/image/ install
Installing PHP CLI binary:        /var/tmp/portage/php-4.3.11/image//usr/bin/
Installing PHP CLI man page:      /var/tmp/portage/php-4.3.11/image//usr/share/man/man1/
Installing shared extensions:     /var/tmp/portage/php-4.3.11/image//usr/lib/php/extensions/no-debug-non-zts-20020429/
Installing PEAR environment:      /var/tmp/portage/php-4.3.11/image//usr/lib/php/php/
make[1]: *** [install-pear-installer] Segmentation fault
make: *** [install-pear] Error 2

!!! ERROR: dev-php/php-4.3.11 failed.
!!! Function php-sapi_src_install, Line 561, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

-----------------------------------------------------------------------

...and here's the emerge info:

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 i686)
=================================================================
System uname: 2.6.11-gentoo-r6 i686 Intel(R) Celeron(R) CPU 2.40GHz
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  7 2005, 11:48:04)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 aim apache2 ared aredmem avi berkdb bzlib cpdflib crypt cups emboss exif fam foomaticdb fortran freetds ftp gd gdbm gif gstreamer hardenedphp icq image imap imlib innodb jabber java jpeg libg++ libwww lzw-tiff maildir mime ming mmx mng mozilla mp3 msn msql mysql nagios-dns nagios-ntp nagios-ping nagios-s nagios-ssh ncurses no-old-linux nocd oav oggvorbis oscar pam pdflib perl php pic pie png procmail python quicktime readline rtc ruby samba sasl sdl sendfile server session slang slp snmp soap sockets spell spl sse ssl tcpd threads tiff tokenizer truetype truetype-fonts type1-fonts unicode vhosts virus-scan xml xml2 yahoo zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

Reproducible: Didn't try
Steps to Reproduce:
Well, it happens every time I try to merge it now, but I don't know what made the problem start, so I can't really help on trying to reproduce.
Actual Results:  
The merge fails as noted in the error.

Expected Results:  
Finished merging and produced a php build that didn't segfault every time I ran it.
Comment 1 Sebastian Bergmann (RETIRED) gentoo-dev 2005-05-10 01:14:50 UTC
This looks like a problem with your system (maybe a hardware problem) as PHP should not segfault and PHP 4.3.11 builds and works fine for me on both ~x86 and ~amd64.
Comment 2 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-11-05 23:48:05 UTC
I haven't had PHP on my box at all, although I've run php on sparc prior.

However, instead of a segfault during install I get a bus error ( usually points 
to misaligned memory addresses on sparc ).


Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

>>> Test phase [not enabled]: dev-php/php-4.4.0-r1

>>> Install php-4.4.0-r1 into /var/tmp/portage/php-4.4.0-r1/image/ category dev-
php
 * Running make INSTALL_ROOT=/var/tmp/portage/php-4.4.0-r1/image/ install
Installing PHP CLI binary:        /var/tmp/portage/php-4.4.0-r1/image//usr/bin/
Installing PHP CLI man page:      /var/tmp/portage/php-4.4.0-r1/image//usr/share
/man/man1/
Installing PEAR environment:      /var/tmp/portage/php-4.4.0-r1/image//usr/lib/p
hp/
make[1]: *** [install-pear-installer] Bus error
make: *** [install-pear] Error 2

!!! ERROR: dev-php/php-4.4.0-r1 failed.
!!! Function php-sapi_src_install, Line 549, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

ns1 skyfw #

I then tried with an older version of PHP, and it too failed ( dev-php/php-4.3.
11-r1 ).

I then thought, hmm perhaps it's a make bug, so I remerged a random automake 
version ( 1.9.6-r1 ).  However, that too did not fix the problem.  No other 
packages bus error ( or segfault ) during src_install().

I'll CC the sparc team, and here is my info.

ns1 log # emerge info
Portage 2.0.53_rc5 (default-linux/sparc/sparc64/server, gcc-3.3.5-20050130, 
glibc-2.3.3.20040420-r2, 2.4.31 sparc64)
=================================================================
System uname: 2.4.31 sparc64 sun4u
Gentoo Base System version 1.6.12
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.4.26-r1
ACCEPT_KEYWORDS="sparc"
AUTOCLEAN="yes"
CBUILD="sparc-unknown-linux-gnu"
CFLAGS="-mcpu=v9 -mtune=v9 -O2 -pipe"
CHOST="sparc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/
config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=v9 -mtune=v9 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache confcache distlocks parallel-fetch sandbox sfperms 
strict userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.chem.wisc.edu/
gentoo/ http://gentoo.osuosl.org/"
MAKEOPTS="-j3"
PKGDIR="/home/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="sparc acl apache2 bash-completion berkdb bitmap-fonts cjk crypt ctype 
fortran ftp gcc64 gdbm hardenedphp imagemagick imap ldap libwww maildir mime 
mysql mysqli ncurses nis nls pam pcre perl php pie posix postgres python 
readline sharedmem spell spl ssl tcpd tokenizer truetype-fonts type1-fonts 
unicode vhosts xml xml2 zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 3 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-11-06 17:13:05 UTC
 * Running make INSTALL_ROOT=/var/tmp/portage/php-4.4.0-r1/image/ install
+ LAST_E_CMD=einfon
+ return 0
+ LAST_E_CMD=einfo
+ return 0
+ make INSTALL_ROOT=/var/tmp/portage/php-4.4.0-r1/image/ install
Installing PHP CLI binary:        /var/tmp/portage/php-4.4.0-r1/image//usr/bin/
Installing PHP CLI man page:      /var/tmp/portage/php-4.4.0-r1/image//usr/share
/man/man1/
Installing PEAR environment:      /var/tmp/portage/php-4.4.0-r1/image//usr/lib/p
hp/
make[1]: *** [install-pear-installer] Bus error
make: *** [install-pear] Error 2
+ diefunc php-sapi_src_install 549 2
+ local funcname=php-sapi_src_install lineno=549 exitcode=2
+ shift 3
+ echo

+ echo '!!! ERROR: dev-php/php-4.4.0-r1 failed.'
!!! ERROR: dev-php/php-4.4.0-r1 failed.
+ echo '!!! Function php-sapi_src_install, Line 549, Exitcode 2'
!!! Function php-sapi_src_install, Line 549, Exitcode 2
+ echo '!!! (no error message)'
!!! (no error message)
+ echo '!!! If you need support, post the topmost build error, NOT this status m
essage.'
!!! If you need support, post the topmost build error, NOT this status message.
+ echo

+ '[' install == install ']'
+ exit 1
ns1 php #

Output with PORTAGE_DEBUG="1"
Comment 4 Luca Longinotti (RETIRED) gentoo-dev 2005-11-11 15:58:57 UTC
Hi, this error of dev-php/php when installing PEAR also appears regularly on
x86, where it's not a Bus Error bug just a Segfault... Anyway, the solution is
to migrate to dev-lang/php-4* instead of using the old and deprecated
dev-php/{php,php-cgi,mod_php}, dev-lang/php provides all PHP SAPIs in one ebuild
and works much better, also the PEAR install error cannot happen there, since we
don't install PEAR as part of PHP but externally using the dev-php/PEAR-PEAR
package, so it will 100% solve this problem. :)
For more informations on dev-lang/php and how to upgrade to it:
http://svn.gnqs.org/projects/gentoo-php-overlay/file/docs/php-upgrading.html?format=raw
TIA and best regards, CHTEKK.
Comment 5 Jason Wever (RETIRED) gentoo-dev 2005-11-11 17:29:00 UTC
OK, until the old php stuff is officially deprecated and things have been
stablized on the new layout, we really cannot go around telling users to use
items with testing keywords when they run stable.  

I know you guys want to wash your hands of the old layout, but telling users
running stable keywords to use packages that are masked to them is not the answer.
Comment 6 Sebastian Bergmann (RETIRED) gentoo-dev 2006-01-20 01:25:10 UTC
dev-php/php, dev-php/mod_php, and dev-php/php-cgi have been replaced by dev-lang/php.

Please upgrade (following the guide at http://svn.gnqs.org/projects/gentoo-php-overlay/file/docs/php-upgrading.html?format=raw) to the new-style PHP package and open a new bug if the problem persists.

Thank you.