Opened 14 years ago

Closed 9 years ago

#25231 closed defect (wontfix)

php52-5.2.13 error compiling php52 with +pear variant on Snow Leopard Server

Reported by: ugo.enyioha@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.9.0
Keywords: Cc: jyrkiwahlstedt, chrisbloom7 (Chris Bloom), julian.simpson@…, cooljeanius (Eric Gallager)
Port: php52

Description

php52 fails to compile on my box when specifying the pear variant.

I did some analysis and it seems the error occurs during the "make install-pear" section of the make file with the following errors.

Installing PEAR environment:      /opt/local/lib/php/

Notice: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0

Notice: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0

Notice: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0

Fatal error: Call to undefined function in_array() in /Volumes/StorageHD/opt/local/var/macports/build/_Volumes_StorageHD_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_php52/work/php-5.2.13/pear/install-pear-nozlib.phar on line 393

Altering the php Makefile in the work directory to use the default php binaries at /usr/bin/php was able to complete the build. However, apache module libphp.so segfaults on my machine. So I don't believe this is the right thing to do.

I've attached my logs.

Attachments (2)

xaa.log (73.8 KB) - added by ugo.enyioha@… 14 years ago.
main_1.log
xac.log (98.5 KB) - added by ugo.enyioha@… 14 years ago.
main.log

Download all attachments as: .zip

Change History (22)

Changed 14 years ago by ugo.enyioha@…

Attachment: xaa.log added

main_1.log

Changed 14 years ago by ugo.enyioha@…

Attachment: xac.log added

main.log

comment:1 Changed 14 years ago by ugo.enyioha@…

Additional info. The install command used was

port install php52 +mysql5 +sqlite +pear +postgresql84 +snmp +tidy +dbase +mysql5 +sockets +readline +imap +pspell +apache2 +t1lib +gmp +pcntl +mssql +ipc

However even a reduced variant list

port install php52 +apache2 +mysql5 +pear +sqlite

runs into the same problem as expected.

comment:2 Changed 14 years ago by mf2k (Frank Schima)

Cc: jwa@… added
Owner: changed from macports-tickets@… to ryandesign@…
Port: php52 added

comment:3 Changed 14 years ago by nerdling (Jeremy Lavergne)

I was able to build php52 +no_web +pear successfully.

comment:4 Changed 14 years ago by nerdling (Jeremy Lavergne)

And I just built php52 +apache2 +mysql5 +pear +sqlite successfully.

Perhaps since you're building across hard drives it hit a snag?

comment:5 in reply to:  4 Changed 14 years ago by compconsultant@…

I am not building across drives, have a new install of SL server (10.6.4), and, got the same error. Downloaded macports today.

I am using:

port install php52 +no_web +imap +ipc +mssql +mysql5 +pcntl +pear +readline +sockets +sqlite

If I remove the +pear, it installs just fine. If I follow that success up with:

port upgrade --enforce-variants php52 +no_web +imap +ipc +mssql +mysql5 +pcntl +pear +readline +sockets +sqlite

It DOES install. I suspect it worked for you as you already had the necessary stuff on your machine, whatever that turns out to be. But, on a new install of SLS, it does not work. There must be something out of sequence.

comment:6 Changed 14 years ago by chrisbloom7 (Chris Bloom)

I ran into the same issue on my MBP (10.6.4) running

sudo port install php52 +mysql5 +sqlite +pear +apache2 +postgresql84

I already had mysql and postgresql installed. It failed at the same place with the same errors.

comment:7 Changed 14 years ago by chrisbloom7 (Chris Bloom)

Cc: chrisbloom7@… added

Cc Me!

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

Has duplicate #25784. I'm unable to reproduce the issue, even when I don't have any MacPorts PHP installed yet. I don't know what to suggest, other than upgrading to PHP 5.3 and/or not using PEAR (or installing PEAR manually, not using MacPorts).

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

Here is a Japanese blog post about the problem. Even with Google Translate's help it's predictably bizarre to read, but the gist seems to be that in their case anyway gawk is crashing for some reason when configure runs via MacPorts, but not when configure is run with the same arguments manually. I don't see a gawk crash in the log attached here. But I can still suggest you check if your gawk works, and try rebuilding gawk to see if that changes anything.

sudo port clean gawk php52
sudo port -n upgrade --force gawk

If it still fails, please attach your config.log so I can compare it with mine.

comment:10 Changed 14 years ago by axolx@…

I ran into the same problem. The issue in my case was also with setting up PEAR during the staging phase. I reverted the php52 portfile to rev 62445 and it installed fine with PEAR and everything I needed, so my 5 cents is that the issue occurs in portfiles after rev 62445

comment:11 Changed 14 years ago by axolx@…

I was able to install the latest portfile via compconsultant@…'s suggestion.

I first installed without the +pear option and that avoided the staging issue and then did a port upgrade --enforce-variants that added the +pear option, which staged just fine. phew...

comment:12 in reply to:  9 Changed 14 years ago by bernhard.fuerst@…

Replying to ryandesign@…:

sudo port clean gawk php52
sudo port -n upgrade --force gawk

That did solve the problem for me - thanks!

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

Has duplicate #26296.

comment:14 Changed 13 years ago by compconsultant@…

Upgraded to 5.2.14, and, problem still there. Had to also force uninstall before re-installing to make it work.

comment:15 Changed 13 years ago by julian.simpson@…

I'm running into the same thing and I'd like to point out one very important part of the puzzle. No scripts are working when run properly in CLI. Not even just <?php phpinfo(); ?> This will result in PHP Fatal error: Call to undefined function phpinfo(). (preceded by the same warnings about wrapper "php" above) I believe the fact that this is coming up when installing the pear variant to be a red herring to the actual issue. The pear variant undoubtedly attempts to run the php-go.phar script under CLI and fails at the very first php method. The actual issue is that PHP CLI isn't working.

comment:16 Changed 13 years ago by julian.simpson@…

Cc: julian.simpson@… added

Cc Me!

comment:17 Changed 13 years ago by compconsultant@…

I think you are right Julian. Installed php52 on a brand new Snow Leopard Macbook, without pear, and, same result, the part about unable to find the wrapper. I think it more has to do with the second go around on the install. That the enforce variants upgrade works, is because the php stuff is still there and somehow, that matters to the script.

So, still a problem with php52, current version of the port.

At least it compiles quicker now on the new machine!

comment:18 Changed 11 years ago by paul.borel@…

It will install php52 without +pear.

I have a problem with pear ? or not works ?

I'm using Mac Os x 10.6.

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

Cc: egall@… added

Cc Me!

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

Resolution: wontfix
Status: newclosed

As of r128130 php52 is part of the php port, and there is no longer a pear variant. If you want pear, use the php53-pear, php54-pear, php55-pear or php56-pear port. If you want php52 support for pear to be brought back, please file a new ticket requesting that php52-pear be added.

Note: See TracTickets for help on using tickets.