[odb-users] ODB fails to compile if GCC doesn't support NLS
boris at codesynthesis.com
Fri Feb 15 14:29:20 EST 2013
Stath Paul <pstath at axxcelera.com> writes:
> /usr/include/libintl.h:40:14: error: expected unqualified-id before '__const'
Yes, I've seen this while building binaries for GNU/Linux. Looks like
some weird interaction between libstdc++ and GCC plugin headers.
Specifically, intl.h in GCC defines gettext as a macro which causes
havoc in libintl.h.
> I was able to correct the issue by making a slight modification to
> One can either remove the "#include <intl.h>" on line 44,
> Modify the line to be "#include <libintl.h>".
> From what I can tell, odb is not internationalized. Is there a need
> to include <intl.h> (or <libintl.h>) at all?
Good question. I just checked and none of the GCC plugin headers
actually include intl.h. It also appears that ODB doesn't need
this header (I've just tested with 4.5, 4.6, and 4.7). A lot of
the includes in gcc.hxx are there just because "that's how GCC
excepts them to be".
So, yes, removing intl.h inclusion seems to be the fix. I will
publish a bugfix shortly. Thanks for the report and let me know
if there are any other issues.
More information about the odb-users