Bug #52611 [Com]: compile problem with iconv
Edit report at https://bugs.php.net/bug.php?id=52611&edit=1
ID: 52611
Comment by: g dot rossolini at gmail dot com
Reported by: parsadev at yahoo dot com
Summary: compile problem with iconv
Status: Not a bug
Type: Bug
Package: ICONV related
Operating System: Centos 5.5 x86_64
PHP Version: 5.3.3
Block user comment: N
Private report: N
New Comment:
Hi,
I had the same problem (a bundled iconv + another version I compiled myself) and I just had to give
"configure" the path to the libiconv I wanted to use, like this:
./configure --disable-all --with-iconv=/usr/local/lib
Then I could compile PHP 5.3.10 with libiconv 1.14, libpng etc.
I have no idea why "configure" does not appear to look for this version, like it does for
every other lib.
Previous Comments:
------------------------------------------------------------------------
[2010-10-16 10:10:30] abdelma999 at yahoo dot com
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
------------------------------------------------------------------------
[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] aharvey@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
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=52611
--
Edit this bug report at https://bugs.php.net/bug.php?id=52611&edit=1
Thread (9 messages)