0

Here is the message I am getting:

Undefined symbols for architecture x86_64:
  "_iconv_close", referenced from:
      _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_mime_decode in iconv.o
      _php_iconv_stream_filter_cleanup in iconv.o
      ...
  "_iconv_open", referenced from:
      _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_mime_decode in iconv.o
      _php_iconv_stream_filter_factory_create in iconv.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: *** [sapi/cli/php] Error 1

Also I have been receiving allot of warnings while I was compiling with Make.

e.g:

zend_operators.c:2171:34: warning: 
  'finite' is deprecated: first deprecated in OS X 10.9
  [-Wdeprecated-declarations]
                    } else if (dval1 == dval2 && !zend_finite(dval1)) {

zend_compile.c:4010:9: warning: assigning
  to 'char *' from 'const char *' discards qualifiers
  [-Wincompatible-pointer-types-discards-qualifiers]
    lcname = hash_key->arKey;
           ^ ~~~~~~~~~~~~~~~

 'unsigned char *' converts between pointers to integer types with
  different sign [-Wpointer-sign]
                                    sc = YYCURSOR;
                                       ^
Zend/zend_ini_scanner.l:479:12: warning: assigning to 'unsigned char *' from
  'char *' converts between pointers to integer types with different sign
  [-Wpointer-sign]
            YYCURSOR = sc;

They are many more of those.

Here is my commands:

./configure --enable-fpm --with-pdo-mysql --with-mcrypt --with-zlib --with-openssl --with-curl

make

I am login in as root.

Here are more details:

PHP-5.5.13 Mac OS X 10.9.3

1

looks like PHP cannot find the symbolds because iconv renamed them.

See the following link for details:

SuperUser Answer by fidell

qoute:

The MacPorts iconv library renames the symbols to _libiconv_open and _libiconv_close. That's why PHP couldn't find them,... Run nm /opt/local/lib/libiconv.dylib vs nm /usr/lib/libiconv.dylib (in 10.7.3).

4
  • What about all these warnings? Should I worry about them? They are many of them.
    – jnbdz
    Jun 16 '14 at 14:07
  • It depends, if you can fix them, do it, but thats not allways possible and you might need to accept them. However there might be a possibility there is still something else wrong, which creates the large amount of warnings. Jun 16 '14 at 14:13
  • I just uninstalled everything from Mac Port and it worked.
    – jnbdz
    Jun 16 '14 at 14:41
  • For some reason (nm /opt/local/lib/libiconv.dylib vs nm /usr/lib/libiconv.dylib) did not work for me. But uninstalling everything worked from Mac Port.
    – jnbdz
    Jun 16 '14 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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