[tlbuild] mingw cross-compilation fails at ICU

Peter Breitenlohner peb at mppmu.mpg.de
Mon Apr 26 18:16:57 CEST 2010


On Mon, 26 Apr 2010, Manuel Pégourié-Gonnard wrote:

> --disable-utf16-string-check --build=x86_64-linux-gnu --host=i586-mingw32msvc 
> --with-cross-build='/home/mpg/tl/source/Work/libs/icu'/icu-native
> checking for ICU version numbers... release 4.4, library 44.0, unicode 
> version 5.2
> checking build system type... x86_64-pc-linux-gnu
> checking host system type... i586-pc-mingw32msvc
> checking target system type... i586-pc-mingw32msvc
> checking for i586-mingw32msvc-gcc... i586-mingw32msvc-gcc
>
>> BTW: Using '--build=i686-linux-gnu --host=i386-pc-mingw32' for gcc cross
>> compiler I have no such problem.
>> 
> Since my cross-compiling tools are installed as
>
> /usr/bin/i586-mingw32msvc-*
>
> I assume --host=i586-mingw32msvc is the correct option for me. ...

Hi Manuel,

that is correct. '--host=i586-mingw32msvc' sets the host-alias used to prefix
your cross tools. Running 'config.sub i586-mingw32msvc' correctly yields the
canonical host name 'i586-pc-mingw32msvc' shown above as host system type.

My setup is different, the tools are installed as i386-pc-mingw32-*.

That host system type is then used by configure to determine the platform
specic Makefile fragment mh-cygwin-msvc, but this seems to fail resulting in
mh-unknown.

The problem is in line 34 of icu's aclocal.m4 which tests for *-*-mingw32
instead of *-*-mingw32* as in most other cases.

Thus I'd think that you have to use '--host=i586-mingw32' and create
symlinks i586-mingw32-gcc -> /path/to/i586-mingw32msvc-gcc, or simply
i586-mingw32-gcc -> i586-mingw32msvc-gcc if you have write access to that
directory, and similar for all the other tools.

If that works, we could correct that aclocal.m4 and rebuild configure.  This
is, however, a little bit tricky because this requires Autoconf-2.63 not
available on my system.

>> A quite different point. If you configure with '--disable-xetex' and
>> '--disable-bibtexu' the icu libraries are not used. Can you then build
>> everything else?
>> 
> Just tried, and unfortunately no. It first failed at dialog (missing ncurses 
> headers) and pdfopen (linking problems, cannot resolve _fork() etc.) so I 
> disabled them too. Now it fails at mf-mfextra with:
>
> /bin/bash ../../../texk/web2c/web2c/convert mf
> sed s/TEX-OR-MF-OR-MP/mf/ ../../../texk/web2c/lib/texmfmp.c >mfextra.c
> i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I../../../texk/web2c -I./.. 
> -I/home/mpg/tl/source/Work/texk -I/home/mpg/tl/source/texk 
> -I../../../texk/web2c/.. -I/usr/include  -Wimplicit -Wreturn-type 
> -Wdeclaration-after-statement -Wno-unknown-pragmas -g -O2 -MT mf-mfextra.o 
> -MD -MP -MF .deps/mf-mfextra.Tpo -c -o mf-mfextra.o `test -f 'mfextra.c' || 
> echo '../../../texk/web2c/'`mfextra.c
> In file included from 
> /usr/lib/gcc/i586-mingw32msvc/4.4.2/../../../../i586-mingw32msvc/include/windows.h:98,
>                 from /home/mpg/tl/source/texk/kpathsea/mingw32.h:9,
>                 from /home/mpg/tl/source/texk/kpathsea/config.h:99,
>                 from ../../../texk/web2c/config.h:32,
>                 from ../../../texk/web2c/cpascal.h:16,
>                 from ../../../texk/web2c/texmfmp.h:5,
>                 from mfd.h:10,
>                 from mfextra.c:14:
> /usr/lib/gcc/i586-mingw32msvc/4.4.2/../../../../i586-mingw32msvc/include/winsock2.h:64: 
> error: conflicting types for ?fd_set?
> /usr/include/sys/select.h:78: note: previous declaration of ?fd_set? was here

The cross compiler should certainly not use /usr/include/sys/select.h, this
is strange.

Regards
Peter Breitenlohner <peb at mppmu.mpg.de>


More information about the tlbuild mailing list