bug-gnu-libiconv
[Top][All Lists]
Advanced

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

[bug-gnu-libiconv] Description of issues with x86 build for Windows


From: Corey Stinson
Subject: [bug-gnu-libiconv] Description of issues with x86 build for Windows
Date: Thu, 21 Jan 2021 23:16:15 -0600
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

Hello,

Maintainers may be aware that building libiconv 1.16 in a Windows environment for x64 and x86 is broken for MSVC.

There are a couple of issues.

1)

libcharset's relocatable_stub.c appears to be missing a LIBCHARSET_DLL_EXPORT declaration for that function causing a build failure.

2)

The compilation to object format for resource files in ~/src and ~/lib fail for the x86 version of the build.  It did work for me on the x64 build, but seemingly only because I happened to have a copy of 'windres' in my path from a Strawberry Perl installation. Absent the Perl installation I don't believe I would have a copy of 'windres' on my system and the build instructions don't mention needing it.  Lacking it results in a very non-intuitive error from libtool.

At some point the configure process uses windres via libtool to compile ~/windows/libiconv.rc  to ~/lib/libiconv.res, then the make process subsequently compiles libiconv.res to ~/.libs/libiconv.res.obj.  When windres isn't provided with a --target it compiles the object to its built-in default, which in my case was x64, even though all of the other C-compiled artifacts are being correctly compiled to x86.  Link failure follows.

A similar issue occurs with ~/src/iconv.res.  However, in this case the make process uses windres to compile ~/windows/iconv.rc directly to object format (but with the .res extension).  Same problem, a 64-bit object is generated.

Potential solutions: windres could be fed the --target options. Had trouble attempting to do this manually through the make process as libtool wasn't cooperating.

Eventually manually generated the necessary files using the MSVC toolchain: rc and cvtres.

Lacking knowledge of the inner workings of autotools/configure/libtool I'm unclear as to how to resolve this in anything approaching a clever way.  Perhaps the above info will be useful to someone else?





reply via email to

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