delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/02/03/16:21:51

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <30839509.post@talk.nabble.com>
Date: Thu, 3 Feb 2011 13:21:39 -0800 (PST)
From: gvidaver <gordon DOT vidaver AT ll DOT mit DOT edu>
To: cygwin AT cygwin DOT com
Subject: Re: -static not working with gcc 4.3.4
In-Reply-To: <AANLkTim2+0Z8iRFBCrUsKxDwhJu8HGxSByxPLAiLtkzY@mail.gmail.com>
MIME-Version: 1.0
References: <20101017005857 DOT GA28900 AT const DOT famille DOT thibault DOT fr> <2BF01EB27B56CC478AD6E5A0A28931F201762C09 AT A1DAL1SWPES19MB DOT ams DOT acs-inc DOT net> <20101018125833 DOT GB25504 AT const> <252576 DOT 94771 DOT qm AT web25508 DOT mail DOT ukl DOT yahoo DOT com> <20101018213923 DOT GO6369 AT const DOT famille DOT thibault DOT fr> <30838541 DOT post AT talk DOT nabble DOT com> <AANLkTim2+0Z8iRFBCrUsKxDwhJu8HGxSByxPLAiLtkzY AT mail DOT gmail DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

To clarify : you can't make an executable that copies the dll or library co=
de
into the executable itself.  When the exe launches it will look for
cygwin1.dll in /usr/bin.  So it will fail to launch on a system that doesn't
have cygwin installed.=20=20

If I understand the cygwin license, this is intended as a way to help RedHat
make money from cygwin (this intent is fine by me) by forcing you to pay
them for a solution to this problem.


marco atzeri-4 wrote:
>=20
> On Thu, Feb 3, 2011 at 8:34 PM, gvidaver  wrote:
>=20
> what is a new game to continue a thread after 3-4 months ?
>=20
>>
>> It still requires the cygwin1.dll:
>=20
> of course it is a cygwin program built by the gcc for cygwin .
>=20
>>
>> $ g++ -v
>> ...
>> gcc version 4.5.0 (GCC)
>>
>> $ g++ test.c -o test -static
>>
>> $ ldd test.exe
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0...
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0cygwin1.dll =3D> /usr/bin/cygwin1.dll (0x6100=
0000)
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0...
>>
>> And apparently the only alternative is mingw, see:
>>
>> http://cygwin.com/faq/faq-nochunks.html#faq.programming.static-linking
>> "it is not possible to statically link with a Cygwin library to obtain an
>> independent, self-contained executable. "
>>
>> $ i686-w64-mingw32-g++ -v
>> ...
>> gcc version 4.5.1 (GCC)
>>
>> $ i686-w64-mingw32-g++ test.c -o test -static
>>
>> $ ldd test.exe
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0ntdll.dll =3D> ... path to Windows dlls
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0kernel32.dll =3D> ...
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0KERNELBASE.dll =3D> ...
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0msvcrt.dll =3D> ...
>>
>> (I.e. no dependencies on anything besides system dlls.)
>>
>>
>> Samuel Thibault wrote:
>>>
>>> Marco Atzeri, le Mon 18 Oct 2010 14:22:02 +0100, a =C3=A9crit :
>>>> have you checked if 4.5 has the same problem ?
>>>>
>>>> http://cygwin.com/ml/cygwin-announce/2010-08/msg00016.html
>>>
>>> It doesn't have the problem any more.
>>>
>>> Samuel
>>>
>>> --
>>> Problem reports: =C2=A0 =C2=A0 =C2=A0 http://cygwin.com/problems.html
>>> FAQ: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 htt=
p://cygwin.com/faq/
>>> Documentation: =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://cygwin.com/docs.html
>>> Unsubscribe info: =C2=A0 =C2=A0 =C2=A0http://cygwin.com/ml/#unsubscribe=
-simple
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/-static-not-working-with-gcc-4.3.4-tp29981383p3083=
8541.html
>> Sent from the Cygwin list mailing list archive at Nabble.com.
>>
>>
>> --
>> Problem reports: =C2=A0 =C2=A0 =C2=A0 http://cygwin.com/problems.html
>> FAQ: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http=
://cygwin.com/faq/
>> Documentation: =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://cygwin.com/docs.html
>> Unsubscribe info: =C2=A0 =C2=A0 =C2=A0http://cygwin.com/ml/#unsubscribe-=
simple
>>
>>
>=20
> --
> 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
>=20
>=20
>=20

--=20
View this message in context: http://old.nabble.com/-static-not-working-wit=
h-gcc-4.3.4-tp29981383p30839509.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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