This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/11074] libstdc++ fails to build due to gettext issue
- From: "tim dot vanholder at anubex dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jul 2004 06:26:55 -0000
- Subject: [Bug libstdc++/11074] libstdc++ fails to build due to gettext issue
- References: <20030603082606.11074.tim.vanholder@anubex.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From tim dot vanholder at anubex dot com 2004-07-27 06:26 -------
(In reply to comment #8)
> I cannot reproduce this given your carefully plotted steps. Looking back, I see
> that some of the related PR's actually specify --disable-nls, which might
> actually be an issue.
>
> Is that the real problem here?
No it is not. The problem seems to be that the configury makes no attempt to
add -lintl to the link step for abi_check. This in turn comes from the fact
that the standard GNU gettext autoconf macro is not used.
The configury uses GLIBCXX_ENABLE_CLOCALE (line 955 of acinclude.m4) to choose
the clocale implementation. On linux, the use of glibc is tested and that
causes the GNU implementation to be selected.
Around line 1097, a comment reads
"don't call AM_GNU_GETTEXT here, assume glibc";
that is the problem for my setup, where libintl.h requires the use of -lintl.
A later test (line 1149) attempts to correct for this, by ensuring that
libintl.h exists (and it does), and that it can find 'gettext' in -lintl
(which it can, because it is simply pulled in from glibc).
The main issue is that included libintl.h for a standalone libintl transforms
calls to gettext() into calls to libintl_gettext() (exactly to avoid pulling
them in from glibc), and AC_SEARCH_LIBS does not add the include, so never
notices it needs -lintl.
My guess is that using AM_GNU_GETTEXT (and a sufficiently recent gettext) would
Do The Right Thing(tm), provided the makefiles would ensure @INTLLIBS@ is added
to $(LIBS) where appropriate.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11074