Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42C464B0.C8D5A7AE@dessent.net> Date: Thu, 30 Jun 2005 14:31:28 -0700 From: Brian Dessent MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Cygwin from Scratch? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Report: -5.9/5.0 ---- Start SpamAssassin results * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] * 0.0 AWL AWL: From: address is in the auto white-list ---- End SpamAssassin results X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Tony Karakashian wrote: > Just a random thought: as a long time Linux from Scratch user, I'm > intrigued about the possibility of building a Cygwin "distribution" > from scratch. Typically when I build an LFS install, I take a lot of > time building each package to make sure every possible feature is > available (for example, currently fiddling with Apache2 under Cygwin, > and ldap modules don't compile unless apr-util is built with ldap > support, which the default package isn't). Is such a thing possible? Maybe a better question would be, "Why do you feel it would not be possible?" Every Cygwin binary package is compiled from source by the maintainer (obviously) and includes a -src package that should build cleanly, else there's a packaging problem. So in that sense you can build everything yourself, no question. But I think the larger implication in your message is that you would want to configure things differently, to perhaps use different prefixes/paths or settings. That too should be possible given the build scripts provided in the -src packages. But you will undoubtedly have to do some minor tweaking, and know what you're doing. However, it will never be like LFS, where you just download the upstream tarballs and "./configure && make && make install" ad nauseam. Some *nix software will build under Cygwin out of the box without patching, but I would say it is the exception to the rule. Most of the changes necessary are usually minor, but they still exist, and that is why using the -src packages is your best bet. I know that part of the LFS philosophy is to use unpatched upstream sources as much as possible, but I don't think this is realistic with Cygwin just yet. In my experience the two most common changes you have to make when porting are: a) adding -no-undefined to LDFLAGS (or -Wl,-no-undefined to CFLAGS), and b) adding missing $(EXEEXT) to Makefiles that reference the names of binaries. I believe that a) is just due to how the win32 dynamic loader works (all symbols must be accounted for at link-time) in contrast to how ld.so works under Linux. b) is normally taken care of for you by automake but every once in a while you'll run into a rule in a Makefile that assumes that binaries have no extension. You will know when you hit this because you will either see what seems like a totally random and incorrect rule being invoked (as make will end up using a built-in implicit rule) or 'make install' will fail. In the latter case, /usr/bin/install can normally work around being called on a filename without the .exe suffix, but if the package includes its own install-sh script it can possibly be old and outdated and not have the .exe magic. In some cases you might have to re-autotoolize and rebuild the generated files, since the autotools version that the package maintainer used might be old or might not have Cygwin specific fixes. Brian -- 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/