delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/11/02/13:34:33

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9FC93385840B
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1698946470;
bh=8FKJJD5CXe3x+dtiaZDtS6MO+zVW5wVs3A19ebUw+F8=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=IzWnbiivThm8kJA/OWmsuxaGnVmzhMbHSlLN0C+64g/kGsBUuFU/+rkkq3XrkTRcB
Y/rhetkQq3uPgBojHCXDj/0hQ7nEnp6AjTD6Xsd/laFEoaIydE5Ja9I2IvSC6TWcBS
W3lmuRmt4YeUw5XXVEV0UbqZ8eML5cjRSrTy+iMI=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 494FE3858D38
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 494FE3858D38
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698946454; cv=none;
b=LHS7hxSawg7xLIR55LleqgcKHVwjHzc8n6BevqfTb0zh9zl4baSqyCniqdXyH8nI/KEh/MX47bgyK+yfqSG1od8vYcXgz8oKFagqR5f62Sawh/AzaD8tocMWlF6w8b5bbQSbUmFh7iNSZulPCXK0dsOjRjlHTTTIOTwQ6thx5Yk=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1698946454; c=relaxed/simple;
bh=IpchSw/eCbQZSklesxTAT4QgiKLAMbBRitWMSGnQi2c=;
h=Message-ID:Date:MIME-Version:Subject:To:From;
b=GW9FgHOgSP6VCAnX1yGOe8t6duyiwltWZS9E0Tay7E3afHCT+/nfDsMMEFxoV6/Vo3ffdu+qZuj4ex3rl6j2j259diL0qCGU3rveIvJQdTnn7R6q9T98dmXexXE8mcVDCwfzZos/+hrEuoi3/xS66j1UMWcMp+h9ka0O8FoRdRw=
ARC-Authentication-Results: i=1; server2.sourceware.org
Message-ID: <f4a133f8-2723-4fae-a1ef-f4b73b599ee9@johannesthoma.com>
Date: Thu, 2 Nov 2023 18:33:53 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Question on statically linking with cygwin
To: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>,
Martin Wege <martin DOT l DOT wege AT gmail DOT com>,
The Cygwin Mailing List <cygwin AT cygwin DOT com>
References: <b6d9c9d9-63ae-7238-cd77-6f3de051eb5d AT gmx DOT at>
<CANH4o6NP+ag1HNPPoqkWAZw0KK2Fnc22_4vt1m2QgByhr5Pb0w AT mail DOT gmail DOT com>
<f209cefe-0ca0-dd6f-dab8-9cf82fa57f8c AT johannesthoma DOT com>
<71e853b9-1b6c-4796-9488-b58f69c7de1e AT dronecode DOT org DOT uk>
In-Reply-To: <71e853b9-1b6c-4796-9488-b58f69c7de1e@dronecode.org.uk>
X-Provags-ID: V03:K1:tZp0Aun3SFite83RCHn6LrLxVoDyukGw1tUhZAVuv2ykwXGH83P
ZFuFAWeryTCwHjPQrbL5d7YFM/VYrAR5qfUaru7o5eqcDCOAZmQQpuI39nNa0GADGy/Rw4A
+Dznk/7//hKkPruciaUB3EAaQRZrskpETr6YO1EYKlZ2uS2cYroccjksoUu/GSayMiNxjDx
M9dRIUD5N9n5+FYdnTAWw==
UI-OutboundReport: notjunk:1;M01:P0:J2+8NfCq6rQ=;V/sJDBqThqkzfO47sAzeK3PK4K3
p5Z/kQ0sJAofhjeYFFY2r6fhdym5C2lakxAp54t0g0QQjLGA7V+1Ud244kHZxLKa4DXICvrDR
HcGTWd0ur5ySIHeZRYR/OYZ7gWC6NoH23aqxUNYGcW8CF/5gK/DcHg8+V2lpcDuClm9oJdbgx
0AB6N31ZpVi82TLT90UNQzBU3CctSekb5oFbbkcBgC20BrS5Ozj/5DSaZdsuK1OzAYe8s7na6
v3JdX+NQf81ZpaElHxaCuqG9xm8gfpOUNNyv6irF2HBR7ts2mdn97IX2jPkP6zwyPvvB2Pd0w
3e2l2tW9nM2nhgfXLrQThz1OB/o0WdyS1pHvEe7rqdvmwnw4/JmSLwpokFsgc2Pb04PmCzi1M
ksa2LEU5wAb4SzBToB8xfTrBSVksa6H/YAMHmsUtEFbkTMQtMYFtwBWbx6WLGQeEuT/qmne9K
wNPxJxyfbTc16ulfoAjeEOAeVLxtnB77a0j6jKYVxi/+JtIaeXqCoyI/Il1lLI7XFLrgV/+3i
zVYM67MZYAXrXet56T8VDRk/INY/5cjRjpERWDtLuQfcOVuIktN94ZcwkEcDb3tzISACqyGCu
aDwJ+njopPDra7fnqlT605fl7cPdu+ZdlaGr3LNCiN0Zw0L/f2d2wREFo/YnIYsZGrf/GUSWm
yDsk+xsZzR28Y6lX6MiMlM4CSCyE6jq31n+26320MbU2j5G8u/zxFVSz2W7fvqohwoXDNKbQt
iU8OC8f+311nSY931uCakvR609xq3IVnFsw2ef+4ojoRgKhCJ91OyG8apSu4bsb1A6EyQMWW9
RHm+rD6YInIJZFR+noHjvTX826vDsYX1zF5/+4hEQ0DPYGorBxXGWAR4IOnCOIeyyurlAI1Q2
wDJLTMTIEievIOg==
X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,
RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Johannes Thoma via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Johannes Thoma <johannes AT johannesthoma DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 3A2HYWNv006634

Hi Jon, Hi Martin,

Thanks for your answer, comments inline:

Am 16.10.23 um 17:28 schrieb Jon Turney:
> On 22/09/2023 12:12, Johannes Thoma via Cygwin wrote:
>> Hi Martin,
>>
>> Thanks for your answer, comments inline:
>>
>> Am 22.09.23 um 07:54 schrieb Martin Wege via Cygwin:
>>> On Tue, Sep 19, 2023 at 5:24 PM Johannes Thoma via Cygwin
>>> <cygwin AT cygwin DOT com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> As I understood the reason for not being able to statically link
>>>> the cygwin1.dll in to a binary and distribute that is because of
>>>> licensing issues.
>>>
>>> Do you have any references for that?
>> I read that in the Cygwin FAQ:
>>
>> https://cygwin.com/faq/faq.html#faq.programming.static-linking
>>
>> I read through the licensing options and IMHO linking statically
>> against cygwin (which is GPL) from a program (like WinDRBD) that
>> is also GPL should be allowed. But I am not a lawyer ...
> 
> That FAQ probably needs clarifying.
> 
> The two sentences are probably intended to be taken separately.
> 
> So, to be clear, there are technical reasons why the cygwin DLL is not also made available as a static library.
> 
>>>> Are there any technical issues that would make
>>>> it impossible to link with cygwin statically?
>>>>
>>>> The reason I am asking is I am working on a GPL project
>>>> (WinDRBD: https://github.com/LINBIT/windrbd) and am currently
>>>> delivering the cygwin1.dll along with the binary. It would be
>>>> desireable to have the cygwin1.dll statically linked (for example
>>>> to avoid version clashes) instead. Is that technically possible?
>>>> If necessary I am ready to compile cygwin (at least the needed
>>>> files) on my own.
>>>
>>> Interesting.
>>> But how (from a developers perspective) do you link cygwin1.dll
>>> statically into a binary?
>>>
>> I would build my own cygwin1.lib or cygwin1.a and statically link
>> against it.
> 
> If you do work out how to do this, patches would be welcome...
> 
You are right it is far from trivial. I am working on it, not
sure now if it will be possible or how long it takes (my main
project is WinDRBD, so unfortunately I cannot spend full time on
getting static linking work). Right now, I can compile cygwin on my own
and digged a little bit in the program startup code (lib subdir),
I will keep you updated once I go along.

Best regards,

- Johannes

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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