This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Providing cygwin1.dll in both 32- and 64-bit versions

Am 03.02.2017 um 12:49 schrieb Thomas Nilefalk:
Hans-Bernhard Bröker skrev:
Am 02.02.2017 um 22:12 schrieb Thomas Nilefalk:

'how can I make a 32-bit compiled cygwin program run under cygwin64'?

You can't. Nor can anybody else.  For a Cygwin64-based program,
Cygwin32 is a bona fide cross-compilation platform rather than just
some subset of the same platform.  The same holds vice versa.

What triggered this chain of thought was that running an exe
cross-compiled to 32-bit just silently failed.

BTDT, and can feel your pain.

It would have helped me at that time if I would have gotten an error
message from the dynamic loader, like on other platforms ("skipping
cygwin1.dll because it has the wrong architecture").

Welcome to one of the deeper levels of the tragedy (or comedy of errors...) commonly known as Windows "DLL hell". AFAIK there is no dynamic loader Cygwin would have any amount of control over. This fails before any part of Cygwin ever gets loaded, so there's practically nothing cygwin can do about it.

Anyways, thanks for the explanation. Given that, the solution for runnig
32-bit cygwin programs on cygwin64 is of course

    $ PATH=<path_to_32-bit_cygwin1.dll>:$PATH

Actually that's not the solution, either. It's an unreliable workaround at best. That's because after this, all 64-bit cygwin programs executed by your own program will fail to start because they get the wrong Cygwin DLL.

The solution is to have a Cygwin32 environment installed independently of Cygwin64, and keep each executable strictly in its own environment. Mixing the two causes nothing but problems.

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]