bug-gettext
[Top][All Lists]
Advanced

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

[bug-gettext] Linker Errors on Windows (MSYS2/MinGW)


From: Jordan Irwin
Subject: [bug-gettext] Linker Errors on Windows (MSYS2/MinGW)
Date: Sat, 20 Jul 2019 14:24:04 -0700

I'm sorry, I don't think this is a bug to report, I am just trying to get help with compiling GNU Gettext on my Windows system & not sure of the proper location for support requests. So, if this is not it, would someone please direct me to a more appropriate place.

I am trying to build gettext/libintl static only on my Windows system & getting linker errors that appear to be related to libxml2 (undefined reference to "_imp__xmlFree"). I have a static libxml2 library (libxml2.a), no shared (dll) version currently installed:

$ find /mingw32/lib/ -type f -name "libxml2*"
/mingw32/lib/cmake/libxml2/libxml2-config.cmake
/mingw32/lib/girepository-1.0/libxml2-2.0.typelib
/mingw32/lib/libxml2.a


I am using the MSYS2/MinGW-w64 environment for building. This is the linker output:

./.libslibtool: link: i686-w64-mingw32-gcc -march=x86-64 -mtune=generic -O2 -pipe -pipe -Wl,--disable-auto-import -o xgettext.exe xgettext-xgettext.o xgettext-x-c.o xgettext-x-po.o xgettext-x-sh.o xgettext-x-python.o xgettext-x-lisp.o xgettext-x-elisp.o xgettext-x-librep.o xgettext-x-scheme.o xgettext-x-smalltalk.o xgettext-x-java.o xgettext-x-csharp.o xgettext-x-awk.o xgettext-x-ycp.o xgettext-x-tcl.o xgettext-x-perl.o xgettext-x-php.o xgettext-x-rst.o xgettext-x-lua.o xgettext-x-_javascript_.o xgettext-x-vala.o xgettext-x-desktop.o gettext.res  ./.libs/libgettextsrc.a -L/mingw32/lib /c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools/gnulib-lib/.libs/libgettextlib.a -lncurses /c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools/intl/.libs/libintl.a -liconv
/libgettextsrc.a(libgettextsrc_la-locating-rule.o):locating-rule.c:(.text+0x1d1): undefined reference to `_imp__xmlFree'
./.libs/libgettextsrc.a(libgettextsrc_la-its.o):its.c:(.text+0x25): undefined reference to `_imp__xmlFree'
./.libs/libgettextsrc.a/bin/sh ../libtool  --tag=CC   --mode=link i686-w64-mingw32-gcc  -march=x86-64 -mtune=generic -O2 -pipe `: /mingw32/bin` -pipe -Wl,--disable-auto-import -o msgattrib.exe msgattrib-msgattrib.o libgettextsrc.la  gettext.res (
libgettextsrc_la-its.o):its.c:(/bin/sh ../libtool  --tag=CC   --mode=link i686-w64-mingw32-gcc  -march=x86-64 -mtune=generic -O2 -pipe `: /mingw32/bin` -pipe -Wl,--disable-auto-import -o msgcat.exe msgcat-msgcat.o libgettextsrc.la  gettext.res
.text+0x2b4.)/:. libsundefined/bin/sh ../libtool  --tag=CC   --mode=link i686-w64-mingw32-gcc  -march=x86-64 -mtune=generic -O2 -pipe `: /mingw32/bin` -pipe -Wl,--disable-auto-import -o msgcomm.exe msgcomm-msgcomm.o libgettextsrc.la  gettext.res
/ libgettextsrc.areference( libgettextsrc_lato- locating`-_imp__xmlFreerule.o')
:.locating/-.rule.clibs:/(libgettextsrc.a.(textlibgettextsrc_la+-0x1d1its.o)):: its.cundefined: (reference. textto+ 0x1834`)_imp__xmlFree:'
undefined. /reference. libsto/ libgettextsrc.a`(_imp__xmlFreelibgettextsrc_la'-
its.o.)/:.its.clibs:/(libgettextsrc.a.(textlibgettextsrc_la+-0x25its.o)):: its.cundefined: (reference. textto+ 0x1981`)_imp__xmlFree:'
undefined. /reference. libsto/ libgettextsrc.a`(_imp__xmlFreelibgettextsrc_la'-
its.o.)/:.its.clibs:/(libgettextsrc.a.(textlibgettextsrc_la+-0x2b4its.o)):: its.cundefined: (reference. textto+ 0x25af`)_imp__xmlFree:'
more. /undefined. libsreferences/ libgettextsrc.ato( libgettextsrc_la`-_imp__xmlFreeits.o') :followits.c
:collect2.exe: error: ld returned 1 exit status
(.text+0x1834): undefined reference to `_imp__xmlFree'
./.libs/libgettextsrc.a(libgettextsrc_la-its.o)make[5]: *** [Makefile:2799: msgfmt.exe] Error 1
:make[5]: *** Waiting for unfinished jobs....
its.c:(.text+0x1981): undefined reference to `_imp__xmlFree'
./.libs/libgettextsrc.a(libgettextsrc_la-its.o):its.c:(.text+0x25af): more undefined references to `_imp__xmlFree' follow
collect2.exe: error: ld returned 1 exit status
make[5]: *** [Makefile:2841: xgettext.exe] Error 1
libtool: link: i686-w64-mingw32-gcc -march=x86-64 -mtune=generic -O2 -pipe -pipe -Wl,--disable-auto-import -o msgattrib.exe msgattrib-msgattrib.o gettext.res  ./.libs/libgettextsrc.a -L/mingw32/lib /c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools/gnulib-lib/.libs/libgettextlib.a -lncurses /c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools/intl/.libs/libintl.a -liconv
libtool: link: i686-w64-mingw32-gcc -march=x86-64 -mtune=generic -O2 -pipe -pipe -Wl,--disable-auto-import -o msgcat.exe msgcat-msgcat.o gettext.res  ./.libs/libgettextsrc.a -L/mingw32/lib /c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools/gnulib-lib/.libs/libgettextlib.a -lncurses /c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools/intl/.libs/libintl.a -liconv
libtool: link: i686-w64-mingw32-gcc -march=x86-64 -mtune=generic -O2 -pipe -pipe -Wl,--disable-auto-import -o msgcomm.exe msgcomm-msgcomm.o gettext.res  ./.libs/libgettextsrc.a -L/mingw32/lib /c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools/gnulib-lib/.libs/libgettextlib.a -lncurses /c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools/intl/.libs/libintl.a -liconv
make[5]: Leaving directory '/c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools/src'
make[4]: *** [Makefile:2580: all] Error 2
make[4]: Leaving directory '/c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools/src'
make[3]: *** [Makefile:2027: all-recursive] Error 1
make[3]: Leaving directory '/c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools'
make[2]: *** [Makefile:1893: all] Error 2
make[2]: Leaving directory '/c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32/gettext-tools'
make[1]: *** [Makefile:413: all-recursive] Error 1
make[1]: Leaving directory '/c/users/antum/Development/MSYS2/mingw-packages/mingw-w64-gettext/src/build-i686-w64-mingw32'
make: *** [Makefile:369: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...


"_imp__xmlFree" does not appear to be defined in my libxml2.a static library:

$ grep -r "_imp__xmlFree" /mingw32/lib/
Binary file /mingw32/lib/gettext/cldr-plurals.exe matches
Binary file /mingw32/lib/libbluray.a matches
Binary file /mingw32/lib/libcroco-0.6.a matches
Binary file /mingw32/lib/libexslt.a matches
Binary file /mingw32/lib/libgeoclue.a matches
Binary file /mingw32/lib/libgettextlib.dll.a matches
Binary file /mingw32/lib/librsvg-2.a matches
Binary file /mingw32/lib/libsoup-2.4.a matches
Binary file /mingw32/lib/libxslt.a matches
Binary file /mingw32/lib/python2.7/site-packages/libxsltmod.pyd matches


Here is a link to the build configuration file & patches that MSYS2/MinGW-w64 uses: https://github.com/msys2/MINGW-packages/tree/3b822023d5f8c266cad26d699d824026fd0ef02b/mingw-w64-gettext

Not sure if the error could be related to the configuration or patches (Note: MSYS2 uses a port of Arch Linux's build system). The configuration line can be read here (note that I have added "--enable-shared=no" in my personal build config).

Any help is much appreciated.

Thank you,
- Jordan

http://antumdeluge.wordpress.com/


reply via email to

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