Hi Ben, thanks for looking at this. I already send an email to the gnulib bug mailing list. Maybe you can refer to that.
Cheers Fritz > Am 22.11.2024 um 18:02 schrieb Ben Pfaff <b...@cs.stanford.edu>: > > It does look like a gettext bug. I'll try to report it properly. > > On Fri, Nov 22, 2024 at 8:56 AM Friedrich Beckmann > <friedrich.beckm...@posteo.de> wrote: >> >> Hi, >> >> i cannot build pspp with configure option CFLAGS='-g -O0‘ on debian testing. >> My >> configure command for an out of tree build is: >> >> ../pspp/configure --prefix=/home/fritz/pspp/install 'CFLAGS=-g -O0' >> >> The build works when I omit the CFLAGS… part. The error message is: >> >> In file included from ../pspp/src/language/commands/glm.c:48: >> ../pspp/src/language/commands/glm.c: In function 'output_glm': >> ../pspp/gl/gettext.h:129:67: error: 'LC_MESSAGES' undeclared (first use in >> this function) >> 129 | pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, >> LC_MESSAGES) >> | >> ^~~~~~~~~~~ >> ../pspp/src/language/commands/glm.c:52:27: note: in expansion of macro >> 'pgettext' >> 52 | #define C_(msgctxt,msgid) pgettext (msgctxt, msgid) >> | ^~~~~~~~ >> ../pspp/src/language/commands/glm.c:725:48: note: in expansion of macro 'C_' >> 725 | pivot_value_new_text_translate ("Error", C_("statistics", >> "Error"))); >> >> I guess the problem is introduced by this commit: >> >> https://git.savannah.gnu.org/cgit/pspp.git/commit/?id=69359d97371b41c19f1ff1b8f1fef2e215cc4f24 >> >> I can fix the problem by including <locale.h> in glm.c but I think this is a >> bug in gettext? >> >> The reason is in /usr/include/libintl.h where I find the following: >> >> ... >> /* Optimized version of the function above. */ >> #if defined __OPTIMIZE__ && !defined __cplusplus >> >> /* We need NULL for `gettext'. */ >> # define __need_NULL >> # include <stddef.h> >> >> /* We need LC_MESSAGES for `dgettext'. */ >> # include <locale.h> >> … >> >> Cheers >> >> Fritz >> >> >> >>