(Illustration by Gaich Muramatsu)
I had some trouble building coda with GCC 3.3.2 (Debian; further details on request), and also with autoconf in lwp. I've got other runtime problems in a separate message, but if you build via debian/rules, the binaries get stripped. This is near-current CVS (the patches below are against a workspace updated two days ago). Details (patch for each appended below): 1. Auto* tools 2.58 (maybe this is automake 1.7?) seems to want AC_CONFIG_HEADERS, not AM_CONFIG_HEADER, in configure.in. I'm not sure why this only affects lwp. I have not yet tested on a fresh checkout, and the autotools are really crap in this respect :-(. They leave so much junk lying around that you almost have to check out to a freshly initialized partition to be sure you're getting the behavior you'd get starting with bare metal. Add in debhelper, and arrgh. :-P 2. I'm commenting out the dh_strip in all my debian/rules files now, but I think that (for CVS) not stripping should be the default even if you're building .debs. Let the downstream Debian maintainer do the stripping for production releases. Patch is "obviously correct." ;-) 3. In Linux (at least, it looks to me like the same problem occurs in the BSD kernel code too) the macro _IOWR expands to take sizeof of its third argument. As you see below, when CIOC_KERNEL_VERSION gets expanded, this results in the expression "sizeof (sizeof (int))" which is semantically silly (although probably correct on 32-bit CPUs, it's probably wrong on many 64-bit boxen where int is often 32 bits but size_t is unsigned long and therefore 64 bits). Don't trust the CIOC_KERNEL_VERSION patch; I have not audited _other_ uses of the _IOWR macro to make sure they're passing types rather than sizeof expressions. I chose to change CIOC_KERNEL_VERSION only because it's used only once, so it's a minimal change, and on a 32-bit box mostly we're going to be looking at 32-bit objects so you could almost get away with "#define sizeof(x) (4)". :-) **************** lwp/configure.in patch **************** ~/Projects/Coda/lwp cvs diff: Diffing . Index: configure.in =================================================================== RCS file: /coda-src/lwp/configure.in,v retrieving revision 1.33 diff -u -u -r1.33 configure.in --- configure.in 7 Apr 2003 17:41:17 -0000 1.33 +++ configure.in 11 Dec 2003 01:08:03 -0000 @@ -6,7 +6,8 @@ AC_CONFIG_SRCDIR(src/lwp.c) CODA_SETUP_BUILD AM_INIT_AUTOMAKE(lwp, 1.10) -AM_CONFIG_HEADER(config.h) +dnl AM_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS(config.h) dnl For library version updates, follow these steps in order. dnl - when any library source has changed, increment first **************** debian/rules patch **************** ~/Projects/Coda/lwp cvs diff: Diffing debian Index: debian/rules =================================================================== RCS file: /coda-src/lwp/debian/rules,v retrieving revision 1.6 diff -u -u -r1.6 rules --- debian/rules 23 May 2001 14:15:42 -0000 1.6 +++ debian/rules 11 Dec 2003 01:08:03 -0000 @@ -65,7 +65,7 @@ # dh_undocumented dh_installchangelogs dh_link - dh_strip +# dh_strip dh_compress dh_fixperms dh_makeshlibs ~/Projects/Coda/rpc2 cvs diff: Diffing debian Index: debian/rules =================================================================== RCS file: /coda-src/rpc2/debian/rules,v retrieving revision 1.4 diff -u -u -r1.4 rules --- debian/rules 23 May 2001 14:14:19 -0000 1.4 +++ debian/rules 11 Dec 2003 01:08:05 -0000 @@ -64,7 +64,7 @@ # dh_undocumented dh_installchangelogs dh_link - dh_strip +# dh_strip dh_compress dh_fixperms # You may want to make some executables suid here. ~/Projects/Coda/rvm cvs diff: Diffing debian Index: debian/rules =================================================================== RCS file: /coda-src/rvm/debian/rules,v retrieving revision 1.3 diff -u -u -r1.3 rules --- debian/rules 23 May 2001 15:33:49 -0000 1.3 +++ debian/rules 11 Dec 2003 01:08:07 -0000 @@ -65,7 +65,7 @@ # dh_undocumented dh_installchangelogs dh_link - dh_strip +# dh_strip dh_compress dh_fixperms # You may want to make some executables suid here. ~/Projects/Coda/coda Index: debian/rules =================================================================== RCS file: /coda-src/coda/debian/rules,v retrieving revision 1.8 diff -u -u -r1.8 rules --- debian/rules 14 Mar 2002 22:03:42 -0000 1.8 +++ debian/rules 11 Dec 2003 01:08:10 -0000 @@ -103,7 +103,7 @@ # dh_undocumented dh_installmodules dh_installchangelogs ChangeLog - dh_strip +# dh_strip dh_link dh_compress dh_fixperms **************** CIOC_KERNEL_VERSION patch **************** ~/Projects/Coda/coda cvs diff: Diffing lib-src/kernel-includes Index: lib-src/kernel-includes/coda.h =================================================================== RCS file: /coda-src/coda/lib-src/kernel-includes/coda.h,v retrieving revision 1.59 diff -u -u -r1.59 coda.h --- lib-src/kernel-includes/coda.h 23 May 2003 18:27:52 -0000 1.59 +++ lib-src/kernel-includes/coda.h 11 Dec 2003 01:08:10 -0000 @@ -311,7 +311,7 @@ #define VC_MAXMSGSIZE sizeof(union inputArgs)+sizeof(union outputArgs) +\ VC_MAXDATASIZE -#define CIOC_KERNEL_VERSION _IOWR('c', 10, sizeof (int)) +#define CIOC_KERNEL_VERSION _IOWR('c', 10, int) #if 0 #define CODA_KERNEL_VERSION 0 /* don't care about kernel version number */ -- Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN Ask not how you can "do" free software business; ask what your business can "do for" free software.Received on 2003-12-10 20:31:52