delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/02/03/12:44:47

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=BwskxqOL3M39uDce
6dRgJkW+3W4BHjrpaHmdw74p4naACQa0pV0TkX2h4kCnuzMjHq1/xksrx6/ucezP
1YDdN35n0Tqza7384p1lnQPE2VB2mblwdP/OyJnrO/zkGhwvaPOxvedmRUu7eyeW
rEAIue3HqhLUzrEtOZDaXdIcegY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=EkyoKWWSZM8UixkL7tJuJ+
R139I=; b=pxa2USOvp4GpwvMKQsKvl4j/60nVSHkxSn01/S42aPFEYgCB/nEmdG
FRBF6Ted2E5fQYpRNw+OVEzXY6EwRgDl93z4kELGvajg1Tv+D9L2QP3G+UKqtUeI
JNQj6Qeutd3cPbbT36Xig9xzNmxoagRRlZ9IdaJ7j1Qlo+L+nb5bg=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=comedy, 03022017, H*i:sk:58946E3, H*f:sk:58946E3
X-HELO: mailout02.t-online.de
Subject: Re: Providing cygwin1.dll in both 32- and 64-bit versions
To: cygwin AT cygwin DOT com
References: <5893A0CD DOT 5090107 AT junovagen DOT se> <af15cbdf-cfe5-dba9-e293-844a5de19e6a AT t-online DOT de> <58946E36 DOT 8070103 AT junovagen DOT se>
From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= <HBBroeker AT t-online DOT de>
Message-ID: <60a2d95d-ed88-c3a3-0b32-34316935a99b@t-online.de>
Date: Fri, 3 Feb 2017 18:43:21 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0
MIME-Version: 1.0
In-Reply-To: <58946E36.8070103@junovagen.se>
X-IsSubscribed: yes

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
> <32-bit_cross_compiled_program>

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:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019