Diagnosing build errors

Ralf Corsepius ralf.corsepius at rtems.org
Tue Apr 15 04:32:02 UTC 2008

On Tue, 2008-04-15 at 16:16 +1200, Nigel Spon wrote:
> On 15/04/2008, at 3:50 PM, Ralf Corsepius wrote:
> > This breakdown very likely is a followup to something having gone  
> > wrong
> > before. Check your build log for why "run" doesn't seem to have been
> > built.
> >
> Aha. Psim failed to link with an undefined symbol   
> "_libintl_dgettext".
OK, your system is lacking dgettext in its libintl, or might be even be
lacking libintl.

I don't know how MacOSX is packaged, but this could be a missing
dependency. On Linux you'd have to install the corresponding development
package (libintl-devel and/or gettext-devel or similar)

The easy work-around is to disable internationalization, by adding to
your call to configure
configure .... --disable-nls

I do so for all of my rpms, because a cross-gdb, cross-binutils and
cross-gcc's i18n support files clash with their native i18n support

>  The moral is to always search the log for *** and  
> find the first error, not the last one.

>  I expected it to stop at the  
> first failure.
> On looking for that symbol, I find this rather curious thing in  
> libintl.h
> # define dgettext libintl_dgettext
> #endif
> That space between the # and the define looks like a mistake to me.
No. The "# define" is a perfectly legal construct.

Some very old (>>10 years old) compilers barf on it, but nowadays, this
is legal "C".


More information about the users mailing list