Subject: Re: Notes on building ... R6 under NetBSD/SPARC / xterm weirdness
To: None <port-sparc@netbsd.org>
From: Greg Earle <earle@isolar.Tujunga.CA.US>
List: port-sparc
Date: 09/14/1994 03:40:36
>Matt Green asked me to make another build tree of R6 for him, since I
>had the disk space handy to do it.  I've done this, and it can rcp
>over our slow PPP links to his machine tonight.  He suggested there
>might be other people on this list interested in a copy - I'm happy to
>make it available.  (It's about 10Mb tar'd and gzip -9'd)

I dunno if it matters, but my R6 build tree is on a machine at work and
JPL has a T1 link to all external connections :-)

>I've built it from the stock X11R6, plus XC patches 1-4, plus the
>netbsd patches posted here a week or three ago.  The only other change
>was a minor Makefile tweak to make libXmu compile shared.  I haven't
>been following proceedings closely, you seem to be discussing some
>other patches or problems I'm not aware of.  What's wrong with xterm?

Erm, I didn't need to make any Makefile tweaks to make libXmu compile shared.
What do you mean by that?

"What's wrong with xterm" is that it doesn't create utmp entries, because the
default location for utmp (/etc/utmp) doesn't exist in NetBSD.  It also can
be compiled to create wtmp and/or lastlog entries, and the default locations
for those are wrong for NetBSD as well.  The simplest workaround for this is:

*** xc/programs/xterm/Imakefile.orig	Sun Apr 10 13:03:38 1994
--- xc/programs/xterm/Imakefile	Fri Sep  9 23:13:11 1994
***************
*** 26,27 ****
--- 26,30 ----
     MAIN_DEFINES = -DUTMP $(TTYGROUPDEF) $(PUCCPTYDDEF) \
+ 		  -DUTMP_FILE=\"/var/run/utmp\" \
+ 		  -DWTMP_FILE=\"/var/log/wtmp\" \
+ 		  -DLASTLOG_FILENAME=\"/var/log/lastlog\" \
  		  -DOSMAJORVERSION=$(OSMAJORVERSION) \

The "real" fix would probably involve putting in a little "#ifdef __NetBSD__"
segment into xterm's main.c, probably somewhere around line 300 or thereabouts.
(Perhaps that's what Matthieu did ... )

The "other patches or problems" concern "xman" and "xload", neither of
which work with NetBSD by default ("xman" defaults to expecting unformatted
man pages in /usr/man instead of /usr/man/cat*/*.0; "xload" expects the kernel
to be "/vmunix" among other things, and it already has several architecture-
specific sections in it to handle the differences - there was one made up for
BSDi, but none for NetBSD).

	- Greg