Installing PHP with iconv on Mac OSX 10.6 gives error: "Undefined symbols for architecture x86_64"
- by Jason
I am setting up PHP on my local web server with iconv, which should be there by default, but I am getting the following error:
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
__php_iconv_strlen in iconv.o
_php_iconv_string in iconv.o
__php_iconv_strpos in iconv.o
__php_iconv_appendl in iconv.o
_zif_iconv_substr in iconv.o
_zif_iconv_mime_encode in iconv.o
_php_iconv_stream_filter_append_bucket in iconv.o
...
(maybe you meant: _zif_iconv_strlen, _zif_iconv_strpos , _zif_iconv_mime_decode , _php_iconv_string , _zif_iconv_set_encoding , _zif_iconv_get_encoding , _zif_iconv_mime_decode_headers , _iconv_functions , _zif_iconv_mime_encode , _zif_iconv_strrpos , _iconv_module_entry , _iconv_globals , _zif_iconv_substr , _php_if_iconv , _zif_ob_iconv_handler )
ld: symbol(s) not found for architecture x86_64
Now, presumably this means that my iconv is not 64 bit. I tried to download libiconv and manually reinstall it with 64 bit, as such:
CFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64' CCFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64' CXXFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64' ./configure
But I get the following error:
configure: error: in `/Users/jason/Downloads/libiconv-1.13.1':
configure: error: C compiler cannot create executables
See `config.log' for more details.
In my config.lob file, it says at the bottom:
configure: exit 77
Any suggestions?