Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#31590 closed defect (fixed)

php5-pear: Segmentation fault during installation when php5 is built with clang

Reported by: mail@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: lion clang Cc: iakoder, cooljeanius (Eric Gallager)
Port: php5, php5-devel, php54

Description (last modified by ryandesign (Ryan Carsten Schmidt))

When trying to install php5-pear i get a segmentation fault.

uname -a
Darwin Karstens-MacBook-Pro.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug  9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64

Last part of logfile (tell me if you need whole logfile):

:info:fetch --->  install-pear-nozlib.phar doesn't seem to exist in /opt/local/var/macports/distfiles/php5-pear-20110901
:debug:fetch Pinging pear.php.net...
:debug:fetch Pinging distfiles.macports.org...
:debug:fetch Pinging aarnet.au.distfiles.macports.org...
:debug:fetch Pinging her.gr.distfiles.macports.org...
:debug:fetch Pinging lil.fr.distfiles.macports.org...
:debug:fetch Pinging sea.us.distfiles.macports.org...
:debug:fetch Pinging ykf.ca.distfiles.macports.org...
:debug:fetch pear.php.net ping time is 30.179
:debug:fetch distfiles.macports.org ping time is 176.918
:debug:fetch aarnet.au.distfiles.macports.org ping time is 322.165
:debug:fetch her.gr.distfiles.macports.org ping time is 65.920
:debug:fetch lil.fr.distfiles.macports.org ping time is 20.239
:debug:fetch sea.us.distfiles.macports.org ping time is 10000
:debug:fetch ykf.ca.distfiles.macports.org ping time is 389.311
:notice:fetch --->  Attempting to fetch install-pear-nozlib.phar from http://lil.fr.distfiles.macports.org/php5-pear-20110901
:debug:fetch Privilege de-escalation not attempted as not running as root.
:debug:checksum checksum phase started at Fri Oct 14 02:06:16 CEST 2011
:notice:checksum --->  Verifying checksum(s) for php5-pear
:debug:checksum Executing org.macports.checksum (php5-pear)
:info:checksum --->  Checksumming install-pear-nozlib.phar
:debug:checksum Correct (rmd160) checksum for install-pear-nozlib.phar
:debug:checksum Correct (sha256) checksum for install-pear-nozlib.phar
:debug:checksum Privilege de-escalation not attempted as not running as root.
:debug:extract extract phase started at Fri Oct 14 02:06:16 CEST 2011
:notice:extract --->  Extracting php5-pear
:debug:extract Extracting to subdirectory worksrcdir
:debug:extract Executing org.macports.extract (php5-pear)
:debug:extract Privilege de-escalation not attempted as not running as root.
:debug:patch patch phase started at Fri Oct 14 02:06:16 CEST 2011
:debug:patch Executing org.macports.patch (php5-pear)
:debug:patch Privilege de-escalation not attempted as not running as root.
:debug:configure configure phase started at Fri Oct 14 02:06:16 CEST 2011
:notice:configure --->  Configuring php5-pear
:debug:configure Using compiler 'Mac OS X clang'
:debug:configure Executing org.macports.configure (php5-pear)
:info:configure sh: line 1: 85534 Segmentation fault: 11  PHP_PEAR_INSTALL_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear PHP_PEAR_BIN_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/bin PHP_PEAR_PHP_BIN=/opt/local/bin/php PHP_PEAR_CFG_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear/cfg PHP_PEAR_DOC_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear/docs PHP_PEAR_DATA_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear/data PHP_PEAR_WWW_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear/www PHP_PEAR_TEST_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear/tests PHP_PEAR_SYSCONF_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/etc /opt/local/bin/php install-pear-nozlib.phar
:info:configure shell command "cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901 &&  PHP_PEAR_INSTALL_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear  PHP_PEAR_BIN_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/bin  PHP_PEAR_PHP_BIN=/opt/local/bin/php  PHP_PEAR_CFG_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear/cfg  PHP_PEAR_DOC_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear/docs  PHP_PEAR_DATA_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear/data  PHP_PEAR_WWW_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear/www  PHP_PEAR_TEST_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/pear/tests  PHP_PEAR_SYSCONF_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/work/php5-pear-20110901/build/libexec/php/etc  /opt/local/bin/php  install-pear-nozlib.phar  " returned error 139
:error:configure Target org.macports.configure returned: shell command failed (see log for details)
:debug:configure Backtrace: shell command failed (see log for details)
    while executing
"$procedure $targetname"
:info:configure Warning: the following items did not execute (for php5-pear): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:configure Log for php5-pear is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_php_php5-pear/php5-pear/main.log

Executing the last command manually results in immediate segmentation fault without further error messages.

The debug log from os x about the crashed process is attached.

I tried to manually add --encable-cli to port file of main php5 port, however that did not help as well.

Attachments (2)

php_2011-10-14-020705_localhost.crash (22.6 KB) - added by mail@… 13 years ago.
OS X Diagnostic report about segfaulted php process
main.log (24.6 KB) - added by mail@… 13 years ago.
Logfile of php5-pear build with llvm-gcc-4.2

Download all attachments as: .zip

Change History (19)

Changed 13 years ago by mail@…

OS X Diagnostic report about segfaulted php process

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: lion added
Owner: changed from macports-tickets@… to pixilla@…
Summary: Segmentation fault while installing php5-pear on os x lionphp5-pear: Segmentation fault during installation

Please remember to use WikiFormatting, and to Cc the maintainer of the affected port.

The cli sapi is already enabled in the php5 port; we don't provide an option for turning it off.

Try building with llvm-gcc-4.2 instead of clang:

sudo port clean php5-pear
sudo port install php5-pear configure.compiler=llvm-gcc-4.2

Changed 13 years ago by mail@…

Attachment: main.log added

Logfile of php5-pear build with llvm-gcc-4.2

comment:2 Changed 13 years ago by mail@…

Using llvm-gcc-4.2 i get the same error but with different line number (see attached logfile).

comment:3 Changed 13 years ago by compconsultant@…

Just an FYI - I get the same error on a new Lion install

comment:4 Changed 13 years ago by compconsultant@…

If you can get gcc46 installed on Lion, this does compile and install. Of course, that port has a Lion problem also, but the solution found in gcc45 lion ticket, removing fortran from the portfile, does allow gcc46 to install. Once that is installed, you can port install php5-pear configure.compiler=macports-gcc-4.6

comment:5 Changed 13 years ago by nvitacolonna@…

Adding configure.compiler=llvm-gcc-4.2 did work for me. Be sure to compile php5, and not only php5-pear, with that option. This is what I've done:

sudo port uninstall php5-pear php5
sudo port clean --all php5 php5-pear
sudo port selfupdate
sudo port install php5 +apache2 +fastcgi +ipc configure.compiler=llvm-gcc-4.2
sudo port install php5-pear configure.compiler=llvm-gcc-4.2

With the above, I've installed php5 5.3.8_1 and php5-pear 20110901_0 on OS X Lion 10.7.2 with Xcode 4.2.

comment:6 in reply to:  5 Changed 13 years ago by mail@…

The instructions from the last comment worked for me as well. However i think it is still a bug if it does not work with default settings.

comment:7 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Keywords: clang added
Port: php5 added
Summary: php5-pear: Segmentation fault during installationphp5-pear: Segmentation fault during installation when php5 is built with clang

So does only php5 need to have its compiler changed from clang to llvm-gcc-4.2, or does php5-pear also?

comment:8 in reply to:  7 Changed 13 years ago by pixilla (Bradley Giesbrecht)

Replying to ryandesign@…:

So does only php5 need to have its compiler changed from clang to llvm-gcc-4.2, or does php5-pear also?

I think not, I do not believe the php5-pear port compiles anything. The port uses php to install pear.
The result of "port contents php5-pear" shows only text files.

comment:9 Changed 13 years ago by pixilla (Bradley Giesbrecht)

Resolution: invalid
Status: newclosed

This is a clang php5 issue.

comment:10 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Port: php5-devel php54 added; php5-pear removed
Resolution: invalid
Status: closedreopened

So, it's not invalid then; I need to change php to compile with llvm-gcc-4.2 instead.

comment:11 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… removed
Owner: changed from pixilla@… to ryandesign@…
Status: reopenednew

comment:12 in reply to:  10 Changed 13 years ago by pixilla (Bradley Giesbrecht)

Replying to ryandesign@…:

So, it's not invalid then; I need to change php to compile with llvm-gcc-4.2 instead.

Right, I recently added a Lion machine to my work desk and with XCode 4.1 I had no problem installing php5-pear. This must be an XCode 4.2 issue.

comment:13 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

You mean: a clang issue, as we already established above. The default compiler MacPorts uses on Xcode 4.0 and 4.1 is llvm-gcc-4.2 and on Xcode 4.2 it's clang.

comment:14 in reply to:  13 Changed 13 years ago by pixilla (Bradley Giesbrecht)

Replying to ryandesign@…:

You mean: a clang issue, as we already established above. The default compiler MacPorts uses on Xcode 4.0 and 4.1 is llvm-gcc-4.2 and on Xcode 4.2 it's clang.

Sounds right. I have not been using Lion or XCode 4.x until recently. Now I know XCode 4.2 was the switch to clang. Thanks.

comment:15 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: dwilks@… added
Status: newassigned

Has duplicate #32908.

comment:16 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Has duplicate #32909.

Fixed php5 in r89008, php5-devel in r89009, php54 in r89010.

comment:17 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.