Subject: more adventures in tracking -current....
To: NetBSD-current Discussion List <current-users@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 04/06/2001 14:15:14
I had posted somewhere the other day about yacc not always being run
after it had been replaced....
Sometimes the problem seems to be that mkdep doesn't get run when
necessary and that means subsequent things don't get done when necessary
either (eg. yacc).
After going through much the same process again on another architecture
I'm beginning to see that lots of the problems are in /usr/src/gnu. I'm
guessing that the build system over there just isn't as robust.
Actually the current problem I'm noticing is that some binutils things
can depend on header files built in other directories but never
installed in /usr/include where they should be (eg. "bfd.h"). No source
directory should ever look in another's "obj" directory for any
component, and especially not ever a header file!!!! That's what "make
includes" is for!!!!
This laziness in the binutils area seems to be due in part to the
sillyness using .PATH to pull things out of a "distrib" directory
instead of properly converting the build system and moving everything
into its logical place in the source tree. What a mess it is now.
Here are some more minor issues that might be encountered by someone
like me who only occasionally makes jumps up to the bleeding edge. They
are presented in the form of fixes to UPDATING:
Index: UPDATING
===================================================================
RCS file: /cvs/NetBSD/src/UPDATING,v
retrieving revision 1.1.1.2
diff -c -c -r1.1.1.2 UPDATING
*** UPDATING 2001/03/25 05:47:41 1.1.1.2
--- UPDATING 2001/04/06 08:07:01
***************
*** 1,3 ****
--- 1,4 ----
+ -*- indented-text -*-
$NetBSD: UPDATING,v 1.22 2001/03/06 19:03:31 jmc Exp $
This file is intended to be a brief introduction to the build
***************
*** 41,50 ****
needs to be installed before make build.
20010114:
! introduce .if commands(target) in make(1). You need to
! bring everything up-to-date first, then without installing
! anything make and install in /usr/bin/make, then proceed
! with make build.
20010101:
bsd.subdir.mk committed 20001230 had a bug which caused
--- 42,56 ----
needs to be installed before make build.
20010114:
! introduced .if commands(target) in make(1). You need to bring
! all your source up-to-date first, then without installing
! anything make and install in /usr/bin/make, then proceed with
! make build. If you accidentally install new share/mk files over
! top of your old ones that work with your current version of make
! you'll have to edit the offending file(s) [currently only
! bsd.prog.mk] and temporarily edit out the offending line(s) and
! their corresponding .endif's. WARNING: Makefile.boot is
! currently broken and will not work!
20010101:
bsd.subdir.mk committed 20001230 had a bug which caused
***************
*** 72,78 ****
--- 78,119 ----
MKCRYPTO and friends added to share/mk/bsd.own.mk.
'cd share/mk ; make install' needed before make build.
+ 20000603:
+ Modifications to all the RPC-related stuff require a number of
+ things to be re-built and re-installed:
+
+ * install src/etc/netconfig to /etc/netconfig
+ cd /usr/src/etc ; make /etc/netconfig
+ * install the new user header files
+ cd /usr/src/include ; make includes
+ * install the new system header files
+ cd /usr/src/sys ; make includes
+ * install the new rpcgen
+ cd usr/src/usr.bin/rpcgen ; make cleandir all install cleandir
+
+ you can probably skip the next four steps if you're doing a
+ "make build" anyway [do not forget to do a "make cleandir" in
+ /usr/src/lib/librpcsvc first if you plan to do it with
+ UPDATE=1]:
+
+ * reinstall librpcsvc
+ cd /usr/src/lib/librpcsvc ; make cleandir dependall install
+ * reinstall include files in libc
+ cd /usr/src/lib/libc ; make includes
+ * recompile and reinstall libc
+ cd /usr/src/lib/libc ; make dependall install
+ * compile and install /usr/src/usr.sbin/rpcbind
+ cd /usr/src/usr.sbin/rpcbind ; make clean dependall install
+
+ before rebooting:
+
+ * since portmap is now gone, and has been replaced by rpcbind,
+ you should install new rc.d scripts from src/etc/rc.d (or,
+ at least, the ones that used to reference portmap, and the
+ new rpcbind itself)
+ * edit rc.conf, and replace "portmap" by "rpcbind"
+
Hints for a more successful build:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Build a new kernel first:
***************
*** 107,113 ****
This keeps critical utilities current enough to not choke
on any other part of the source tree that depends on up to
date functionality.
!
What to do if things don't work:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When things don't work there is usually a few things that commonly
--- 148,154 ----
This keeps critical utilities current enough to not choke
on any other part of the source tree that depends on up to
date functionality.
!
What to do if things don't work:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When things don't work there is usually a few things that commonly
***************
*** 198,203 ****
--- 239,248 ----
Symptom:
Fix: rm /usr/lib/libbfd.a
+ Symptom:Make can't build /usr/lib/crtbegin.o
+ Fix: http://www.netbsd.org/Documentation/elf.html#updating-from-a.out
+ (or upgrade to an ELF snapshot first)
+
Symptom:Obsolete intermediate files are used during compilation
Fix: Try the following sequence of commands in the directory in question.
make cleandir; rm `make print-objdir`; make cleandir; make obj
***************
*** 212,220 ****
Symptom:undefined reference to `__assert13'
Fix: Rebuild and install lib/libc
Symptom:usr.sbin/config fails to build.
! Fix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
Symptom:undefined reference to `getprogname' or `setprogname'
! Fix: Rebuild and install lib/libc
--- 257,286 ----
Symptom:undefined reference to `__assert13'
Fix: Rebuild and install lib/libc
+ Use "make CPPFLAGS=-DNDEBUG" to build any individual tool that
+ might be needed to simplify the rebuild of lib/libc.
Symptom:usr.sbin/config fails to build.
! Fix: Try building with -DMAKE_BOOTSTRAP added to CPPFLAGS in Makefile
! or on the command line.
Symptom:undefined reference to `getprogname' or `setprogname'
! Fix: "make includes" (in include) and then rebuild and install lib/libc
!
! Symptom:implicit declaration of function `__libyyparse'
! Fix: reinstall yacc then remove obj/*.c in the directory where the
! build failed
!
! Symptom:bootparam_prot_svc.o: In function `bootparamprog_1':
! bootparam_prot_svc.o(.text+0x148): undefined reference to `bootparamprog_1_freeresult'
! Fix: Rebuild and re-install usr.bin/rpcgen, again.
!
! Symptom:mklocale: not found
! Fix: build and install usr.bin/mklocale
!
! Symptom:undefined reference to `ELF_NOTE_TYPE_NETBSD_TAG'
! Fix: If you've already installed lib/lic then first back out the
! latest /usr/lib/libc.so.12.* and re-link libc.so.12 to the
! previous version. Then make sure all includes are up-to-date,
! especially <elf.h> then rebuild and re-install lib/csu. Finally
! re-build and re-install lib/libc.
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>