From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <140e7ec30802281626x188aa366s1182a0313bc80aaf@mail.gmail.com> Date: Fri, 29 Feb 2008 09:26:44 +0900 From: sqweek To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] plan9 httpd/pegasus on unix? In-Reply-To: <20080228172737.GA9702@nibiru.local> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080223212240.GB4284@gluon> <47C29FC1.6020202@proweb.co.uk> <13426df10802250725w5e777a14n188dadeab28da480@mail.gmail.com> <4f34febc0802250826j34a1a5eucce219fe85970dad@mail.gmail.com> <20080227155247.GA23909@nibiru.local> <140e7ec30802272323n2ddc13bbu59050c05ba390be8@mail.gmail.com> <20080228172737.GA9702@nibiru.local> Topicbox-Message-UUID: 68583998-ead3-11e9-9d60-3106f5b1d025 On Fri, Feb 29, 2008 at 2:27 AM, Enrico Weigelt wrote: > * sqweek wrote: > > > Did you ever try to building qmail ? > > > > Yes. On linux and netbsd. With and without various patches. Works perfectly. > > Well, you've probably got the netqmail port, which automatically patches > it's own sourcetree within the build process. Nope. qmail-1.03.tar.gz. On netbsd anyway - on linux I built it from my package manager which... yes, uses netqmail. And I get the same TLS error here as at work with qmail-1.03 so I guess I owe centOS an apology. > > $ uname -p > > x86_64 > > $ echo cc -m32 -O2 -include /usr/include/errno.h >conf-cc > > $ echo cc -m32 >conf-ld > > $ make > > Well, this *very* unobvious and complex (instead of just passing $CC and > $LD to make), requires me to maintain additional logic, which woulnd't > be necessary, if DJB could write his makefiles in more standard and sane > ways ;-P The docs are a bit light on custom compilers, granted (probably as they're irrelevant for 95% of users), but INSTALL does point you at conf-users/conf-groups/conf-qmail. Doesn't take a genius to notice conf-cc and conf-ld from there. DJB's makefiles have the dubious honour of probably being written before such conventions existed. There is a reason he does it that way - Makefile dependencies only work with the timestamps on files. If you do it the "sane" way, then make has no information about the freshness of the information in CC. Are there object files sitting around that were built with an incompatible CC invocation? This is the motivation for DJB putting the commands into files instead of using the environment or make variables. That way he can have all the compilation rules depend on conf-cc so that should you change it, everything gets rebuilt properly. Similarly with the other conf- files - you don't need a make clean or anything after changing them, just make and exactly what needs to get regenerated will get regenerated. We're talking pretty marginal gains, obviously - recompilation is not expensive. It's mainly an academic achievement - having a *correct* Makefile. > > Granted, the -include is a bitch and took me awhile to work out. > > Actually, this is crap. Probably he just forgets the #include's. Yes. There is history here again. If you hunt around you'll find posts from DJB complaining about unix (libc?) developers breaking existing code by making errno not work without including errno.h. Which made me somewhat surprised to hit this problem, but I guess qmail-1.03 is old enough to be affected. > > The sysroot requirement is a little harder to meet, but really just > > requires a mount --bind /tmp/sysroot/var/qmail /var/qmail. Or, if > > you're running qmail on the host and really can't afford to stop it > > for a minute or two, a custom setup rule based on hier.c (or use a > > chroot - oh if only lunix had private namespaces...). > > chroot != sysroot. I'm well aware. If you were paying attention you'd notice I was suggesting a chroot as a method of putting a directory from the sysroot in the standard location without affecting the host system, not suggesting you attempt to chroot into a cross-compiled root. And again, if lunix had learnt anything from plan9 this would be *trivial*. -sqweek