Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Compiling php on Lion

I need to compile PHP from source on Lion because the version installed by Apple doesn't have some extensions that I need. I have tried everything to get it to compile under Lion but it keeps failing on the 'make' - with unresolved symbol errors --


Undefined symbols for architecture x86_64:

"_iconv", referenced from:

__php_iconv_appendl in iconv.o

__php_iconv_strlen in iconv.o

_php_iconv_string in iconv.o

__php_iconv_strpos 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_mime_decode_headers, _zif_iconv_set_encoding , _php_iconv_string , _zif_iconv_get_encoding , _zif_iconv_mime_encode , _iconv_module_entry , _iconv_functions , _zif_iconv_mime_decode , _php_if_iconv , _zif_iconv_substr , _zif_ob_iconv_handler , _zif_iconv_strrpos , _zif_iconv_strlen , _iconv_globals , _zif_iconv_strpos )

ld: symbol(s) not found for architecture x86_64

collect2: ld returned 1 exit status


having Googled extensively there are several fixes for similar issues which I have tried (all of them that I could find) i.e.


1) edit Makefile to move MH_BUNDLE_FLAGS to end of compile statement

2) add EXTRA_CFLAGS=-lresolv to the environment

3) edited ext/iconv/iconv.c to change #define iconv libiconv to #define iconv iconv


Please can anyone assist me here? I really need to re-build PHP soon. I raised a bug on php.net but nothing has happened with it yet...

MacBook Pro, Mac OS X (10.7.2)

Posted on Nov 19, 2011 1:58 PM

Reply
4 replies

Compiling php on Lion

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.