bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error building gettext 0.17 on Interix/sfu/sua (strdup/_ALL_SOURCE)


From: Bruno Haible
Subject: Re: error building gettext 0.17 on Interix/sfu/sua (strdup/_ALL_SOURCE)
Date: Wed, 17 Jun 2009 00:26:22 +0200
User-agent: KMail/1.9.9

Hi,

Jay Krell wrote:
> /src/gettext-0.17/gettext-runtime/libasprintf/autosprintf.cc: In copy
>    constructor `gnu::autosprintf::autosprintf(const gnu::autosprintf&)':
> /src/gettext-0.17/gettext-runtime/libasprintf/autosprintf.cc:51: error: 
> `strdup
>    ' undeclared (first use this function)
> /src/gettext-0.17/gettext-runtime/libasprintf/autosprintf.cc:51: error: (Each
>    undeclared identifier is reported only once for each function it appears
>    in.)
> make[4]: *** [autosprintf.lo] Error 1

Indeed, missing function declarations in the header files are fatal in C++.

> It appears very likely that CFLAGS=-D_ALL_SOURCE configure..

If you put the -D_ALL_SOURCE flag into CPPFLAGS, it will apply to both the C
code and the C++ code.

> Or make the autoconfigury #define it if it reveals strdup?

Since defining _ALL_SOURCE solves this problem (and many other missing
declarations problems as well), it's better to stay with CPPFLAGS=-D_ALL_SOURCE.

> maybe #define _ALL_SOURCE in autosprinf.cc?

It is your responsibility to set CFLAGS, CXXFLAGS, CPPFLAGS appropriately.
The INSTALL file gives special advice for a couple of systems. Interix is
not mentioned there, because it's not a widely used platform.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]