[Spread-users] Spread and PHP

Chris Wilson chrisw at yepher.com
Thu May 6 09:55:22 EDT 2010


It looks like this is a problem with the PHP extension. Rob at php.net is
updating it to be compatible with PHP 5.2 and PHP 5.3.

Here is his email response incase it can help anyone else:

I need to make a new release for PHP 5.3 compatibility. The fixes had been
added a few weeks after the 2.1.0 release.
Can you pull the latest php_spread.c code from the repository and try that?
http://svn.php.net/viewvc/pecl/spread/trunk/php_spread.c?revision=297236&view=co
I just need to check to make sure its buildable against 5.2, 5.3 and trunk
and will try to get a new release out asap.

Thanks,

Rob

Chris wrote:

I am trying to get the Spread extension to work in MAMP.

This is what I get when I try and do a "pecl install spread":


macbook-pro-2:~ root# export PATH=/Applications/MAMP/bin/php5.3/bin:$PATH

macbook-pro-2:~ root# pecl install spread

downloading spread-2.1.0.tgz ...

Starting to download spread-2.1.0.tgz (9,437 bytes)

.....done: 9,437 bytes

4 source files, building

WARNING: php_bin /Applications/MAMP/bin/php5/bin/php appears to have a
suffix 5/bin/php, but config variable php_suffix does not match

running: phpize

Configuring for:

PHP Api Version:         20090626

Zend Module Api No:      20090626

Zend Extension Api No:   220090626

spread path prefix [autodetect] : building in
/var/tmp/pear-build-root/spread-2.1.0

running: /private/tmp/pear/temp/spread/configure --with-spread

checking for grep that handles long lines and -e... /usr/bin/grep

checking for egrep... /usr/bin/grep -E

checking for a sed that does not truncate output... /usr/bin/sed

checking for cc... cc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether cc accepts -g... yes

checking for cc option to accept ISO C89... none needed

checking how to run the C preprocessor... cc -E

checking for icc... no

checking for suncc... no

checking whether cc understands -c and -o together... yes

checking for system library directory... lib

checking if compiler supports -R... no

checking if compiler supports -Wl,-rpath,... yes

checking build system type... i386-apple-darwin10.3.0

checking host system type... i386-apple-darwin10.3.0

checking target system type... i386-apple-darwin10.3.0

checking for PHP prefix... /Applications/MAMP/bin/php5.3

checking for PHP includes... -I/Applications/MAMP/bin/php5.3/include/php
-I/Applications/MAMP/bin/php5.3/include/php/main
-I/Applications/MAMP/bin/php5.3/include/php/TSRM
-I/Applications/MAMP/bin/php5.3/include/php/Zend
-I/Applications/MAMP/bin/php5.3/include/php/ext
-I/Applications/MAMP/bin/php5.3/include/php/ext/date/lib

checking for PHP extension directory...
/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626

checking for PHP installed headers prefix...
/Applications/MAMP/bin/php5.3/include/php

checking if debug is enabled... no

checking if zts is enabled... no

checking for re2c... no

configure: WARNING: You will need re2c 0.13.4 or later if you want to
regenerate PHP parsers.

checking for gawk... no

checking for nawk... no

checking for awk... awk

checking if awk is broken... no

checking for php_spread support... yes, shared

checking for egrep... (cached) /usr/bin/grep -E

checking for a sed that does not truncate output... /usr/bin/sed

checking for libspread in default path... found in /usr/local

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking /usr/local/include/sp.h usability... yes

checking /usr/local/include/sp.h presence... yes

checking for /usr/local/include/sp.h... yes

checking /usr/local/include/sp_events.h usability... yes

checking /usr/local/include/sp_events.h presence... yes

checking for /usr/local/include/sp_events.h... yes

checking for spread... no

Spread 3.17.3 or superior...found

checking for ld used by cc... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld

checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is
GNU ld... no

checking for /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to reload
object files... -r

checking for BSD-compatible nm... /usr/bin/nm

checking whether ln -s works... yes

checking how to recognize dependent libraries... pass_all

checking dlfcn.h usability... yes

checking dlfcn.h presence... yes

checking for dlfcn.h... yes

checking the maximum length of command line arguments... 196608

checking command to parse /usr/bin/nm output from cc object... rm:
conftest.dSYM: is a directory

ok

checking for objdir... .libs

checking for ar... ar

checking for ranlib... ranlib

checking for strip... strip

checking for dsymutil... dsymutil

checking for nmedit... nmedit

checking for -single_module linker flag... yes

checking for -exported_symbols_list linker flag... yes

checking if cc supports -fno-rtti -fno-exceptions... no

checking for cc option to produce PIC... -fno-common

checking if cc PIC flag -fno-common works... yes

checking if cc static flag -static works... no

checking if cc supports -c -o file.o... yes

checking whether the cc linker
(/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries...
yes

checking dynamic linker characteristics... darwin10.3.0 dyld

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... no


creating libtool

appending configuration tag "CXX" to libtool

configure: creating ./config.status

config.status: creating config.h

running: make

/bin/sh /private/var/tmp/pear-build-root/spread-2.1.0/libtool --mode=compile
cc  -I. -I/private/tmp/pear/temp/spread -DPHP_ATOM_INC
-I/private/var/tmp/pear-build-root/spread-2.1.0/include
-I/private/var/tmp/pear-build-root/spread-2.1.0/main
-I/private/tmp/pear/temp/spread -I/Applications/MAMP/bin/php5.3/include/php
-I/Applications/MAMP/bin/php5.3/include/php/main
-I/Applications/MAMP/bin/php5.3/include/php/TSRM
-I/Applications/MAMP/bin/php5.3/include/php/Zend
-I/Applications/MAMP/bin/php5.3/include/php/ext
-I/Applications/MAMP/bin/php5.3/include/php/ext/date/lib
-I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c
/private/tmp/pear/temp/spread/php_spread.c -o php_spread.lo

mkdir .libs

cc -I. -I/private/tmp/pear/temp/spread -DPHP_ATOM_INC
-I/private/var/tmp/pear-build-root/spread-2.1.0/include
-I/private/var/tmp/pear-build-root/spread-2.1.0/main
-I/private/tmp/pear/temp/spread -I/Applications/MAMP/bin/php5.3/include/php
-I/Applications/MAMP/bin/php5.3/include/php/main
-I/Applications/MAMP/bin/php5.3/include/php/TSRM
-I/Applications/MAMP/bin/php5.3/include/php/Zend
-I/Applications/MAMP/bin/php5.3/include/php/ext
-I/Applications/MAMP/bin/php5.3/include/php/ext/date/lib
-I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c
/private/tmp/pear/temp/spread/php_spread.c  -fno-common -DPIC -o
.libs/php_spread.o

/private/tmp/pear/temp/spread/php_spread.c:49: error: duplicate 'static'

make: *** [php_spread.lo] Error 1

ERROR: `make' failed



On Thu, May 6, 2010 at 12:46 AM, Alexey Zakhlestin <indeyets at gmail.com>wrote:

> On Thu, May 6, 2010 at 2:46 AM, Chris Wilson <chrisw at yepher.com> wrote:
> > I want to make a web page that shows information about the spread
> cluster.
> > I have tried everything to get this working in MAMP (Snow Leopard) but
> have
> > not been successful at all.
> > Does anyone know any tricks to get this to work? Have you successfully
> > gotten MAMP and Spread to work together?
>
> What is your problem exactly?
> 1) Does spread work correctly on this machine?
> 2) Does spread's php extension load correctly (so you can see it in
> phpinfo, at least)?
> 3) Can you connect from php extension to daemon? if not, what is the
> error returned?
>
> --
> Alexey Zakhlestin
> http://www.milkfarmsoft.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.spread.org/pipermail/spread-users/attachments/20100506/bf8e60fe/attachment.html 


More information about the Spread-users mailing list