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 Date: Mon, 3 Jun 2002 05:33:25 -0400 From: linguist-cygwin AT rich-paul DOT net To: cygwin AT cygwin DOT com Subject: Building cygwin1.dll and mknetrel Message-ID: <20020603053325.A13720@monster.rich-paul.net> References: <000001c204b3$f2b01bc0$0200a8c0 AT sknet01> <20020528120346 DOT B21064 AT monster DOT rich-paul DOT net> <4 DOT 3 DOT 1 DOT 2 DOT 20020528122339 DOT 0260f7f0 AT pop DOT ma DOT ultranet DOT com> <20020528190238 DOT A22088 AT monster DOT rich-paul DOT net> <20020528232930 DOT GA18281 AT redhat DOT com> <20020529091728 DOT D22088 AT monster DOT rich-paul DOT net> <20020529143618 DOT GA2808 AT redhat DOT com> <20020602004747 DOT A10315 AT monster DOT rich-paul DOT net> <20020602062824 DOT GA1808 AT redhat DOT com> <20020602072107 DOT B10865 AT monster DOT rich-paul DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.16i In-Reply-To: <20020602072107.B10865@monster.rich-paul.net>; from rich-paul@rich-paul.net on Sun, Jun 02, 2002 at 07:21:07AM -0400 X-Operating-System: Linux monster 2.4.17-SMPs Here are some observations of building cygwin1.dll with the mknetrel package. I have not yet looked enough at the innards to be able to document how to add an 'extras' file, which is how mknetrel overrides the normal build procedure for some packages. All in all, it looks like a pretty elegant package made up mostly of shell scripts, which themselves are made up mostly of shell functions. It may be copied into the FAQ or anywhere else you may like. There's even a company in Oragon that will print in onto a roll of toilet paper for you. ;-> If it doesn't end up on the official web, I'll probably just throw it on my site. For testing of this script, I made a fresh install with setup, and installed the following packages: ash bash binutils bzip2 crypt cvs cygwin diffutils ed fileutils findutils gawk gcc gdbm grep gzip libbz2_1 libintl1 libncurses5 libncurses6 libpng libreadline4 libreadline5 make mingw-runtime pcre *perl sed sh-utils tar terminfo *tetex-beta texinfo textutils *getopt This appears to be close to the minimum set. Perl may not be needed. tetex-beta really isn't needed, it is installed just for readlink. The command, I think, could be replaced with: | #!/usr/bin/perl | $x = readlink $ARGV[0]; | exit 1 unless defined $x; | print $x, "\n"; | exit 0; or maybe |#!/bin/bash |find "$1" -type l -maxdepth 0 -printf '%l\n' getopt is not a cygwin package. My copy came out of a copy of smail on my linux box, it's PD from AT&T, and compiled out of the box on cygwin. It could probably be replaced with a shell script/function. After installing the system, and adding getopt, the following script was sufficient to build cygwin; it ended up in a lovely tarball in /netrel/uploads. |PATH=/netrel/mknetrel/bin:/bin |cd /bin |for name in c++ ar ranlib g++ dlltool as windres nm strip; do | do ln -s $name i686-pc-cygwin-$name |done |cd / |mkdir netrel |cd netrel |cvs -d :pserver:anoncvs AT sources DOT redhat DOT com:/cvs/cygwin-apps co |mknetrel |mkdir src inst build uploads extra |cd src | |tar -xjf $SETUPDIR/release/cygwin/*-src.tar.bz2 |tar -xjf $SETUPDIR/release/mingw-runtime/*-src.tar.bz2 |tar -xjf $SETUPDIR/release/w32api/*-src.tar.bz2 | |cd cygwin*/winsup |rm -fr mingw cinstall w32api |ln -s /netrel/src/mingw-runtime-*/ mingw |ln -s /netrel/src/w32api-*/ w32api | |cd /netrel |mknetrel cygwin 2>&1 | tee mknetrel.cygwin.out Notes: * The first time you connect to the CVS server, you're going to have to do a cvs login * mknetrel has hardcoded absolute paths. your build tree must be in /netrel exactly. * mknetrel, it appears, can build most but not all cygwin packages. vim, for example, looses, because the build must be done in the src directory. It looks like an 'extras' script could be produced to accomidate vim, either with a link tree (I seem to recall the vim build supports this) or some other hack. * On my production system, I had to change the '#!/bin/sh' to '#!/bin/bash' on one of the mknetrel shell scripts to get the shell to accept the usage of getopts ... but on the fresh install, I did not. (This is the bash getopts builtin, not the standalone and singular 'getopt' discussed above) * The fact that mknetrel uses i686-pc-cygwin-xxx as it's tools during the build implies that it may work with a cross compiler as well, or may have been developed to cross compile. I haven't yet had time to prove this. * I use wildcards in some places to avoid explicitly stating package versions. The drawback to this approach is that it will break in the presence of dup package versions. * Some of my test builds produced a linux version of libiberty as an added bonus. I don't know why, but it didn't seem to hurt anything -- Got freedom? Vote Libertarian: http://www.lp.org -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/