Hi Randell,

>From the libiconv site, there are two ways to install it, the library mode
(the one that you did) and the other one is the libc plug/override mode.

By executing iconv -V gives you the glibc version installed on your CentOS.

rpm -q -f /usr/bin/iconv
glibc-common-2.5-49

>From the GNU page of libiconv, it specifically said that:

After installing GNU libiconv for the first time, it is recommended to
recompile and reinstall GNU gettext, so that it can take advantage of
libiconv.

Another info from the site:

This works on GNU/Linux, Solaris and OSF/1 systems only. It is a way to get
good iconv support without having glibc-2.1. It installs a library
preloadable_libiconv.so. This library can be used with LD_PRELOAD, to
override the iconv* functions present in the C library.

   - On GNU/Linux and Solaris:

   $ export LD_PRELOAD=/usr/local/lib/preloadable_libiconv.so

   - On OSF/1:

   $ export _RLD_LIST=/usr/local/lib/preloadable_libiconv.so:DEFAULT


A program's source need not be modified, the program need not even be
recompiled. Just set the LD_PRELOAD environment variable, that's it!

Instead of doing the whole process by hand and to make your life much
easier, I would highly recommend to use other CentOS yum repo such as:

epel
rpmforge
ius

Hope this help.

Jimmy

On Wed, Jan 19, 2011 at 4:42 PM, Randell
<josephrandell.benavi...@gmail.com>wrote:

> Hi guys,
>
> I'm cross-posting this from NullPointer.ph since I've been scratching my
> head for several hours already with this problem.
>
> The code I'm working on runs perfectly on Windows XP and on Mac OS X. When
> testing it on CentOS (and on Fedora and on Ubuntu), it's not working
> properly. Searching the nets led me to the conclusion that it's the glibc
> version of the iconv that's causing the problem. So now I need the libiconv
> version of iconv for Zend Lucene to work properly.
>
> I already downloaded libiconv and configured it with --prefix=/usr/local,
> make, then make install without any errors. It seems that it was
> successfully installed because executing /usr/local/bin/iconv --version says
> the version is the libiconv one. Although a simple iconv --version still
> gives the glibc version.
>
> Then I recompiled PHP from source using --with-iconv=/usr/local. But still,
> the phpinfo() is showing the iconv being used is the glibc version. I've
> also already tried several other compiles using --with-iconv-dir or using
> /usr/local/bin/php.
>
> What am I missing here?
>
>
> The original question can be found here:
> http://nullpointer.ph/questions/2922/how-can-i-force-php-to-use-the-libiconv-version-of-iconv-instead-of-the-centos-installed-glibc-version
>
>
>
> Thanks!
> --
> Randell
> http://randell.ph/
>
> _________________________________________________
> Philippine Linux Users' Group (PLUG) Mailing List
> http://lists.linux.org.ph/mailman/listinfo/plug
> Searchable Archives: http://archives.free.net.ph
>
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
http://lists.linux.org.ph/mailman/listinfo/plug
Searchable Archives: http://archives.free.net.ph

Reply via email to