0.20 build & install problems on i386 netbsd1.3H

Ken Raeburn raeburn at raeburn.org
Mon Dec 28 17:12:26 CET 1998


I downloaded 0.20 and configured it with

	../configure --with-krb4=/usr/kerberos --with-sys=....

The with-krb4 was probably a mistake, in retrospect, since I was
pointing it to CNS yet it would still pick up a libkafs from /usr/lib,
which was built against a different version of Kerberos.  (It might be
okay, but for sanity's sake it should be made consistent.)  But I
don't think my problems are related to that.  The main thing here is
that $srcdir!=".".

In lib/acl, the "include" directory in the source tree wasn't being
used, but it's needed for stds.h.  In rx, there was a typo in the
pathname used to get the include directory from the source tree, but
that appears not to have stopped it from compiling.

NetBSD "sed" doesn't like multiple commands being given as one in the
xfs/bsd/bin directory.  Since they are two clearly separate
substitution commands in the makefile, why not issue them as two
separate "-e" options?  And while we're at it, how about not touching
the destination file until after we know the sed command worked?  The
compiler is usually good about getting rid of output files when
something goes wrong, but make and output redirection aren't so
friendly.

Some patches are below.


On NetBSD, the selection of KERNEL_CFLAGS gets the -I options using
the installed make include files.  It thus ignores the --with-sys
given on the command line (though it is used elsewhere); I had to make
/sys point to the kernel sources I wanted to use.  Not a major deal,
but it might be helpful to document it, and maybe put consistency
checks into configure.in.

Yes, of course, having bsd.kmod.mk and /sys correct is important for
building kernel modules, but having the --with-sys=DIR option gives
the illusion that it's not so important in this case.  (And in my
case, I haven't built any other kernel modules on this system, so they
weren't correct.)


Afer I got stuff compiled and installed, I couldn't load xfs_mod.o
into my kernel; several routines were undefined.

../../../xfs/bsd/xfs_wrap-bsd.c:101: Undefined symbol `_xfs_stat_filesys' referenced from text segment
../../../xfs/bsd/xfs_wrap-bsd.c:130: Undefined symbol `_xfs_may_uninstall_filesys' referenced from text segment
../../../xfs/bsd/xfs_vfsops-common.c:263: Undefined symbol `_make_dead_vnode' referenced from text segment

>From a spot check, it looks to me like maybe the 1998-12-23 change

	* xfs/bsd/xfs_vfsops.c: move all xfs initialization code into
	xfs_vfsops-*bsd.c

was not completed, or something.  (I haven't tried 0.19, maybe it
didn't work before this change either.)

I could find make_dead_vnode defined in xfs_vfsops-osf.c but nowhere
else, and referenced in xfs_vfsops-common.c.  I couldn't find any
definition of xfs_may_uninstall_filesys, anywhere.  And
xfs_stat_filesys is used in xfs_wrap-bsd.c, but appears to get defined
only on the rhapsody platform.

On the up side, arlad in test mode did appear to work on the first
try, as did a few vos commands, against the athena.mit.edu cell.

Ken

~~~~~~~~~~~~~~~~

--- ../../arla-0.20/INSTALL	Wed Dec 23 21:14:46 1998
+++ ./INSTALL	Mon Dec 28 00:29:47 1998
@@ -144,7 +144,7 @@ something like the following commands:
   mkdir /lkm
   cp /usr/arla/bin/xfs_mod.o /lkm/xfs_mod.o
   
-And mount_xfs vill load the filesystem into the kernel.
+And mount_xfs will load the filesystem into the kernel.
 
 Solaris:
 
--- ../../arla-0.20/lib/acl/Makefile.in	Wed Dec 23 21:15:28 1998
+++ ./lib/acl/Makefile.in	Sun Dec 27 23:53:13 1998
@@ -22,7 +22,7 @@ prefix = @prefix@
 exec_prefix = @exec_prefix@
 libdir = @libdir@
 
-INCLUDES = -I../../include \
+INCLUDES = -I../../include -I$(srcdir)/../../include \
 	   -I$(srcdir) \
 	   -I.
 REALCFLAGS = $(INCLUDES) @KRB_INC_FLAGS@ $(CFLAGS)
--- ../../arla-0.20/rx/Makefile.in	Wed Dec 23 21:16:07 1998
+++ ./rx/Makefile.in	Sun Dec 27 23:56:19 1998
@@ -22,7 +22,7 @@ libdir		= @libdir@
 
 DEFS		= @DEFS@ -DRXDEBUG
 CFLAGS		= @CFLAGS@
-INCLUDES	= -I$(srcdir) -I../include -I$(srcdir)/..include \
+INCLUDES	= -I$(srcdir) -I../include -I$(srcdir)/../include \
 		  @KRB_INC_FLAGS@
 
 LIB = librx.a
--- ../../arla-0.20/xfs/bsd/bin/Makefile.in	Wed Dec 23 21:16:53 1998
+++ ./xfs/bsd/bin/Makefile.in	Mon Dec 28 00:12:43 1998
@@ -52,8 +52,9 @@ clean:
 	$(RM) -f $(PROGS) startarla *.o *~
 
 startarla: startarla.in
-	sed -e ' s!%bindir%!$(bindir)! ; s!%ARLACACHEDIR%!$(ARLACACHEDIR)!'  $(srcdir)/startarla.in > $@
-	chmod +x $@
+	sed -e 's!%bindir%!$(bindir)!' -e 's!%ARLACACHEDIR%!$(ARLACACHEDIR)!'  $(srcdir)/startarla.in > $@.new
+	chmod +x $@.new
+	mv -f $@.new $@
 
 Makefile: Makefile.in ../../../config.status
 	cd ../../.. ; CONFIG_FILES=xfs/bsd/bin/Makefile CONFIG_HEADERS= $(SHELL) config.status






More information about the Arla-drinkers mailing list