3

I'm trying to get the xdiff library for PHP installed on my localhost so that I can do some testing with it. My set up is PHP 5.3 + Apache + Mac OS X. Unfortunately, there is no macports port for xdiff.

Here's what I've done so far in my /usr/lib folder:

sudo curl -O http://www.xmailserver.org/libxdiff-0.23.tar.gz
tar -xzf libxdiff-0.23.tar.gz 
cd libxdiff-0.23/
./configure
make
make install

I then downloaded xdiff from here (http://pecl.php.net/package/xdiff) and did:

phpize
./configure
make

(All commands were made using sudo)

With xdiff-1.5.1 the install seemingly worked. With 1.4.1 I keep getting (also get this with 'pear install pecl/xdiff):

/bin/sh /usr/lib/xdiff-1.4.1/xdiff-1.4.1/libtool --mode=compile cc  -I. -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1 -DPHP_ATOM_INC -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1/include -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1/main -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1 -I/opt/local/include/php -I/opt/local/include/php/main -I/opt/local/include/php/TSRM -I/opt/local/include/php/Zend -I/opt/local/include/php/ext -I/opt/local/include/php/ext/date/lib -I/opt/local/include -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /usr/lib/xdiff-1.4.1/xdiff-1.4.1/xdiff.c -o xdiff.lo 
mkdir .libs
 cc -I. -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1 -DPHP_ATOM_INC -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1/include -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1/main -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1 -I/opt/local/include/php -I/opt/local/include/php/main -I/opt/local/include/php/TSRM -I/opt/local/include/php/Zend -I/opt/local/include/php/ext -I/opt/local/include/php/ext/date/lib -I/opt/local/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/lib/xdiff-1.4.1/xdiff-1.4.1/xdiff.c  -fno-common -DPIC -o .libs/xdiff.o
/usr/lib/xdiff-1.4.1/xdiff-1.4.1/xdiff.c:39: error: duplicate ‘static’
make: *** [xdiff.lo] Error 1

I also went and added the following to my php.ini

extension=xdiff.so

No luck. Any ideas?

joshholat
  • 193
  • 1
  • 5
  • 12

1 Answers1

3

go to the pecl xdiff directory, open xdiff.c remove the word 'static' from line 39. it's already defined in the macro in the following line. save, phpize, configure, make, make install, be happy :)

Seb
  • 31
  • 2