[PHP-BUG] Bug #60034 [NEW]: Build fails with apxs and readline

2011-10-10 Thread notfornoone at gmail dot com
From: 
Operating system: OS X (i386-apple-darwin10.8.0)
PHP version:  5.4SVN-2011-10-10 (snap)
Package:  Compile Failure
Bug Type: Bug
Bug description:Build fails with apxs and readline

Description:

When compiling on 10.6 with the following configure args the build fails:

./configure  '--prefix=/Users/me/Desktop/php54test' '--disable-all'
'--with-
apxs2=/usr/sbin/apxs' '--with-readline=/usr/local/Cellar/readline/6.2.1'
make

Fails with this error:

Undefined symbols for architecture x86_64:
  _rl_on_new_line, referenced from:
  _zif_readline_on_new_line in readline.o
  _history_list, referenced from:
  _zif_readline_list_history in readline.o
  _rl_mark, referenced from:
  _zif_readline_info in readline.o
  _rl_pending_input, referenced from:
  _zif_readline_info in readline.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1


I've also tried:

* Using an earler version of readline (6.1) fails with the same error
* Compiling on 10.7 Lion results in the same error
* Using the same configure options using the 5.3 branch builds fine
* Compiling with configure options --with-libedit enabled instead of the
--
with-readline option builds fine



-- 
Edit bug report at https://bugs.php.net/bug.php?id=60034edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60034r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60034r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=60034r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60034r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60034r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60034r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=60034r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=60034r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=60034r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=60034r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=60034r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=60034r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=60034r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60034r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=60034r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=60034r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=60034r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=60034r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=60034r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=60034r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=60034r=mysqlcfg



#49267 [Com]: Linking fails for iconv: Undefined symbols: _libiconv

2009-09-07 Thread notfornoone at gmail dot com
 ID:   49267
 Comment by:   notfornoone at gmail 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:

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


Previous Comments:


[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




[2009-09-06 00:04:17] aoyagi dot kouhei at gmail dot com

Snow Leopard
PHP5.3.1RC1

./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
  __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
  _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-04 05:34:43] jay3ld at yahoo dot com

Has any progress been made towards this with Snow Leopard?

I am receiving the same issue with both PHP 5.3 and PHP 6.  I don't get
the above error.  My error occurs during the configure stage.


checking for iconv support... yes
checking for iconv... no
checking for libiconv... no
checking for libiconv in -liconv... no
checking for iconv in -liconv... no
configure: error: Please reinstall the iconv library.


I even tried to download and build