i'm trying to compile php on my mac.
i've followed this tutorial : http://www.malisphoto.com/tips/php-on-os-x.html
i've also check this post : Compile PHP 5.3.2 with intl extension on Snow Leopard 10.6.3
here's my configure options :
./configure \ --prefix=/usr \ --with-apxs2=/usr/sbin/apxs \ --with-ldap=/usr \ --with-kerberos=/usr \ --enable-cli \ --with-zlib-dir=/usr \ --enable-exif \ --enable-ftp \ --enable-mbstring \ --enable-mbregex \ --enable-sockets \ --with-iodbc=/usr \ --with-curl=/usr \ --with-config-file-path=/etc \ --sysconfdir=/private/etc \ --with-mysql-sock=/tmp \ --with-mysql=/usr/local/mysql \ --with-openssl=/usr \ --with-xmlrpc \ --with-xsl=/usr \ --without-pear \ --with-libxml-dir=/usr \ --with-iconv=/usr/local \ --with-pdo-mysql=/usr/local/mysql/bin/mysql_config \ --with-gd \ --with-jpeg-dir=/opt/local \ --with-png-dir=/opt/local \ --with-freetype-dir=/opt/local \ --with-mcrypt=/opt/local \ --enable-intl \ --with-icu-dir=/opt/local
i change Makefile, replace this:
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
to this :
$(CC) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) $(MH_BUNDLE_FLAGS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
i also had this -lstdc++ into EXTRA_LIBS in Makefile.
here's the error message :
In file included from /opt/local/include/unicode/utypes.h:36, from /usr/local/src/php-5.3.3/ext/intl/grapheme/grapheme.h:21, from /usr/local/src/php-5.3.3/ext/intl/php_intl.h:26, from main/internal_functions.c:47: /opt/local/include/unicode/umachine.h:308: error: redefinition of typedef ‘UChar’ /usr/include/libxml2/libxml/encoding.h:41: error: previous declaration of ‘UChar’ was here make: *** [main/internal_functions.lo] Error 1
i tried another build without intl (delete 2 last lines in ./configure) and it works.
Can someone explain me the error message, or indicate what may be wrong in ./configure options ? many thanks in advance