I'm trying to compile php 5.6 on OsX Mavericks but in the middle of linking process I am receiving this error and do not know what to do with it.
Undefined symbols for architecture x86_64:
"_libiconv", referenced from:
_do_convert in gdkanji.o
_zif_iconv_substr in iconv.o
_zif_iconv_mime_encode in iconv.o
_php_iconv_string in iconv.o
__php_iconv_strlen in iconv.o
__php_iconv_strpos in iconv.o
_php_iconv_stream_filter_append_bucket in iconv.o
...
"_libiconv_close", referenced from:
_do_convert in gdkanji.o
_convert in encodings.o
"_libiconv_open", referenced from:
_do_convert in gdkanji.o
_convert in encodings.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libs/libphp5.bundle] Error 1
This is my configure options:
sudo ./configure --prefix=/opt/local \
--mandir=/usr/share/man \
--enable-maintainer-zts \
--infodir=/usr/share/info \
--sysconfdir=/private/etc \
--with-apxs2=/usr/sbin/apxs \
--enable-cli \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/Library/Server/Web/Config/php \
--with-libxml-dir=/usr \
--with-openssl=/usr \
--with-kerberos=/usr \
--with-zlib=/usr \
--enable-bcmath \
--with-bz2=/usr \
--enable-calendar \
--disable-cgi \
--with-curl=/usr \
--enable-dba \
--enable-exif \
--enable-fpm \
--enable-ftp \
--with-gd \
--with-freetype-dir=/BinaryCache/apache_mod_php/apache_mod_php-87.2~1/Root/usr/local \
--with-jpeg-dir=/BinaryCache/apache_mod_php/apache_mod_php-87.2~1/Root/usr/local \
--with-png-dir=/BinaryCache/apache_mod_php/apache_mod_php-87.2~1/Root/usr/local \
--enable-gd-native-ttf \
--with-icu-dir=/usr \
--with-ldap=/usr \
--with-ldap-sasl=/usr \
--with-libedit=/usr \
--enable-mbstring \
--enable-mbregex \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pear \
--with-pdo-mysql=mysqlnd \
--with-mysql-sock=/var/mysql/mysql.sock \
--with-readline=/usr \
--enable-shmop \
--with-snmp=/usr
--enable-soap \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--with-tidy \
--enable-wddx\
--with-xmlrpc \
--with-iconv-dir=/usr \
--with-xsl=/usr \
--enable-zip \
--with-pcre-regex=/opt/local \
--with-vpx-dir=/usr/local/Cellar \
--with-xpm-dir=no
Any help determining the issue would be greatly appreciated. I have tried rebuilding libiconv with no success in fixing the issue. The backslashes on my configure options was put there to break up the really long line of options to make it more readable here so please dont correct me on that in the case that you think that might be the issue. Thanks in advance.