Edit report at http://bugs.php.net/bug.php?id=52611&edit=1
ID: 52611 Comment by: abdelma999 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: Same issue under Cygwin 1.7.7-1 ./configure --with-iconv make ext/iconv/iconv.o: In function `_php_iconv_appendl': /home/r/php-5.3.3/ext/iconv/iconv.c:337: undefined reference to `_iconv' /home/r/php-5.3.3/ext/iconv/iconv.c:374: undefined reference to `_iconv' ext/iconv/iconv.o: In function `_php_iconv_strlen': /home/r/php-5.3.3/ext/iconv/iconv.c:615: undefined reference to `_iconv' ext/iconv/iconv.o: In function `_php_iconv_substr': /home/r/php-5.3.3/ext/iconv/iconv.c:736: undefined reference to `_iconv' ext/iconv/iconv.o: In function `php_iconv_string': /home/r/php-5.3.3/ext/iconv/iconv.c:501: undefined reference to `_iconv' ext/iconv/iconv.o:/home/r/php-5.3.3/ext/iconv/iconv.c:521: more undefined references to `_iconv' follow collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi.exe] Error 1 Previous Comments: ------------------------------------------------------------------------ [2010-08-19 17:09:22] beremour at gmail dot com Same issue under OpenBSD 4.7 AMD64 ext/iconv/.libs/iconv.o(.text+0x2c1): In function `_php_iconv_appendl': /var/data/src/php-5.3.3/ext/iconv/iconv.c:337: undefined reference to `iconv' ext/iconv/.libs/iconv.o(.text+0x3b7):/var/data/src/php- 5.3.3/ext/iconv/iconv.c:374: undefined reference to `iconv' ext/iconv/.libs/iconv.o(.text+0x4d5): In function `php_iconv_string': /var/data/src/php-5.3.3/ext/iconv/iconv.c:521: undefined reference to `iconv' ext/iconv/.libs/iconv.o(.text+0x5b7):/var/data/src/php- 5.3.3/ext/iconv/iconv.c:501: undefined reference to `iconv' ext/iconv/.libs/iconv.o(.text+0x6e3): In function `_php_iconv_strlen': /var/data/src/php-5.3.3/ext/iconv/iconv.c:615: undefined reference to `iconv' ext/iconv/.libs/iconv.o(.text+0x96e):/var/data/src/php- 5.3.3/ext/iconv/iconv.c:736: more undefined references to `iconv' follow collect2: ld returned 1 exit status *** Error code 1 Stop in /var/data/src/php-5.3.3 (line 255 of Makefile). # ------------------------------------------------------------------------ [2010-08-16 12:29:56] parsadev at yahoo dot com 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 ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ 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/bug.php?id=52611 -- Edit this bug report at http://bugs.php.net/bug.php?id=52611&edit=1