| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-1.4 required=5.0 tests=AWL,BAYES_00 |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <49E5DDDA.4040506@bonhard.uklinux.net> |
| Date: | Wed, 15 Apr 2009 14:15:06 +0100 |
| From: | Fergus <fergus AT bonhard DOT uklinux DOT net> |
| User-Agent: | Thunderbird 2.0.0.18 (Windows/20081105) |
| MIME-Version: | 1.0 |
| To: | Cygwin ML <cygwin AT cygwin DOT com> |
| CC: | Fergus <fergus AT bonhard DOT uklinux DOT net> |
| Subject: | Building static executables |
| 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 |
I noticed that /bin/bash.exe has several library dependencies:
~> cygcheck /bin/bash.exe
D:\bin\cygwin1.dll
D:\bin\cygintl-8.dll
D:\bin\cygiconv-2.dll
D:\bin\cygreadline6.dll
D:\bin\cygncurses-8.dll
(as well as other requirements under c:\Windows\system32\ not listed
here). I was able to build a "static" version (that is, a version
requiring only a co-located cygwin1.dll to run) by defining
~> export CFLAGS="-static"
and then building bash from source*.
I was able to do the same thing with nano.exe, which in its "non-static"
standard form requires all of cygncurses-8.dll, cygintl-8.dll,
cygiconv-2.dll as well as cygwin1.dll.
I then tried (because it provides a nicer look than bash)
~> cygcheck /bin/rxvt.exe
D:\bin\cygwin1.dll
and guessed that /bin/rxvt.exe already was "static" in the sense that it
would require only a co-located cygwin1.dll to run; but when I tried it
in that sparse environment I got the error message:
failed to load libW11.dll
Q1. Can anybody tell me why cygcheck /bin/rxvt.exe does not show
libW11.dll as a dependency?
I then tried building rxvt from source* with the same setting for
CFLAGS, but although an executable built perfectly well, it was not
static either. And in the same way: it needs libW11.dll.
Q2. Please can anybody tell me how to build static executables (in
general) in Cygwin, from source*?
* What I mean by "source" is the .tar.gz from GNU or SourceForge or ...
Thank you.
Fergus
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |