From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86775 invoked by alias); 3 Feb 2017 17:43:42 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 86371 invoked by uid 89); 3 Feb 2017 17:43:34 -0000 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 Received: from mailout02.t-online.de (HELO mailout02.t-online.de) (194.25.134.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Feb 2017 17:43:31 +0000 Received: from fwd00.aul.t-online.de (fwd00.aul.t-online.de [172.20.26.147]) by mailout02.t-online.de (Postfix) with SMTP id B126F41AF1A5 for ; Fri, 3 Feb 2017 18:43:28 +0100 (CET) Received: from [192.168.2.28] (Gn2tokZUohxqebnPyCNlEJRB2-Y-q5nqKFAuEDo8vHmhEiDD-kYdLihKHUwScuUZXy@[91.59.8.212]) by fwd00.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1cZhtQ-3VK8Se0; Fri, 3 Feb 2017 18:43:28 +0100 Subject: Re: Providing cygwin1.dll in both 32- and 64-bit versions To: cygwin@cygwin.com References: <5893A0CD.5090107@junovagen.se> <58946E36.8070103@junovagen.se> From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Message-ID: <60a2d95d-ed88-c3a3-0b32-34316935a99b@t-online.de> Date: Fri, 03 Feb 2017 17:43:00 -0000 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> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00043.txt.bz2 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 > <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