[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gettext] Help Me in Building Gettext!
From: |
Bruno Haible |
Subject: |
Re: [bug-gettext] Help Me in Building Gettext! |
Date: |
Fri, 12 Aug 2011 18:55:18 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
Hello 先先(Terry),
> I'am very sorry to interrupt you. But I really have a problem in building
> gettext.
> The enviorment is that:
> VMware, Ubuntu 10.10
> export CC="gcc"
> export CXX="g++"
> export RANLIB="ranlib"
> export AR="ar"
> export LD="ld"
> export STRIP="strip"
> export C_INCLUDE_PATH=$PREFIX/include
> export LD_LIBRARY_PATH=$PREFIX/lib
> export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig
> export CFLAGS="-I/usr/local/include"
-I options belong in CPPFLAGS, not CFLAGS, because they are also needed when
preprocessing source code.
> export LDFLAGS="-L/usr/local/lib"
> The error happened in making gettext:
>
> /home/zzh/opt/gettext-0.18/gettext-tools/gnulib-lib/.libs/libgettextlib.so:
> undefined reference to `libiconv'
> /home/zzh/opt/gettext-0.18/gettext-tools/gnulib-lib/.libs/libgettextlib.so:
> undefined reference to `libiconv_close'
> /home/zzh/opt/gettext-0.18/gettext-tools/gnulib-lib/.libs/libgettextlib.so:
> undefined reference to `libiconv_open'
> However, I did build libiconv using gcc and I have found libiconv in the
> floder of "/usr/local/lib".
First of all, on a glibc system (such as Ubuntu), you don't need libiconv,
since iconv is already provided by glibc. So one of your options is to
"rm -r /usr/local/bin/iconv /usr/local/include/iconv.h
/usr/local/lib/libiconv.so".
(Don't remove /usr/local/lib/libiconv.2*.so, it might still be needed by some
libraries or executables.)
The second option is to investigate: Look in gettext-tools/config.status
whether libiconv was found or not:
$ grep ICONV gettext-tools/config.status
Then also look in gettext-tools/config.log why the autoconfiguration came
out the way it did.
A frequent issue are 32-bit vs. 64-bit builds. If you install libiconv as a
32-bit library, it will install iconv.h, and then until you also build and
install it in 64-bit mode, all your 64-bit mode compilations that need
iconv.h will fail. Or vice versa (32 <--> 64).
Bruno
--
In memoriam Itzik Feffer <http://en.wikipedia.org/wiki/Itzik_Feffer>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [bug-gettext] Help Me in Building Gettext!,
Bruno Haible <=