----- Original Message ----- From: "Daiki Ueno" <[email protected]>
To: "Deep-Impact" <[email protected]>
Cc: <[email protected]>; "Josue Andrade Gomes" <[email protected]>
Sent: Thursday, March 28, 2013 10:55 AM
Subject: Re: [bug-gettext] [Q] How do I remove compilation errors on MinGW?


"Deep-Impact" <[email protected]> writes:

I used win-iconv to build gettext on MinGW, but I got similar (or the
same?) errors below.

Right, sorry for the confusion.

What is wrong?  GNU libiconv?  gettext?  Or GCC 4.7.2?  Can this
problem be aovided by GCC 4.6.x?

After some more debugging, it turned out that the root cause is
towlower/towupper declarations in mingw's <ctype.h>.

I've posted a patch to bug-gnulib to work around this:
<http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00095.html>

Or perhaps you could use mingw-w64 instead of mingw:
<http://mingw-w64.sourceforge.net>

Regards,
--
Daiki Ueno
"Deep-Impact" <[email protected]> writes:

I used win-iconv to build gettext on MinGW, but I got similar (or the
same?) errors below.

Right, sorry for the confusion.

What is wrong?  GNU libiconv?  gettext?  Or GCC 4.7.2?  Can this
problem be aovided by GCC 4.6.x?

After some more debugging, it turned out that the root cause is
towlower/towupper declarations in mingw's <ctype.h>.

I've posted a patch to bug-gnulib to work around this:
<http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00095.html>

Or perhaps you could use mingw-w64 instead of mingw:
<http://mingw-w64.sourceforge.net>

The build failed even with MinGW-w64. Does this mean that gettext cannot be built on Windows now?

I performed the following steps:

1. On Windows Vista, invoke command prompt.

2. SET PATH=D:\MinGW32\bin;%PATH%
The MinGW-w32 is installed in D:\MinGW32.

3. Start MSYS on the same command prompt.
cd D:\MSYS
MSYS.bat

4. On the MSYS (bash) command line, build gettext as follows:
cd /d/packages/gettext-0.18.2.1
./configure --prefix=/d/build/gettext --host=i686-w64-mingw32 --build=i686-w64-mingw32 \
   --with-libiconv-prefix=/d/build/libiconv \
CPPFLAGS="-I/d/build/libiconv/include" LDFLAGS="-L/d/build/libiconv/lib" \
   LIBS="-liconv"
make

I got the below error, which is different from before.


...
libtool: compile: i686-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I../intl -DUSER_LABEL_PREFIX_UNDERSCORE -DGNULIB_DEFINED_ERROR -I./libcroco -I/d/build/libiconv/include -g -O2 -c sigaction.c -o sigaction.o >/dev/null 2>&1 /bin/sh ../libtool --tag=CC --mode=compile i686-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I../intl -DUSER_LABEL_PREFIX_UNDERSCORE -DGNULIB_DEFINED_ERROR -I./libcroco -I/d/build/libiconv/include -g -O2 -c -o sigprocmask.lo sigprocmask.c libtool: compile: i686-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I../intl -DUSER_LABEL_PREFIX_UNDERSCORE -DGNULIB_DEFINED_ERROR -I./libcroco -I/d/build/libiconv/include -g -O2 -c sigprocmask.c -DDLL_EXPORT -DPIC -o .libs/sigprocmask.o libtool: compile: i686-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I../intl -DUSER_LABEL_PREFIX_UNDERSCORE -DGNULIB_DEFINED_ERROR -I./libcroco -I/d/build/libiconv/include -g -O2 -c sigprocmask.c -o sigprocmask.o >/dev/null 2>&1 /bin/sh ../libtool --tag=CC --mode=compile i686-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I../intl -DUSER_LABEL_PREFIX_UNDERSCORE -DGNULIB_DEFINED_ERROR -I./libcroco -I/d/build/libiconv/include -g -O2 -c -o snprintf.lo snprintf.c libtool: compile: i686-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I../intl -DUSER_LABEL_PREFIX_UNDERSCORE -DGNULIB_DEFINED_ERROR -I./libcroco -I/d/build/libiconv/include -g -O2 -c snprintf.c -DDLL_EXPORT -DPIC -o .libs/snprintf.o
snprintf.c:37:1: error: redefinition of 'snprintf'
In file included from ./stdio.h:43:0,
                from snprintf.c:21:
d:\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/stdio.h:555:5: note: previous definition of 'snprintf' was here
Makefile:2546: recipe for target `snprintf.lo' failed
make[4]: *** [snprintf.lo] Error 1
make[4]: Leaving directory `/d/packages/gettext-0.18.2.1/gettext-tools/gnulib-lib'
Makefile:2216: recipe for target `all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory `/d/packages/gettext-0.18.2.1/gettext-tools/gnulib-lib'
Makefile:1663: recipe for target `all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/d/packages/gettext-0.18.2.1/gettext-tools'
Makefile:1528: recipe for target `all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory `/d/packages/gettext-0.18.2.1/gettext-tools'
Makefile:315: recipe for target `all-recursive' failed
make: *** [all-recursive] Error 1


Regards


Reply via email to