#1637 [compile error]gettext still using nl_langinfo

OTHER
pending
Bug
none
Unknown
False
2013-02-11
2012-05-23
illuminity
No

I am using gettext source + patches (mgwport prep) from the mingw repo, while configuring using this :
./configure --prefix=/mingw --host=i586-pc-mingw32 --enable-relocatable --enable-static --enable-threads=win32 --disable-java --disable-csharp \ --without-included-glib --without-included-libxml --disable-rpath \ --disable-rpath --without-emacs --disable-native-java --without-git \ CXXFLAGS="-O2 -Wall -I/mingw/include/glib-2.0 -I/mingw/include/libxml2/libxml -D__USE_MINGW_ANSI_STDIO -D__USE_MINGW_FSEEK" \ CFLAGS="-O2 -Wall -I/mingw/include/glib-2.0 -I/mingw/include/libxml2/libxml -D__USE_MINGW_ANSI_STDIO -D__USE_MINGW_FSEEK" \ LD_FLAGS="-L/mingw/lib -lglib-2.0 -lxml2"

It failed at compiling libgrep at gettext-tools :
m-fgrep.c:236:10: warning: 'mb_properties' may be used uninitialized in this function [-Wuninitialized]
\ gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -I../gnulib-lib -I../gnulib-lib -I../intl -I/mingw/include -O2 -Wall -I/mingw/include/glib-2.0 -I/mingw/include/libxml2/libxml -D__USE_MINGW_ANSI_STDIO -D__USE_MINGW_FSEEK -c m-regex.c
\ gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -I../gnulib-lib -I../gnulib-lib -I../intl -I/mingw/include -O2 -Wall -I/mingw/include/glib-2.0 -I/mingw/include/libxml2/libxml -D__USE_MINGW_ANSI_STDIO -D__USE_MINGW_FSEEK -c nl_langinfo.c
nl_langinfo.c: In function 'nl_langinfo':
nl_langinfo.c:144:10: error: 'RADIXCHAR' undeclared (first use in this function)
nl_langinfo.c:144:10: note: each undeclared identifier is reported only once for each function it appears in
nl_langinfo.c:146:10: error: 'THOUSEP' undeclared (first use in this function)
nl_langinfo.c:150:10: error: 'D_T_FMT' undeclared (first use in this function)
nl_langinfo.c:153:10: error: 'D_FMT' undeclared (first use in this function)
nl_langinfo.c:156:10: error: 'T_FMT' undeclared (first use in this function)
nl_langinfo.c:159:10: error: 'T_FMT_AMPM' undeclared (first use in this function)
nl_langinfo.c:161:10: error: 'AM_STR' undeclared (first use in this function)
nl_langinfo.c:163:10: error: 'PM_STR' undeclared (first use in this function)
nl_langinfo.c:165:10: error: 'DAY_1' undeclared (first use in this function)
nl_langinfo.c:167:10: error: 'DAY_2' undeclared (first use in this function)
nl_langinfo.c:169:10: error: 'DAY_3' undeclared (first use in this function)
nl_langinfo.c:171:10: error: 'DAY_4' undeclared (first use in this function)
nl_langinfo.c:173:10: error: 'DAY_5' undeclared (first use in this function)
nl_langinfo.c:175:10: error: 'DAY_6' undeclared (first use in this function)
nl_langinfo.c:177:10: error: 'DAY_7' undeclared (first use in this function)
nl_langinfo.c:179:10: error: 'ABDAY_1' undeclared (first use in this function)
nl_langinfo.c:181:10: error: 'ABDAY_2' undeclared (first use in this function)
nl_langinfo.c:183:10: error: 'ABDAY_3' undeclared (first use in this function)
nl_langinfo.c:185:10: error: 'ABDAY_4' undeclared (first use in this function)
nl_langinfo.c:187:10: error: 'ABDAY_5' undeclared (first use in this function)
nl_langinfo.c:189:10: error: 'ABDAY_6' undeclared (first use in this function)
nl_langinfo.c:191:10: error: 'ABDAY_7' undeclared (first use in this function)
nl_langinfo.c:193:10: error: 'MON_1' undeclared (first use in this function)
nl_langinfo.c:195:10: error: 'MON_2' undeclared (first use in this function)
nl_langinfo.c:197:10: error: 'MON_3' undeclared (first use in this function)
nl_langinfo.c:199:10: error: 'MON_4' undeclared (first use in this function)
nl_langinfo.c:201:10: error: 'MON_5' undeclared (first use in this function)
nl_langinfo.c:203:10: error: 'MON_6' undeclared (first use in this function)
nl_langinfo.c:205:10: error: 'MON_7' undeclared (first use in this function)
nl_langinfo.c:207:10: error: 'MON_8' undeclared (first use in this function)
nl_langinfo.c:209:10: error: 'MON_9' undeclared (first use in this function)
nl_langinfo.c:211:10: error: 'MON_10' undeclared (first use in this function)
nl_langinfo.c:213:10: error: 'MON_11' undeclared (first use in this function)
nl_langinfo.c:215:10: error: 'MON_12' undeclared (first use in this function)
nl_langinfo.c:217:10: error: 'ABMON_1' undeclared (first use in this function)
nl_langinfo.c:219:10: error: 'ABMON_2' undeclared (first use in this function)
nl_langinfo.c:221:10: error: 'ABMON_3' undeclared (first use in this function)
nl_langinfo.c:223:10: error: 'ABMON_4' undeclared (first use in this function)
nl_langinfo.c:225:10: error: 'ABMON_5' undeclared (first use in this function)
nl_langinfo.c:227:10: error: 'ABMON_6' undeclared (first use in this function)
nl_langinfo.c:229:10: error: 'ABMON_7' undeclared (first use in this function)
nl_langinfo.c:231:10: error: 'ABMON_8' undeclared (first use in this function)
nl_langinfo.c:233:10: error: 'ABMON_9' undeclared (first use in this function)
nl_langinfo.c:235:10: error: 'ABMON_10' undeclared (first use in this function)
nl_langinfo.c:237:10: error: 'ABMON_11' undeclared (first use in this function)
nl_langinfo.c:239:10: error: 'ABMON_12' undeclared (first use in this function)
nl_langinfo.c:247:10: error: 'CRNCYSTR' undeclared (first use in this function)
nl_langinfo.c:251:10: error: 'YESEXPR' undeclared (first use in this function)
nl_langinfo.c:253:10: error: 'NOEXPR' undeclared (first use in this function)
make[4]: *** [nl_langinfo.o] Error 1
make[4]: Leaving directory `/c/compile/temp/src/gettext-0.18.1.1/gettext-tools/libgrep'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/c/compile/temp/src/gettext-0.18.1.1/gettext-tools/libgrep'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/compile/temp/src/gettext-0.18.1.1/gettext-tools'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/compile/temp/src/gettext-0.18.1.1/gettext-tools'
make: *** [all-recursive] Error 1

I have already tried manually adding to config.h but still not a viable solution
#define _WIN32 1
#define HAVE_LANGINFO_H 0

gcc :
COLLECT_GCC=C:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r
untime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.6.2 (GCC)

g++ :
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\g++.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r
untime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.6.2 (GCC)

ld :
$ ld -v
GNU ld (GNU Binutils) 2.22

Discussion

  • Earnie Boyd
    Earnie Boyd
    2012-06-14

    • milestone: --> Waiting_User_Response
    • assigned_to: nobody --> cwilso11
    • status: open --> pending
     
  • Earnie Boyd
    Earnie Boyd
    2012-06-14

    Perhaps you need to add --disable-nls to the configure steps?

     
  • Andrew
    Andrew
    2012-06-15

    I bumped into this one as well, and I believe I know what the cause was (in my case, at least).

    The package "mingw-catgets-1.0-dev.tar.gz" contains the file "include/langinfo.h". When configuring gettext it picks up the already existing langinfo.h and, via a preproccesor conditional, skips defining the symbols that appear in illuminity's bug report.

    Unfortunately, I got sidetracked and haven't yet tried building without mingw-catgets installed, so whether that truly fixes the issue or not I am uncertain.

     
  • Earnie Boyd
    Earnie Boyd
    2012-10-19

    Chuck or Keith what needs to happen with this?

     
  • Earnie Boyd
    Earnie Boyd
    2013-01-21

    • resolution: --> none
    • category: --> Waiting_User_Response
     
  • Earnie Boyd
    Earnie Boyd
    2013-01-21

    Ping to Chuck and Keith.

     
  • Earnie Boyd
    Earnie Boyd
    2013-01-21

    • labels: MinGW --> mgwport, gettext source
    • milestone: Waiting_User_Response --> OTHER
     
  • Earnie Boyd
    Earnie Boyd
    2013-02-11

    Ping again.

     
  • Earnie Boyd
    Earnie Boyd
    2013-02-11

    • type: --> Bug
    • category: Waiting_User_Response --> Unknown
    • patch_attached: --> False