issue with gettext 0.18

2010-06-05
2013-06-06
  • drangon zhou
    drangon zhou
    2010-06-05

    I try to build gettext 0.18. Compiling with i686-w64-mingw32 is ok, but compiling with x86_64-w64-mingw32 is failed.

    the failed message is :

    /bin/sh ../libtool  -tag=CXX   -mode=link x86_64-w64-mingw32-g++  -g -O2  -release 0.18 ../intl/libintl.la -L/compile/mingw-w64-dgn/lib_bin/libiconv/lib -l
    iconv -R/compile/mingw-w64-dgn/lib_bin/libiconv/lib  -L/compile/mingw-w64-dgn/lib_bin/libiconv/lib -liconv -R/compile/mingw-w64-dgn/lib_bin/libiconv/lib  -lc
    -no-undefined -Wl,-export-all-symbols    -L/compile/mingw-w64-dgn/lib_bin/libiconv/lib -liconv -R/compile/mingw-w64-dgn/lib_bin/libiconv/lib -L/compile/min
    gw-w64-dgn/lib_bin/libiconv/lib -liconv -R/compile/mingw-w64-dgn/lib_bin/libiconv/lib  -L/compile/mingw-w64-dgn/lib_bin/libiconv/lib -Wl,-disable-auto-impor
    t -o libgettextlib.la -rpath /compile/mingw-w64-dgn/lib_bin/gettext/lib set-mode-acl.lo copy-acl.lo file-has-acl.lo areadlink.lo gl_array_list.lo backupfile.
    lo addext.lo basename.lo c-ctype.lo c-strcasecmp.lo c-strncasecmp.lo c-strcasestr.lo c-strstr.lo classpath.lo clean-temp.lo closeout.lo concat-filename.lo co
    py-file.lo csharpcomp.lo csharpexec.lo error-progname.lo execute.lo exitfail.lo fatal-signal.lo fd-ostream.lo fd-safer-flag.lo dup-safer-flag.lo file-ostream
    .lo findprog.lo fstrcmp.lo full-write.lo fwriteerror.lo gcd.lo ../woe32dll/gettextlib-exports.lo hash.lo html-ostream.lo  ../woe32dll/c++html-styled-ostream.
    lo javacomp.lo javaexec.lo javaversion.lo gl_linkedhash_list.lo gl_list.lo localcharset.lo localename.lo glthread/lock.lo malloca.lo mbchar.lo mbslen.lo mbss
    tr.lo mbswidth.lo ostream.lo pipe.lo pipe-filter-ii.lo pipe2.lo pipe2-safer.lo progname.lo propername.lo quote.lo quotearg.lo sh-quote.lo striconv.lo stricon
    veh.lo striconveha.lo strnlen1.lo styled-ostream.lo term-ostream.lo  ../woe32dll/c++term-styled-ostream.lo glthread/threadlib.lo glthread/tls.lo tmpdir.lo tr
    im.lo uniconv/u8-conv-from-enc.lo unilbrk/lbrktables.lo unilbrk/u8-possible-linebreaks.lo unilbrk/u8-width-linebreaks.lo unilbrk/ulc-common.lo unilbrk/ulc-wi
    dth-linebreaks.lo uniname/uniname.lo unistr/u16-mbtouc.lo unistr/u16-mbtouc-aux.lo unistr/u8-check.lo unistr/u8-mblen.lo unistr/u8-mbtouc.lo unistr/u8-mbtouc
    -aux.lo unistr/u8-mbtouc-unsafe.lo unistr/u8-mbtouc-unsafe-aux.lo unistr/u8-mbtoucr.lo unistr/u8-prev.lo unistr/u8-uctomb.lo unistr/u8-uctomb-aux.lo uniwidth
    /width.lo wait-process.lo xmalloc.lo xstrdup.lo xconcat-filename.lo xerror.lo gl_xlist.lo xmalloca.lo xreadlink.lo xsetenv.lo xstriconv.lo xstriconveh.lo xva
    sprintf.lo xasprintf.lo argmatch.lo asnprintf.lo asprintf.lo canonicalize-lgpl.lo cloexec.lo dup-safer.lo dup2.lo error.lo fcntl.lo fd-safer.lo fnmatch.lo fo
    pen.lo getdelim.lo getdtablesize.lo getline.lo getopt.lo getopt1.lo gettimeofday.lo lstat.lo malloc.lo mkdtemp.lo obstack.lo open.lo pipe-safer.lo printf-arg
    s.lo printf-parse.lo progreloc.lo rawmemchr.lo readlink.lo realloc.lo relocatable.lo rmdir.lo safe-read.lo safe-write.lo setenv.lo sigaction.lo sigprocmask.l
    o spawn_faction_addclose.lo spawn_faction_adddup2.lo spawn_faction_addopen.lo spawn_faction_destroy.lo spawn_faction_init.lo spawnattr_destroy.lo spawnattr_i
    nit.lo spawnattr_setflags.lo spawnattr_setsigmask.lo spawni.lo spawnp.lo stat.lo stdio-write.lo stpcpy.lo stpncpy.lo strchrnul.lo strerror.lo strnlen.lo strs
    tr.lo tempname.lo tparm.lo tputs.lo unsetenv.lo vasnprintf.lo vasprintf.lo wcwidth.lo write.lo libcroco_rpl.la libglib_rpl.la libxml_rpl.la
    libtool: link: rm -fr  .libs/libgettextlib.dll.a
    libtool: link: x86_64-w64-mingw32-g++ -shared -nostdlib /compile/mingw-w64-dgn/cross/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/lib/dllc
    rt2.o /compile/mingw-w64-dgn/cross/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/lib/crtbegin.o  .libs/set-mode-acl.o .libs/copy-acl.o .lib
    s/file-has-acl.o .libs/areadlink.o .libs/gl_array_list.o .libs/backupfile.o .libs/addext.o .libs/basename.o .libs/c-ctype.o .libs/c-strcasecmp.o .libs/c-strn
    casecmp.o .libs/c-strcasestr.o .libs/c-strstr.o .libs/classpath.o .libs/clean-temp.o .libs/closeout.o .libs/concat-filename.o .libs/copy-file.o .libs/csharpc
    omp.o .libs/csharpexec.o .libs/error-progname.o .libs/execute.o .libs/exitfail.o .libs/fatal-signal.o .libs/fd-ostream.o .libs/fd-safer-flag.o .libs/dup-safe
    r-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 .lib
    s/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 .li
    bs/gl_list.o .libs/localcharset.o .libs/localename.o glthread/.libs/lock.o .libs/malloca.o .libs/mbchar.o .libs/mbslen.o .libs/mbsstr.o .libs/mbswidth.o .lib
    s/ostream.o .libs/pipe.o .libs/pipe-filter-ii.o .libs/pipe2.o .libs/pipe2-safer.o .libs/progname.o .libs/propername.o .libs/quote.o .libs/quotearg.o .libs/sh
    -quote.o .libs/striconv.o .libs/striconveh.o .libs/striconveha.o .libs/strnlen1.o .libs/styled-ostream.o .libs/term-ostream.o ../woe32dll/.libs/c++term-style
    d-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 uni
    str/.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 un
    istr/.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-u
    ctomb-aux.o uniwidth/.libs/width.o .libs/wait-process.o .libs/xmalloc.o .libs/xstrdup.o .libs/xconcat-filename.o .libs/xerror.o .libs/gl_xlist.o .libs/xmallo
    ca.o .libs/xreadlink.o .libs/xsetenv.o .libs/xstriconv.o .libs/xstriconveh.o .libs/xvasprintf.o .libs/xasprintf.o .libs/argmatch.o .libs/asnprintf.o .libs/as
    printf.o .libs/canonicalize-lgpl.o .libs/cloexec.o .libs/dup-safer.o .libs/dup2.o .libs/error.o .libs/fcntl.o .libs/fd-safer.o .libs/fnmatch.o .libs/fopen.o
    .libs/getdelim.o .libs/getdtablesize.o .libs/getline.o .libs/getopt.o .libs/getopt1.o .libs/gettimeofday.o .libs/lstat.o .libs/malloc.o .libs/mkdtemp.o .libs
    /obstack.o .libs/open.o .libs/pipe-safer.o .libs/printf-args.o .libs/printf-parse.o .libs/progreloc.o .libs/rawmemchr.o .libs/readlink.o .libs/realloc.o .lib
    s/relocatable.o .libs/rmdir.o .libs/safe-read.o .libs/safe-write.o .libs/setenv.o .libs/sigaction.o .libs/sigprocmask.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 .lib
    s/strchrnul.o .libs/strerror.o .libs/strnlen.o .libs/strstr.o .libs/tempname.o .libs/tparm.o .libs/tputs.o .libs/unsetenv.o .libs/vasnprintf.o .libs/vasprint
    f.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/.lib
    s/libintl.dll.a -L/compile/mingw-w64-dgn/lib_bin/libiconv/lib /compile/mingw-w64-dgn/lib_bin/libiconv/lib/libiconv.dll.a -L/compile/mingw-w64-dgn/cross/lib/g
    cc/x86_64-w64-mingw32/4.5.1 -L/compile/mingw-w64-dgn/cross/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/lib/../lib64 -L/compile/mingw-w64-
    dgn/cross/mingw/lib/../lib64 -L/compile/mingw-w64-dgn/cross/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/lib -L/compile/mingw-w64-dgn/cros
    s/mingw/lib /compile/mingw-w64-dgn/cross/x86_64-w64-mingw32/lib/../lib64/libstdc++.dll.a -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lker
    nel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt /compile/mingw-w64-dgn/cross/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x8
    6_64-w64-mingw32/lib/crtend.o  -Wl,-export-all-symbols -Wl,-disable-auto-import   -o .libs/libgettextlib-0-18.dll -Wl,-enable-auto-image-base -Xlinker -o
    ut-implib -Xlinker .libs/libgettextlib.dll.a
    Creating library file: .libs/libgettextlib.dll.a
    .libs/backupfile.o: In function `get_version':
    /compile/mingw-w64-dgn/lib_source/gettext-0.18/gettext-tools/gnulib-lib/backupfile.c:218: undefined reference to `__imp_argmatch_die'
    .libs/clean-temp.o: In function `gl_list_nx_create_empty_inline':
    /compile/mingw-w64-dgn/lib_source/gettext-0.18/gettext-tools/gnulib-lib/gl_list.h:556: undefined reference to `__imp_gl_linkedhash_list_implementation'
    .libs/clean-temp.o: In function `create_temp_dir':
    /compile/mingw-w64-dgn/lib_source/gettext-0.18/gettext-tools/gnulib-lib/clean-temp.c:323: undefined reference to `__imp_gl_linkedhash_list_implementation'
    .libs/error-progname.o: In function `maybe_print_progname':
    /compile/mingw-w64-dgn/lib_source/gettext-0.18/gettext-tools/gnulib-lib/error-progname.c:39: undefined reference to `__imp_program_name'
    .libs/html-ostream.o: In function `gl_list_nx_create_empty_inline':
    /compile/mingw-w64-dgn/lib_source/gettext-0.18/gettext-tools/gnulib-lib/gl_list.h:556: undefined reference to `__imp_gl_array_list_implementation'
    ../woe32dll/.libs/c++html-styled-ostream.o: In function `__static_initialization_and_destruction_0':
    /compile/mingw-w64-dgn/lib_build/bd_gettext/gettext-tools/gnulib-lib/html-styled-ostream.c:55: undefined reference to `__imp_styled_ostream_typeinfo'
    ../woe32dll/.libs/c++term-styled-ostream.o: In function `__static_initialization_and_destruction_0':
    /compile/mingw-w64-dgn/lib_build/bd_gettext/gettext-tools/gnulib-lib/term-styled-ostream.c:74: undefined reference to `__imp_styled_ostream_typeinfo'
    .libs/xerror.o: In function `multiline_warning':
    /compile/mingw-w64-dgn/lib_source/gettext-0.18/gettext-tools/gnulib-lib/xerror.c:51: undefined reference to `__imp_error_with_progname'
    /compile/mingw-w64-dgn/lib_source/gettext-0.18/gettext-tools/gnulib-lib/xerror.c:53: undefined reference to `__imp_program_name'
    .libs/xerror.o: In function `multiline_error':
    /compile/mingw-w64-dgn/lib_source/gettext-0.18/gettext-tools/gnulib-lib/xerror.c:94: undefined reference to `__imp_error_message_count'
    .libs/argmatch.o: In function `__argmatch_die':
    /compile/mingw-w64-dgn/lib_source/gettext-0.18/gettext-tools/gnulib-lib/argmatch.c:63: undefined reference to `__imp_exit_failure'
    .libs/obstack.o: In function `print_and_abort':
    /compile/mingw-w64-dgn/lib_source/gettext-0.18/gettext-tools/gnulib-lib/obstack.c:427: undefined reference to `__imp_exit_failure'
    collect2: ld returned 1 exit status

    the symbol in "backupfile.o" and "argmatch.o" built by x86_64 env is :

    $ /compile/mingw-w64-dgn/cross/bin/x86_64-w64-mingw32-nm backupfile.o
    0000000000000000 b .bss
    0000000000000000 d .data
    0000000000000000 N .debug_abbrev
    0000000000000000 N .debug_aranges
    0000000000000000 N .debug_frame
    0000000000000000 N .debug_info
    0000000000000000 N .debug_line
    0000000000000000 N .debug_loc
    0000000000000000 N .debug_pubnames
    0000000000000000 N .debug_pubtypes
    0000000000000000 N .debug_ranges
    0000000000000000 N .debug_str
    0000000000000000 r .rdata
    0000000000000000 t .text
                     U __imp_argmatch_die
                     U __xargmatch_internal
                     U addext
    0000000000000020 d backup_args
    0000000000000040 r backup_types
                     U closedir
    0000000000000000 T find_backup_file_name
    0000000000000270 T get_version
                     U getenv
                     U gnu_basename
                     U opendir
                     U readdir
                     U rpl_malloc
    0000000000000000 D simple_backup_suffix
                     U sprintf
                     U strcpy
                     U strlen
                     U strncmp
    00000000000002c0 T xget_version

    $ /compile/mingw-w64-dgn/cross/bin/x86_64-w64-mingw32-nm argmatch.o | more           
    0000000000000000 b .bss
    0000000000000000 d .data
    0000000000000000 N .debug_abbrev
    0000000000000000 N .debug_aranges
    0000000000000000 N .debug_frame
    0000000000000000 N .debug_info
    0000000000000000 N .debug_line
    0000000000000000 N .debug_loc
    0000000000000000 N .debug_pubnames
    0000000000000000 N .debug_pubtypes
    0000000000000000 N .debug_str
    0000000000000000 r .rdata
    0000000000000000 t .text
    0000000000000000 t __argmatch_die
                     U __imp___iob_func
                     U __imp_exit_failure
    00000000000002c0 T __xargmatch_internal
    0000000000000020 T argmatch
    0000000000000000 D argmatch_die
    0000000000000140 T argmatch_invalid
    0000000000000350 T argmatch_to_argument
    00000000000001d0 T argmatch_valid
                     U error
                     U exit
                     U libintl_gettext
                     U quote_n
                     U quotearg_n_style
                     U rpl_fprintf
                     U rpl_fputc
                     U strlen
                     U strncmp

    the symbol in "backupfile.o" and "argmatch.o" built by i686 env is :

    $ /compile/mingw-w64-dgn/cross_32/bin/i686-w64-mingw32-nm backupfile.o
    00000000 b .bss
    00000000 d .data
    00000000 N .debug_abbrev
    00000000 N .debug_aranges
    00000000 N .debug_frame
    00000000 N .debug_info
    00000000 N .debug_line
    00000000 N .debug_loc
    00000000 N .debug_pubnames
    00000000 N .debug_pubtypes
    00000000 N .debug_ranges
    00000000 N .debug_str
    00000000 r .rdata
    00000000 t .text
             U ___xargmatch_internal
             U __imp__argmatch_die
             U _addext
    000000a0 r _backup_args
    00000040 r _backup_types
             U _closedir
    00000000 T _find_backup_file_name
    000001f0 T _get_version
             U _getenv
             U _gnu_basename
             U _opendir
             U _readdir
             U _rpl_malloc
    00000000 D _simple_backup_suffix
             U _sprintf
             U _strcpy
             U _strlen
             U _strncmp
    00000250 T _xget_version

    $ /compile/mingw-w64-dgn/cross_32/bin/i686-w64-mingw32-nm argmatch.o
    00000000 b .bss
    00000000 d .data
    00000000 N .debug_abbrev
    00000000 N .debug_aranges
    00000000 N .debug_frame
    00000000 N .debug_info
    00000000 N .debug_line
    00000000 N .debug_loc
    00000000 N .debug_pubnames
    00000000 N .debug_pubtypes
    00000000 N .debug_str
    00000000 r .rdata
    00000000 t .text
    00000000 t ___argmatch_die
    00000280 T ___xargmatch_internal
             U __imp___iob
             U __imp__exit_failure
    00000020 T _argmatch
    00000000 D _argmatch_die
    00000110 T _argmatch_invalid
    000002f0 T _argmatch_to_argument
    000001a0 T _argmatch_valid
             U _error
             U _exit
             U _libintl_gettext
             U _quote_n
             U _quotearg_n_style
             U _rpl_fprintf
             U _rpl_fputc
             U _strlen
             U _strncmp

    why the 32bit version works but 64bit version failed ?

     
  • Heyji Too
    Heyji Too
    2011-06-22

    Hi,

    I have a similar problem. Trying the patches above did not solve the problem. Any hint ?

    make: Entering directory `/home/aceg7283/toolchain_gcc_4.6/gettext-0.18/gettext-tools/src'
    /bin/sh ../libtool  -tag=CC   -mode=link gcc -std=gnu99  -g -O2 `: /mingw64/x86_64-w64-mingw32/bin` -Wl,-disable
    -auto-import -o msgcmp.exe msgcmp-msgcmp.o msgcmp-msgl-fsearch.o libgettextsrc.la   gettext.res
    libtool: link: warning: library `c:/s2e/s2e-toolchain/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../l
    ib/libstdc++.la' was moved.
    libtool: link: warning: library `c:/s2e/s2e-toolchain/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../l
    ib/libstdc++.la' was moved.
    libtool: link: gcc -std=gnu99 -g -O2 -Wl,-disable-auto-import -o .libs/msgcmp.exe msgcmp-msgcmp.o msgcmp-msgl-fsea
    rch.o gettext.res  ./.libs/libgettextsrc.a -L/mingw64/x86_64-w64-mingw32/lib /home/aceg7283/toolchain_gcc_4.6/gette
    xt-0.18/gettext-tools/gnulib-lib/.libs/libgettextlib.a -lcurses /home/aceg7283/toolchain_gcc_4.6/gettext-0.18/gette
    xt-tools/intl/.libs/libintl.dll.a /mingw64/x86_64-w64-mingw32/lib/libiconv.dll.a c:/s2e/s2e-toolchain/mingw64/bin/.
    ./lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../lib/libstdc++.dll.a -L/mingw64/x86_64-w64-mingw32/lib -Lc:/s2e/s2e-t
    oolchain/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../lib
    msgcmp-msgcmp.o: In function `usage':
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/msgcmp.c:209: undefined referen
    ce to `__imp_program_name'
    msgcmp-msgcmp.o: In function `match_domain':
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/msgcmp.c:371: undefined referen
    ce to `__imp_error_message_count'
    msgcmp-msgcmp.o: In function `compare':
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/msgcmp.c:478: undefined referen
    ce to `__imp_po_charset_ascii'
    msgcmp-msgcmp.o: In function `main':
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/msgcmp.c:101: undefined referen
    ce to `__imp_error_print_progname'
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/msgcmp.c:102: undefined referen
    ce to `__imp_gram_max_allowed_errors'
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/msgcmp.c:97: undefined referenc
    e to `__imp_input_format_po'
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/msgcmp.c:151: undefined referen
    ce to `__imp_input_format_stringtable'
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/msgcmp.c:143: undefined referen
    ce to `__imp_input_format_properties'
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/msgcmp.c:170: undefined referen
    ce to `__imp_program_name'
    ./.libs/libgettextsrc.a(libgettextsrc_la-po-lex.o): In function `po_gram_error':
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/po-lex.c:89: undefined referenc
    e to `__imp_error_message_count'
    ./.libs/libgettextsrc.a(libgettextsrc_la-po-lex.o): In function `po_gram_error_at_line':
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/po-lex.c:108: undefined referen
    ce to `__imp_error_message_count'
    ./.libs/libgettextsrc.a(libgettextsrc_la-msgl-iconv.o): In function `iconv_message_list_internal':
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/msgl-iconv.c:305: undefined ref
    erence to `__imp_program_name'
    ./.libs/libgettextsrc.a(libgettextsrc_la-po-charset.o): In function `po_lex_charset_set':
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/po-charset.c:556: undefined ref
    erence to `__imp_program_name'
    ./.libs/libgettextsrc.a(libgettextsrc_la-po-xerror.o): In function `xerror':
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/po-xerror.c:49: undefined refer
    ence to `__imp_error_with_progname'
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/po-xerror.c:88: undefined refer
    ence to `__imp_error_with_progname'
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/po-xerror.c:107: undefined refe
    rence to `__imp_error_message_count'
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/po-xerror.c:70: undefined refer
    ence to `__imp_program_name'
    ./.libs/libgettextsrc.a(libgettextsrc_la-po-xerror.o): In function `textmode_xerror2':
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/po-xerror.c:182: undefined refe
    rence to `__imp_error_message_count'
    ./.libs/libgettextsrc.a(libgettextsrc_la-read-catalog-abstract.o): In function `catalog_reader_parse':
    C:\s2e\s2e-toolchain\home\aceg7283\toolchain_gcc_4.6\gettext-0.18\gettext-tools\src/read-catalog-abstract.c:178: un
    defined reference to `__imp_error_message_count'
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: Leaving directory `/home/aceg7283/toolchain_gcc_4.6/gettext-0.18/gettext-tools/src'
    make: ***  Error 2
    make: Leaving directory `/home/aceg7283/toolchain_gcc_4.6/gettext-0.18/gettext-tools/src'
    make: ***  Error 1
    make: Leaving directory `/home/aceg7283/toolchain_gcc_4.6/gettext-0.18/gettext-tools'
    make: ***  Error 1
    make: Leaving directory `/home/aceg7283/toolchain_gcc_4.6/gettext-0.18'

     
  • drangon zhou
    drangon zhou
    2011-07-31

    I have successfully built gettext-0.18.1.1 under mingw64, see http://code.google.com/p/mingw-w64-dgn/ for detail,

    the patch is :

    -- gettext-tools/woe32dll/export.h.origin 2011-07-31 08:41:27.000000000 +0800
    +++ gettext-tools/woe32dll/export.h 2011-07-31 08:50:46.000000000 +0800
    @@ -90,7 +90,11 @@
        -export-all-symbols is used.  */

      /* IMP(x) is a symbol that contains the address of x.  */
    +#ifdef _WIN64
    +#define IMP(x) __imp_##x
    +#else
    #define IMP(x) _imp__##x
    +#endif

      /* Ensure that the variable x is exported from the library, and that a
         pseudo-variable IMP(x) is available.  */