bug-gettext
[Top][All Lists]
Advanced

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

Re: [bug-gettext] [Q] How do I remove compilation errors on MinGW?


From: Deep-Impact
Subject: Re: [bug-gettext] [Q] How do I remove compilation errors on MinGW?
Date: Wed, 27 Mar 2013 22:47:42 +0900

From: "Daiki Ueno" <address@hidden>
When compiling wctype-h.c, rpl_towlower/rpl_towupper are emitted through
gettext-tools/gnulib-lib/wctype.h, since they are defined as "extern
inline".

However, wctype.h is also included by libxml/parser.c, through
libiconv's iconv.h and wchar.h.  Which is causing multiple definition.

I'll try to find a better solution, but a workaround is to use win-iconv
(whose iconv.h does not include wchar.h) instead of libiconv:
https://code.google.com/p/win-iconv/

I used win-iconv to build gettext on MinGW, but I got similar (or the same?) errors below. As you said, win-iconv's iconv.h certainly does not include wchar.h. I attached wctype.h which was generated in this build.

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




-----------
libxml_rpl.la
libtool: link: warning: `d:/mingw/lib/libiconv.la' seems to be moved
libtool: link: g++ -shared -nostdlib d:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../dllcrt2.o d:/mingw/bin/../lib/gcc/mingw32/4.7.2/crtbegin.o .libs/set-mode-acl.o .libs/copy-acl.o .libs/file-has-acl.o .libs/allocator.o .libs/areadlink.o .libs/argmatch.o .libs/gl_array_list.o .libs/backupfile.o .libs/addext.o .libs/basename.o .libs/binary-io.o .libs/c-ctype.o .libs/c-strcasecmp.o .libs/c-strncasecmp.o .libs/c-strcasestr.o .libs/c-strstr.o .libs/careadlinkat.o .libs/classpath.o .libs/clean-temp.o .libs/cloexec.o .libs/closeout.o .libs/concat-filename.o .libs/copy-file.o .libs/csharpcomp.o .libs/csharpexec.o .libs/error-progname.o .libs/execute.o .libs/exitfail.o .libs/fatal-signal.o .libs/fd-hook.o .libs/fd-ostream.o .libs/fd-safer-flag.o .libs/dup-safer-flag.o .libs/file-ostream.o .libs/findprog.o .libs/fstrcmp.o .libs/full-write.o .libs/fwriteerror.o .libs/gcd.o ../woe32dll/.libs/gettextlib-exports.o .libs/hash.o .libs/html-ostream.o ../woe32dll/.libs/c++html-styled-ostream.o .libs/javacomp.o .libs/javaexec.o .libs/javaversion.o .libs/gl_linkedhash_list.o .libs/gl_list.o .libs/localcharset.o .libs/localename.o glthread/.libs/lock.o .libs/malloca.o .libs/mbchar.o .libs/mbiter.o .libs/mbslen.o .libs/mbsstr.o .libs/mbswidth.o .libs/mbuiter.o .libs/ostream.o .libs/pipe-filter-ii.o .libs/pipe-filter-aux.o .libs/pipe2.o .libs/pipe2-safer.o .libs/progname.o .libs/propername.o .libs/quotearg.o .libs/safe-read.o .libs/safe-write.o .libs/sh-quote.o .libs/sig-handler.o .libs/spawn-pipe.o .libs/striconv.o .libs/striconveh.o .libs/striconveha.o .libs/strnlen1.o .libs/styled-ostream.o .libs/tempname.o .libs/term-ostream.o ../woe32dll/.libs/c++term-styled-ostream.o glthread/.libs/threadlib.o glthread/.libs/tls.o .libs/tmpdir.o .libs/trim.o uniconv/.libs/u8-conv-from-enc.o unilbrk/.libs/lbrktables.o unilbrk/.libs/u8-possible-linebreaks.o unilbrk/.libs/u8-width-linebreaks.o unilbrk/.libs/ulc-common.o unilbrk/.libs/ulc-width-linebreaks.o uniname/.libs/uniname.o .libs/unistd.o .libs/dup-safer.o .libs/fd-safer.o .libs/pipe-safer.o unistr/.libs/u16-mbtouc.o unistr/.libs/u16-mbtouc-aux.o unistr/.libs/u8-check.o unistr/.libs/u8-mblen.o unistr/.libs/u8-mbtouc.o unistr/.libs/u8-mbtouc-aux.o unistr/.libs/u8-mbtouc-unsafe.o unistr/.libs/u8-mbtouc-unsafe-aux.o unistr/.libs/u8-mbtoucr.o unistr/.libs/u8-prev.o unistr/.libs/u8-uctomb.o unistr/.libs/u8-uctomb-aux.o uniwidth/.libs/width.o .libs/wait-process.o .libs/wctype-h.o .libs/xmalloc.o .libs/xstrdup.o .libs/xconcat-filename.o .libs/xerror.o .libs/gl_xlist.o .libs/xmalloca.o .libs/xreadlink.o .libs/xsetenv.o .libs/xsize.o .libs/xstriconv.o .libs/xstriconveh.o .libs/xvasprintf.o .libs/xasprintf.o .libs/asnprintf.o .libs/asprintf.o .libs/canonicalize-lgpl.o .libs/close.o .libs/dup2.o .libs/error.o .libs/fcntl.o .libs/fnmatch.o .libs/fopen.o .libs/fstat.o .libs/getdelim.o .libs/getdtablesize.o .libs/getline.o .libs/getopt.o .libs/getopt1.o .libs/malloc.o .libs/mbrtowc.o .libs/mbsinit.o .libs/mbsrtowcs.o .libs/mbsrtowcs-state.o .libs/mkdtemp.o .libs/obstack.o .libs/open.o .libs/printf-args.o .libs/printf-parse.o .libs/raise.o .libs/rawmemchr.o .libs/readlink.o .libs/realloc.o .libs/rmdir.o .libs/secure_getenv.o .libs/setenv.o .libs/setlocale.o .libs/sigaction.o .libs/sigprocmask.o .libs/snprintf.o .libs/spawn_faction_addclose.o .libs/spawn_faction_adddup2.o .libs/spawn_faction_addopen.o .libs/spawn_faction_destroy.o .libs/spawn_faction_init.o .libs/spawnattr_destroy.o .libs/spawnattr_init.o .libs/spawnattr_setflags.o .libs/spawnattr_setsigmask.o .libs/spawni.o .libs/spawnp.o .libs/stat.o .libs/stdio-write.o .libs/stpcpy.o .libs/stpncpy.o .libs/strchrnul.o .libs/strerror.o .libs/strerror-override.o .libs/strnlen.o .libs/strstr.o .libs/tparm.o .libs/tputs.o .libs/unsetenv.o .libs/vasnprintf.o .libs/vasprintf.o .libs/vsnprintf.o .libs/waitpid.o .libs/wcwidth.o .libs/write.o -Wl,--whole-archive ./.libs/libcroco_rpl.a ./.libs/libglib_rpl.a ./.libs/libxml_rpl.a -Wl,--no-whole-archive ../intl/.libs/libintl.dll.a -Ld:/mingw/lib -lpthread /mingw/lib/libiconv.dll.a -Ld:/mingw/bin/../lib/gcc/mingw32/4.7.2 -Ld:/mingw/bin/../lib/gcc -Ld:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/lib -Ld:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../.. -L/mingw/lib -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt d:/mingw/bin/../lib/gcc/mingw32/4.7.2/crtend.o -O2 -fopenmp -Wl,--export-all-symbols -Wl,--disable-auto-import -fopenmp -o .libs/libgettextlib-0-18-2.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgettextlib.dll.a
./.libs/libxml_rpl.a(libxml_rpl_la-parser.o): In function `rpl_towlower':
d:\packages\gettext-0.18.2.1\gettext-tools\gnulib-lib/./wctype.h:649: multiple definition of `rpl_towlower' .libs/wctype-h.o:d:\packages\gettext-0.18.2.1\gettext-tools\gnulib-lib/./wctype.h:649: first defined here
./.libs/libxml_rpl.a(libxml_rpl_la-parser.o): In function `rpl_towupper':
d:\packages\gettext-0.18.2.1\gettext-tools\gnulib-lib/./wctype.h:658: multiple definition of `rpl_towupper' .libs/wctype-h.o:d:\packages\gettext-0.18.2.1\gettext-tools\gnulib-lib/./wctype.h:658: first defined here
./.libs/libxml_rpl.a(libxml_rpl_la-threads.o): In function `rpl_towlower':
d:\packages\gettext-0.18.2.1\gettext-tools\gnulib-lib/./wctype.h:649: multiple definition of `rpl_towlower' .libs/wctype-h.o:d:\packages\gettext-0.18.2.1\gettext-tools\gnulib-lib/./wctype.h:649: first defined here
./.libs/libxml_rpl.a(libxml_rpl_la-threads.o): In function `rpl_towupper':
d:\packages\gettext-0.18.2.1\gettext-tools\gnulib-lib/./wctype.h:658: multiple definition of `rpl_towupper' .libs/wctype-h.o:d:\packages\gettext-0.18.2.1\gettext-tools\gnulib-lib/./wctype.h:658: first defined here
collect2.exe: error: ld returned 1 exit status
make[4]: *** [libgettextlib.la] Error 1
make[4]: Leaving directory `/d/packages/gettext-0.18.2.1/gettext-tools/gnulib-lib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/d/packages/gettext-0.18.2.1/gettext-tools/gnulib-lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/d/packages/gettext-0.18.2.1/gettext-tools'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/d/packages/gettext-0.18.2.1/gettext-tools'
make: *** [all-recursive] Error 1

Attachment: wctype.h
Description: Text document


reply via email to

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