Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

closed as off topic by voretaq7 Dec 7 '12 at 13:35

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

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 :)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.