From: adrian@ibmpcug.co.uk (Adrian Hall)
Newsgroups: comp.unix.bsd
Subject: Getting /usr/src to compile on 386BSD
Date: 23 Sep 92 22:13:10 GMT
Organization: The IBM PC User Group, UK.

This is a list of things I had to do so that make works from /usr/src.
It is not comprehensive, and by no means authoritive, and not in any
particular order. You are advised to read the entire list if you are
going to use it.

	(1)	Remove the references to lib and include in
		/usr/src/Makefile. They need to be made before
		the programs, so either put them at the start or
		remove them.

	(2)	Edit /usr/share/mk/*.mk so that install does
		a install -c instead of an install without a
		-c. You will find re-compiles a whole lot quicker :)

	(3)	Do not re-compile libg++, g++, gcc, gas, gdb or
		groff. (1) Its a waste of time, and (2) they come
		up with errors when you compile them. (e.g. try
		
	(cd lib/libg++ ; make depend ; make ; make install)

		to see what I mean).

	(4)	Similarly, dont compile tn3270. It has bugs in
		the makefiles that I dont want to fiddle with,
		and there are no patches to it (yet.)

	(5)	When doing a 'make depend', keep it in the
		foreground, since when it comes to 'expr', you
		have to press ctrl-D to get it to continue.

	(6)	BEFORE DOING ANYTHING, type the following line :-

mkdir -p `find /usr/src -exec ls -l {} \; | awk '{print $10}'`

		This makes all the obj directories that are missing.

	(7)	You need to link /usr/include/vm to /sys/vm in order
		to compile ktrace (and possibly a couple of others).

	(8)	I also moved all manual pages to /usr/share/man/man*
		and removed the manual page creation stuff from the
		/usr/share/mk/* files. You can then use catman (grabbed
		from one of the /usr/othersrc/public catman files and
		slightly modified) to create the cat* files if you so
		desire. If you are short on space, this might be a good
		idea.

	(9)	Dont forget to add in netstat and tset to the list
		of subdirs in usr.bin/Makefile to get these made as
		well (The sources are on agate in one of the unofficial
		subdirectories).

	(10)	Dont forget to apply all the patches :)

	(11)	I got the message 'Program cc1 got fatal signal 6.'
		when compiling awk, so I left that out as well. If
		anyone has a fix for this, let me know, and I will
		put it in.

	(12)	Make sure you have put in the DES code if you
		want it in (/usr/386bsd.errata/crypt.instructions
		explains how to get the crypt code into your library.
		Remember you are going to be re-compiling it though!).

Once all these have been done, it is a case of typing :-

	cd /usr/src
	make depend		(go get a pizza, preferably in
				 another coutry).
	make			(go get another pizza, preferably 
				 on another continent).
	make install		(see make depend).

On my system, crond and crontab came up with lots of warnings. They
dont seem to have suffered as a consequence, so I guess you can 
ignore them.

	How rachel.ibmpcug.co.uk anonymous ftp is laid out.

I have put my entire source tree and share tree up for anonymous ftp.
In addition my current kernel (all drivers included and fully patched),
and configuration are in the top level directory. Anything that I have
installed for local use is kept in src/local (sources only).
If you think looking at any other files will be useful, please let me know.

A dist.fs and fixit.fs with fully patched kernels will appear sometime
in the very near future.

Adrian
-- 
--------------------------------------------------------------------------
Adrian Hall					Connect Systems Manager
adrian@ibmpcug.co.uk				The IBM PC User Group
Tel: +44 81 863 1191				Harrow, London, UK