bugGNU gettext - Bugs: bug #48405, Can't compile gettext 0.19.8.1 for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #48405: Can't compile gettext 0.19.8.1 for Windows

Submitter:  Michele Locati <mlocati>
Submitted:  Tue 05 Jul 2016 09:11:00 AM UTC
   
 
Category:  Build Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  ueno
Open/Closed:  Closed

Jump to the original submission

Thu 09 May 2019 07:23:42 PM UTC, comment #9: 

The fix is contained in the gettext-0.20 release.

Bruno Haible <haible>
Group administrator
Fri 05 Oct 2018 01:14:17 AM UTC, comment #8: 

To get rid of the link error, you also need the attached LIBXML_STATIC.diff (which will be committed into git soon).

(file #45143)

Bruno Haible <haible>
Group administrator
Thu 04 Oct 2018 05:10:14 PM UTC, comment #7: 

On mingw, I don't observe the '__imp_xmlFree' link error. Probably it was fixed by the xmlexports.in.h part of this commit:
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=a2e0a31298a4c29f770965e15593f5fef89dcde9#patch74

I saw the link error regarding '__imp_xmlFree' on Cygwin, however, but fixed it through this commit:
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=98f9fe5ef3cdf711f49f28978ea8aaacd0dfdebd


Bruno Haible <haible>
Group administrator
Tue 12 Jul 2016 08:44:21 AM UTC, comment #6: 

Thanks to you, Daiki! A community project is as strong as its community is... together we stand divided we fall ;)

The only remaining problem is building the static versions (both 32 and 64 bits): I have to manually add -DLIBXML_STATIC to the configure CPPFLAGS in order to avoid undefined references like "__imp_xmlFree".
This leads to some "LIBXML_STATIC already defined" warnings, but the project gets compiled and everything seems to work fine.

Michele Locati <mlocati>
Tue 12 Jul 2016 03:22:12 AM UTC, comment #5: 

Thanks for tracking it down.  I have updated the gnulib submodule to the latest so the next release will hopefully fix the issue:
http://git.savannah.gnu.org/cgit/gettext.git/commit/?id=a6f88433b397cbcbd226457fcf9791790291e63e

Daiki Ueno <ueno>
Group administrator
Mon 11 Jul 2016 09:44:39 AM UTC, comment #4: 

I finally found the problem: it was a gnulib problem.

They fixed this error in http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=68b6adebef05670a312fb92b05e7bd089d2ed43a

And here's the patch for the current gettext 0.19.8.1: https://github.com/mlocati/gettext-iconv-windows/commit/027da4c58d26786d87a14570df3ca228496f512e

Now the compilation for 32-bit shared works ;)

Michele Locati <mlocati>
Sun 10 Jul 2016 10:57:13 AM UTC, comment #3: 

Re-posting the difference because of the markup rendering on savannah bug page:

32-bit shared

GLOBAL_SYMBOL_PIPE = sed -n -e 's/^.*[         ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][         ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | sed '/ __gnu_lto/d'



64-bit shared

GLOBAL_SYMBOL_PIPE = sed -n -e 's/^.*[         ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][         ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d'


Michele Locati <mlocati>
Sun 10 Jul 2016 10:46:35 AM UTC, comment #2: 

I absolutely don't know neither if it's related nor if it's relevant, but when running configure on the (failing) shared 32 bits the value of GLOBAL_SYMBOL_PIPE (in Makefiles) is different when running configure on the (successful) shared 64 bits:

shared 32 bit:
GLOBAL_SYMBOL_PIPE = sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | sed '/ __gnu_lto/d'

shared 64 bit:
GLOBAL_SYMBOL_PIPE = sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d'

(please note the lack of an "_" in the first one).

The same difference is present in the config.cache files for lt_cv_sys_global_symbol_pipe

Is this helpful?


PS: I removed the branch mxe branch in https://github.com/mlocati/gettext-iconv-windows : everything's now in the master branch

Michele Locati <mlocati>
Wed 06 Jul 2016 01:29:42 PM UTC, comment #1: 

I added -DLIBXML_STATIC to the CPPFLAGS argument of configure when building static.

I have a few "LIBXML_STATIC already defined" warnings, but now the compilation for static works, for both 32 and 64 bit - no more "undefined reference to __imp_xmlFree" errors.

Maybe there's some point where LIBXML_STATIC isn't defined when we specify "--disable-shared --enable-static" in configure?

PS: the problem with the 32-bit shared persists, and I really don't know how to fix it...

Michele Locati <mlocati>
Tue 05 Jul 2016 09:11:00 AM UTC, original submission:  

Hi all,

I'm trying to compile gettext 0.19.8.1 (and iconv 0.14) for Windows.

I'm on a clean Ubuntu Server 16.04 and I'm using mxe ( http://mxe.cc/ ), but I also tried mingw32 / mingw-w64 on Ubuntu 14.04 with the same problems.

I'm only able to build for 64-bit shared.

Here's the errors I met when compiling gettext (iconv gets always compiled correctly):
- for 64-bit static: undefined reference to `__imp_xmlFree'
- for 32-bit static: undefined reference to `_imp__xmlFree'
- for 32-bit shared: undefined reference to `_imp__exit_failure' / `_imp__argmatch_die', ...

For the full build logs see the attached files. You can find the script I'm using here: https://github.com/mlocati/gettext-iconv-windows/blob/mxe/compile-iconv-gettext-windows.sh

Any hint would be really appreciated...

Thanks!

Michele

Michele Locati <mlocati>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #45143:  LIBXML_STATIC.diff added by haible (1KiB - text/x-patch)
file #37712:  shared32.zip added by mlocati (62KiB - application/octet-stream)
file #37713:  shared64.zip added by mlocati (117KiB - application/octet-stream)
file #37714:  static32.zip added by mlocati (65KiB - application/octet-stream)
file #37715:  static64.zip added by mlocati (71KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by ueno (Posted a comment)
  • -email is unavailable- added by mlocati (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2018-10-05 haible Attached File- Added LIBXML_STATIC.diff, #45143
    2018-10-04 haible StatusNone Fixed
        Assigned toNone ueno
        Open/ClosedOpen Closed
    2016-11-27 haible CategoryNone Build
    2016-07-05 mlocati Attached File- Added shared32.zip, #37712
        Attached File- Added shared64.zip, #37713
        Attached File- Added static32.zip, #37714
        Attached File- Added static64.zip, #37715

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code