Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
tar -xzf libxdiff-0.23.tar.gz 
cd libxdiff-0.23/
make install

I then downloaded xdiff from here ( and did:


(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

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 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.

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
For anyone experiencing the error: 'configure: error: your libxdiff version is too old' Please see here: – Robert Brisita Aug 11 '15 at 18:47

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