ID:               49267
 User updated by:  s dot rost at ewerk dot com
 Reported By:      s dot rost at ewerk dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Compile Failure
 Operating System: Mac OSX 10.6 Snow Leopard
 PHP Version:      5.3.0
 New Comment:

Right, the DNS stuff works in the snapshot (php5.3-200908151430)
The precise linker error for iconv is:

Undefined symbols:
  "_libiconv", referenced from:
      __php_iconv_strlen in iconv.o
      _php_iconv_string in iconv.o
      _php_iconv_string in iconv.o
      __php_iconv_strpos in iconv.o
      __php_iconv_appendl in iconv.o
      __php_iconv_appendl in iconv.o
      _zif_iconv_substr in iconv.o
      _zif_iconv_mime_encode in iconv.o
      _zif_iconv_mime_encode in iconv.o
      _zif_iconv_mime_encode in iconv.o
      _zif_iconv_mime_encode in iconv.o
      _zif_iconv_mime_encode in iconv.o
      _zif_iconv_mime_encode in iconv.o
      _php_iconv_stream_filter_append_bucket in iconv.o
      _php_iconv_stream_filter_append_bucket in iconv.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1


Previous Comments:
------------------------------------------------------------------------

[2009-08-15 15:26:39] scott...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

The DNS functions have been fixed in SVN already.

The iconv stuff I've not looked at yet.

------------------------------------------------------------------------

[2009-08-15 13:54:11] s dot rost at ewerk dot com

ext/iconv/iconv.c has to be changed to

#ifdef HAVE_LIBICONV
#define iconv iconv
#endif

Stupid copy/paste mistake.

Also that does of course not really make sense, the #define is not 
needed at all. so probably the configure script should not detect 
LIBICONV in the first place, but plain iconv.

------------------------------------------------------------------------

[2009-08-15 13:51:01] s dot rost at ewerk dot com

Description:
------------
The linker fails to link the PHP 5.3.0 binaries on Mac OS X 10.6. For 
two reasons.

1. The configure Script fails to add `-lresolv` to EXTRA_LIBS and 
MH_BUNDLE_FLAGS in Makefile

2. ext/iconv/iconv.c has to be changed

(line 185) from

#ifdef HAVE_LIBICONV
#define iconv libiconv
#endif

to

#ifdef HAVE_LIBICONV
#define iconv libiconv
#endif


Reproduce code:
---------------
./configure --with-iconv

Expected result:
----------------
`configure` and `make` work

Actual result:
--------------
Unresolved symbols when linking the binaries at the end of the `make` 
process.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49267&edit=1

Reply via email to