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

 ID:                 52611
 User updated by:    parsadev at yahoo dot com
 Reported by:        parsadev at yahoo dot com
 Summary:            compile problem with iconv
 Status:             Bogus
 Type:               Bug
 Package:            ICONV related
 Operating System:   Centos 5.5 x86_64
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

aharvey, Thanks for your guide. Finally I compiled it successfully. but
some helps to this issue:



1. If you install 64-bit version of Centos and then remove all the
i386-i686 packages(yum remove \*.i\?86), then you must add
--with-libdir=lib64 to solve the first problem of compiling modules.

2. When you set lib64 for libdir, you will face to my problem that I
reported here. to solve this problem you can install libiconv with
(configure --prefix=/usr/local/iconv), then in the '/usr/local/inconv'
link the folder 'lib' to 'lib64' near it (ln -s /usr/local/iconv/lib
/usr/local/iconv/lib64). Then config your php. (for install iconv module
for php use --with-iconv-dir=/usr/local/iconv).



Best Regards,

Parsa


Previous Comments:
------------------------------------------------------------------------
[2010-08-16 08:09:56] ahar...@php.net

Use --with-iconv=/usr/local, then -- having two separate implementations
of iconv() around is just asking for trouble, particularly if you don't
tell configure explicitly which path to use.



And yes, I did test it.



At any rate, this is a support issue rather than a bug, so I'd suggest
following this up with the support channels rather than here.

------------------------------------------------------------------------
[2010-08-16 07:33:27] parsadev at yahoo dot com

Yes, in 32bits centos there is no problem. but this problem occures in
64bits os.

I installed libiconv with this configure command (configure
--prefix=/usr/local)

and tested PHP installation with minimum of config like below:



./configure  --prefix=/usr/local/php5
--with-config-file-path=/usr/local/etc/php5/cgi --with-iconv



and the same error is viewed.

Are you tested compile with below configs?



Centos 5.5 x86_64 (64bit)

PHP 5.3.3

libiconv 1.13.1

------------------------------------------------------------------------
[2010-08-16 05:00:53] ahar...@php.net

Building PHP with --with-iconv works fine on a stock CentOS 5.5 install.
This looks like an issue with your libiconv installation (remembering
that CentOS doesn't ship with libiconv, nor is it available in the
standard repository), rather than PHP itself.

------------------------------------------------------------------------
[2010-08-15 14:49:01] parsadev at yahoo dot com

excuse me. the correct configure command is:



./configure  --prefix=/usr/local/php5 --with-libdir=lib64
--enable-bcmath --with-bz2 --enable-calendar --with-curl
--with-config-file-path=/usr/local/etc/php5/cgi --enable-dba
--with-db4=/usr --enable-exif --with-libexpat-dir=/usr
--with-freetype-dir=/usr --enable-ftp --with-gettext=/usr --with-gd
--enable-gd-native-ttf --with-iconv-dir=/usr/local/lib
--enable-inline-optimization --with-jpeg-dir=/usr --with-kerberos
--with-libxml-dir=/usr --enable-magic-quotes --enable-mbregex
--enable-mbstring --with-mcrypt --with-mhash --with-mysql --with-mysqli
--with-mysql-sock=/var/lib/mysql/mysql.sock --with-openssl-dir=/usr
--with-pdo-mysql --with-pdo-pgsql --with-pear --with-pgsql
--with-png-dir=/usr --with-readline=/usr --enable-soap --enable-sockets
--enable-sqlite-utf8 --with-unixODBC=/usr --enable-wddx --with-xsl
--enable-zip --with-zlib

------------------------------------------------------------------------
[2010-08-15 12:38:47] parsadev at yahoo dot com

Description:
------------
I'm trying to compile php 5.3.3 with libiconv-1.13.1 and centos 5.5
x86_64 (64-bits)

My configure command is:



./configure  --prefix=/usr/local/php5 --with-libdir=lib64
--enable-bcmath --with-bz2 --enable-calendar --with-curl
--with-config-file-path=/usr/local/etc/php5/cgi --enable-dba
--with-db4=/usr --enable-exif --with-libexpat-dir=/usr
--with-freetype-dir=/usr --enable-ftp --with-gettext=/usr --with-gd
--enable-gd-native-ttf --with-iconv --enable-inline-optimization
--with-jpeg-dir=/usr --with-kerberos --with-libxml-dir=/usr
--enable-magic-quotes --enable-mbregex --enable-mbstring --with-mcrypt
--with-mhash --with-mysql --with-mysqli
--with-mysql-sock=/var/lib/mysql/mysql.sock --with-openssl-dir=/usr
--with-pdo-mysql --with-pdo-pgsql --with-pear --with-pgsql
--with-png-dir=/usr --with-readline=/usr --enable-soap --enable-sockets
--enable-sqlite-utf8 --with-unixODBC=/usr --enable-wddx --with-xsl
--enable-zip --with-zlib



configure is ok



but when I use 'make' I'm facing with error:



nd_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo
Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo
Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo
Zend/zend_gc.lo Zend/zend_closures.lo Zend/zend_float.lo
Zend/zend_objects.lo Zend/zend_object_handlers.lo
Zend/zend_objects_API.lo Zend/zend_default_classes.lo
Zend/zend_execute.lo sapi/cgi/cgi_main.lo sapi/cgi/fastcgi.lo
main/internal_functions.lo -lcrypt -lz -lexslt -lexpat -lexpat -lcrypt
-lreadline -lncurses -lpq -lrt -lpq -lmysqlclient -lmcrypt -lltdl
-lfreetype -lpng -lz -ljpeg -lssl -lcrypto -ldb-4.3 -lcurl -lbz2 -lz -lm
-ldl -lnsl -lxml2 -lz -lm -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto
-lcom_err -lidn -lssl -lcrypto -lz -lxml2 -lz -lm -lmysqlclient -lz
-lcrypt -lnsl -lm -lssl -lcrypto -lodbc -lmysqlclient -lz -lcrypt -lnsl
-lm -lssl -lcrypto -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm
-lxml2 -lz -lm -lxslt -lxml2 -lz -lm -lcrypt  -o sapi/cgi/php-cgi

ext/gd/libgd/gdkanji.o: In function `do_convert':

/root/src/php-5.3.3/ext/gd/libgd/gdkanji.c:350: undefined reference to
`libiconv_open'

/root/src/php-5.3.3/ext/gd/libgd/gdkanji.c:365: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/gd/libgd/gdkanji.c:381: undefined reference to
`libiconv_close'

ext/iconv/iconv.o: In function `_php_iconv_strlen':

/root/src/php-5.3.3/ext/iconv/iconv.c:592: undefined reference to
`libiconv_open'

/root/src/php-5.3.3/ext/iconv/iconv.c:615: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:649: undefined reference to
`libiconv_close'

ext/iconv/iconv.o: In function `php_iconv_string':

/root/src/php-5.3.3/ext/iconv/iconv.c:430: undefined reference to
`libiconv_open'

/root/src/php-5.3.3/ext/iconv/iconv.c:442: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:456: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:467: undefined reference to
`libiconv_close'

ext/iconv/iconv.o: In function `_php_iconv_strpos':

/root/src/php-5.3.3/ext/iconv/iconv.c:840: undefined reference to
`libiconv_open'

/root/src/php-5.3.3/ext/iconv/iconv.c:868: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:982: undefined reference to
`libiconv_close'

ext/iconv/iconv.o: In function `_php_iconv_appendl':

/root/src/php-5.3.3/ext/iconv/iconv.c:337: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:374: undefined reference to
`libiconv'

ext/iconv/iconv.o: In function `_php_iconv_substr':

/root/src/php-5.3.3/ext/iconv/iconv.c:712: undefined reference to
`libiconv_open'

/root/src/php-5.3.3/ext/iconv/iconv.c:736: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:791: undefined reference to
`libiconv_close'

/root/src/php-5.3.3/ext/iconv/iconv.c:795: undefined reference to
`libiconv_close'

/root/src/php-5.3.3/ext/iconv/iconv.c:744: undefined reference to
`libiconv_open'

ext/iconv/iconv.o: In function `_php_iconv_mime_decode':

/root/src/php-5.3.3/ext/iconv/iconv.c:1342: undefined reference to
`libiconv_open'

/root/src/php-5.3.3/ext/iconv/iconv.c:1453: undefined reference to
`libiconv_close'

/root/src/php-5.3.3/ext/iconv/iconv.c:1456: undefined reference to
`libiconv_open'

/root/src/php-5.3.3/ext/iconv/iconv.c:1811: undefined reference to
`libiconv_close'

/root/src/php-5.3.3/ext/iconv/iconv.c:1814: undefined reference to
`libiconv_close'

ext/iconv/iconv.o: In function `php_iconv_stream_filter_dtor':

/root/src/php-5.3.3/ext/iconv/iconv.c:2440: undefined reference to
`libiconv_close'

ext/iconv/iconv.o: In function `_php_iconv_mime_encode':

/root/src/php-5.3.3/ext/iconv/iconv.c:1032: undefined reference to
`libiconv_open'

/root/src/php-5.3.3/ext/iconv/iconv.c:1046: undefined reference to
`libiconv_open'

/root/src/php-5.3.3/ext/iconv/iconv.c:1304: undefined reference to
`libiconv_close'

/root/src/php-5.3.3/ext/iconv/iconv.c:1307: undefined reference to
`libiconv_close'

/root/src/php-5.3.3/ext/iconv/iconv.c:1165: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:1117: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:1149: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:1307: undefined reference to
`libiconv_close'

/root/src/php-5.3.3/ext/iconv/iconv.c:1217: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:1248: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:1291: undefined reference to
`libiconv'

ext/iconv/iconv.o: In function `php_iconv_stream_filter_append_bucket':

/root/src/php-5.3.3/ext/iconv/iconv.c:2590: undefined reference to
`libiconv'

/root/src/php-5.3.3/ext/iconv/iconv.c:2590: undefined reference to
`libiconv'

ext/iconv/iconv.o:/root/src/php-5.3.3/ext/iconv/iconv.c:2512: more
undefined references to `libiconv' follow

ext/iconv/iconv.o: In function `php_iconv_stream_filter_ctor':

/root/src/php-5.3.3/ext/iconv/iconv.c:2466: undefined reference to
`libiconv_open'

collect2: ld returned 1 exit status

make: *** [sapi/cgi/php-cgi] Error 1



Please give a solution to this issue.



Regards,

Parsa



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



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

Reply via email to