ID:               49267
 Comment by:       jason at dajaney dot com
 Reported By:      s dot rost at ewerk dot com
 Status:           Assigned
 Bug Type:         Compile Failure
 Operating System: Mac OSX 10.6 Snow Leopard
 PHP Version:      5.3, 6 (2009-08-18)
 Assigned To:      scottmac
 New Comment:

I am also experiencing this same issue on my new mac, running 10.6.

Keep this alive with any updates. 

Undefined symbols:
  "_libiconv_open", referenced from:
      _do_convert in gdkanji.o
  "_libiconv", referenced from:
      _do_convert in gdkanji.o
  "_libiconv_close", referenced from:
      _do_convert in gdkanji.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

The above was trying my last ditch effort to have --without-iconv in
the ./configure statement. 

Jason


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

[2009-09-09 20:34:20] rickdunn at chez dot com

For what it's worth, this is probably the same iconv issue that has 
already popped up in bug #43189 and bug #48195.

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

[2009-09-09 13:30:41] aoyagi dot kouhei at gmail dot com

SnowLeopard
PHP-5.3.1RC1

ext/iconv/iconv.c

#ifdef HAVE_LIBICONV
#define iconv libiconv
#endif

to 

#ifdef HAVE_LIBICONV
#define iconv iconv
#endif

./configure --prefix=/opt/php-5.3.1RC1 --enable-zip
--with-apxs2=/opt/httpd/bin/apxs --with-bz2 --enable-calendar
--with-curl --with-gd --enable-gd-native-ttf --enable-gd-jis-conv 
--enable-mbstring --with-pdo-pgsql=/opt/postgresql
--with-pgsql=/opt/postgresql --enable-soap --enable-sockets
--with-jpeg-dir=/opt/jpeg --with-png-dir=/opt/libpng
--with-freetype-dir=/opt/freetype --with-zlib
--with-libxml-dir=/opt/libxml2 --with-xsl=/opt/libxslt
--with-readline=/opt/readline --with-gettext=/opt/gettext
--with-iconv-dir=/opt/libiconv

make
....
Undefined symbols:
  "_libiconv_open", referenced from:
      _do_convert in gdkanji.o
  "_libiconv", referenced from:
      _do_convert in gdkanji.o
  "_libiconv_close", referenced from:
      _do_convert in gdkanji.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

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

[2009-09-09 13:29:03] alexandre dot morgaut at 4d dot fr

the tip of notfornoone worked for me 
but I still have a problem with buildconf :

sh-3.2# ./buildconf --force
Forcing buildconf
buildconf: checking installation...
buildconf: autoconf version 2.61 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
           Running vcsclean for you.
           To avoid this, install autoconf-2.13.
Can't figure out your VCS, not cleaning.

I didn't change autoconf, so I imagine snow leopard did..

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

[2009-09-08 00:45:55] notfornoone at gmail dot com

The instructions in the first comment worked for me, here is what I did
to successfully install php-5.3.1RC1 on Snow Leopard. This also worked
for php-5.2.11RC1 on Snow Leopard.

1.
I changed ext/iconv/iconv.c as per the first comment on this bug.

On line 185 change

#ifdef HAVE_LIBICONV
#define iconv libiconv
#endif

to 

#ifdef HAVE_LIBICONV
#define iconv iconv
#endif


2.
Run configure
./configure --prefix=/usr/local/php/5.3.1RC1
--with-apxs2=/usr/sbin/apxs


I found that after changing the iconv.c file I did not need to add
-lsresolv to EXTRA_LIBS

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

[2009-09-06 03:47:43] me at sleepycode dot com

I have the same issue as well with Snow Leopard and any version of PHP
I try.
I have built my own libiconv and this made little difference.

My configure line:
----
./configure --prefix=/home/software/php/v5 \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/share/man \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-apxs2=/home/software/apache/bin/apxs \
--enable-maintainer-zts \
--with-zlib-dir=/home/software/zlib \
--with-pgsql=/home/software/postgresql \
--enable-mbstring \
--with-gd \
--with-png-dir=/home/software/libpng \
--with-iconv=/home/software/iconv
----

The build error during make:
----
Undefined symbols:
  "_libiconv_open", referenced from:
      _do_convert in gdkanji.o
      _php_iconv_string in iconv.o
      __php_iconv_strlen in iconv.o
      __php_iconv_substr in iconv.o
      __php_iconv_substr in iconv.o
      __php_iconv_strpos in iconv.o
      __php_iconv_mime_encode in iconv.o
      __php_iconv_mime_encode in iconv.o
      __php_iconv_mime_decode in iconv.o
      __php_iconv_mime_decode in iconv.o
      _php_iconv_stream_filter_ctor in iconv.o
  "_libiconv", referenced from:
      _do_convert in gdkanji.o
  "_libiconv_close", referenced from:
      _do_convert in gdkanji.o
      _php_iconv_string in iconv.o
      __php_iconv_strlen in iconv.o
      __php_iconv_substr in iconv.o
      __php_iconv_substr in iconv.o
      __php_iconv_strpos in iconv.o
      __php_iconv_mime_encode in iconv.o
      __php_iconv_mime_encode in iconv.o
      __php_iconv_mime_decode in iconv.o
      __php_iconv_mime_decode in iconv.o
      __php_iconv_mime_decode in iconv.o
      _php_iconv_stream_filter_dtor in iconv.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1
----

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/49267

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

Reply via email to