(Copying 9fans in case somebody can lend a hand on this, copying the Debian bug report(er)s) Hi Russ, I'm a Plan9 newbie and Debian Developer, and I'm currently tying to fix bugs that showed after I uploaded drawterm to Debian. However I have hit some problems that are being difficult to solve. I've managed to fix most of them, and I'd like to share the patches. First problem: it doesn't compile on mips at all, the assembly code seems invalid. In [0] you can find a proposed patch. Second problem: the arch handling is quite fragile, and it doesn't work for sparc under linux [1] (uname -m is sparc64, not sun4u), for example. But the biggest problem is that there are no provisions for other architectures. I have prepared a big patch for this, see below. Third: segfaults on amd64, possibly other arches that I couldn't test. After a lot of guessing, I suspected of these constructs in lib.h: typedef int p9_long; #define long int Changing them to match longs with longs made the segfault go away, as amd64 uses 64bits for longs and the included libX.h was botched because of the "#define long int". But then it popped many type errors all around, since there are many inconsistencies (for example, function prototypes that doesn't match exactly the fuction definitions) and all the code assumes long==int. I'm trying to fix this, but the problem is very deep: there are many places where size specific types should be used instead of longs and ints. I'm still trying to fix this, and would greatly appreciate any help. ~~~~ I'm including the arch-related patch: it disables all the posix-*/ code (except for the x86 hashing routines, which are now conditionally complied from libsec) and instead creates a libmachdep directory with a tas.c file. In tas.c it tries to use the fairly new builtin atomic operations, and falls back to assemby if it's available. Also, the getcallerpc function is replaced with other gcc builtin, but I haven't made provisions for fallback to assembly here as I think that the builtin I'm using is widely available and that would have made the patch very complex. This change enabled drawterm to compile on these architectures: i386 amd64 sparc64 mips mipsel alpha ia64 powerpc s390. But since most of the porter machines I can use don't have X forwarding, I cannot test that it works correctly. sparc64 and i386 were tested and it seems to work ok. [0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508068 [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508100 -- Martín Ferrari