Coda File System

Re: coda 6.0.2 compile failure

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Mon, 13 Oct 2003 13:53:27 -0400
On Tue, Oct 07, 2003 at 04:22:32PM -0700, Eric Sandall wrote:
> > Could you send me the output of the configure run and the config.status
> > file. Oh, and the version of autoconf that you're using.
> 
> config.log and config.status attached (bzip2 compressed).
> 
> autoconf: 2.57

I looked all of this stuff over and configure detected everything
correctly and everything is just as it should be. However it looks like
your linker behaves differently from mine.

It wants to link for the MD5_Init function which is used in HashSecret,
however HashSecret isn't referenced at all by filerepair. I.e. my linker
seems to automatically discard unused functions in static libraries and
as a result not complain about missing functions.

Basically this would mean that with your linker, anything that is
linking against LIBBASE also needs to link against LIBCRYPTO. But with
my linker LIBCRYPTO is only necessary whenever we actually use the
HashSecret function.

I've committed the following patch to CVS that adds the library in
(hopefully) all places.

Jan

====================================================================

2003/10/13 13:52:19	<jaharkes_at_cs.cmu.edu>

	Include LIBCRYPTO whenever we link against LIBBASE. Some linkers don't
	discard unused functions from the static library.

    Modified files:
	coda/coda-src/asr/: Makefile.in 
	coda/coda-src/egasr/: Makefile.in 
	coda/coda-src/lka/: Makefile.in 
	coda/coda-src/portmapper/: Makefile.in 
	coda/coda-src/repair/: Makefile.in 
	coda/coda-src/sidekick/: Makefile.in 
	coda/coda-src/smon2/: Makefile.in 
	coda/coda-src/vice/: Makefile.in 
	coda/coda-src/volutil/: vol-backup.cc 
	coda/coda-src/vtools/: Makefile.in 

diff -Nru coda.orig/coda-src/asr/Makefile.in coda/coda-src/asr/Makefile.in
--- coda.orig/coda-src/asr/Makefile.in	2003/05/23 18:26:22	4.21
+++ coda/coda-src/asr/Makefile.in	2003/10/13 17:51:57
@@ -33,7 +33,7 @@
 HEADERS     = asr.h ruletypes.h
 
 DEPLIBS = $(LIBKERNDEP) $(LIBUTIL) $(LIBBASE)
-LIBS := $(DEPLIBS) $(LEXLIB) $(LIBS)
+LIBS := $(DEPLIBS) $(LEXLIB) $(LIBCRYPTO) $(LIBS)
 
 #uncomment if you want to turn on timing of the ASR 
 #PERSONAL_FLAGS= -DTIMING
diff -Nru coda.orig/coda-src/egasr/Makefile.in coda/coda-src/egasr/Makefile.in
--- coda.orig/coda-src/egasr/Makefile.in	2003/05/23 18:26:30	4.15
+++ coda/coda-src/egasr/Makefile.in	2003/10/13 17:51:57
@@ -31,7 +31,7 @@
 CSCRIPTS    = $(SCRIPTS)
 
 DEPLIBS := $(LIBDIRLIB) $(LIBKERNDEP) $(LIBBASE) $(LIBUTIL)
-LIBS := $(DEPLIBS) $(LIBRPC2) $(LIBLWP) $(LIBS)
+LIBS := $(DEPLIBS) $(LIBRPC2) $(LIBLWP) $(LIBCRYPTO) $(LIBS)
 
 removeinc: removeinc.o $(DEPLIBS)
 	$(CC) $(LDFLAGS) $^ ${LIBS} -o removeinc
diff -Nru coda.orig/coda-src/lka/Makefile.in coda/coda-src/lka/Makefile.in
--- coda.orig/coda-src/lka/Makefile.in	2003/05/23 18:26:34	1.4
+++ coda/coda-src/lka/Makefile.in	2003/10/13 17:51:57
@@ -32,7 +32,7 @@
 OBJS := lka.o shaprocs.o
 
 DEPLIBS := $(LIBUTIL) $(LIBRWCDB) $(LIBBASE)
-LIBS := $(DEPLIBS) $(LIBCRYPTO)
+LIBS := $(DEPLIBS) $(LIBCRYPTO) $(LIBS)
 
 include $(TOPDIR)/configs/Makerules
 
diff -Nru coda.orig/coda-src/portmapper/Makefile.in coda/coda-src/portmapper/Makefile.in
--- coda.orig/coda-src/portmapper/Makefile.in	2003/05/23 18:26:40	1.15
+++ coda/coda-src/portmapper/Makefile.in	2003/10/13 17:51:57
@@ -37,7 +37,7 @@
 SSBINS=rpc2portmap
 
 DEPLIBS := ${LIBBASE}
-LIBS := $(DEPLIBS) ${LIBRPC2} ${LIBLWP} ${LIBDL} ${LIBUTIL} $(LIBS)
+LIBS := $(DEPLIBS) ${LIBRPC2} ${LIBLWP} ${LIBDL} ${LIBUTIL} ${LIBCRYPTO} $(LIBS)
 
 libportmap.a: $(OBJS)
 
diff -Nru coda.orig/coda-src/repair/Makefile.in coda/coda-src/repair/Makefile.in
--- coda.orig/coda-src/repair/Makefile.in	2003/05/23 18:26:41	4.25
+++ coda/coda-src/repair/Makefile.in	2003/10/13 17:51:57
@@ -30,7 +30,7 @@
 
 DEPLIBS = $(LIBCLNREPAIR) $(LIBREPIO) $(LIBVV) $(LIBAUTH2) $(LIBKERNDEP) \
           $(LIBUTIL) $(LIBAUSER) $(LIBBASE)
-LIBS := $(DEPLIBS) $(LIBREADLINE) $(LIBTERMCAP) $(LIBS)
+LIBS := $(DEPLIBS) $(LIBREADLINE) $(LIBTERMCAP) $(LIBCRYPTO) $(LIBS)
 
 OFILES = 
 
diff -Nru coda.orig/coda-src/sidekick/Makefile.in coda/coda-src/sidekick/Makefile.in
--- coda.orig/coda-src/sidekick/Makefile.in	2003/05/23 18:26:53	1.7
+++ coda/coda-src/sidekick/Makefile.in	2003/10/13 17:51:57
@@ -34,7 +34,7 @@
 DEPLIBS := $(LIBUTIL) $(LIBVICEDEP) $(LIBCLNREPAIR) $(LIBREPIO) $(LIBVV) \
 	$(LIBAUTH2) $(LIBKERNDEP) $(LIBUTIL) $(LIBAUSER) $(LIBBASE)
 LIBS := $(DEPLIBS) $(LIBRPC2) $(LIBSE) $(LIBFAIL) $(LIBLWP) $(LIBSYS) \
-	$(LIBKVM) $(LIBREADLINE) $(LIBTERMCAP) $(LIBS)
+	$(LIBKVM) $(LIBREADLINE) $(LIBTERMCAP) $(LIBCRYPTO) $(LIBS)
 
 OBJS = adv_sidekick.o
 
diff -Nru coda.orig/coda-src/smon2/Makefile.in coda/coda-src/smon2/Makefile.in
--- coda.orig/coda-src/smon2/Makefile.in	2003/05/23 18:26:54	1.8
+++ coda/coda-src/smon2/Makefile.in	2003/10/13 17:51:57
@@ -29,7 +29,7 @@
 SBINS       = smon2 rpc2ping getvolinfo
 
 DEPLIBS = $(LIBVICEDEP) $(LIBSYS) $(LIBBASE)
-LIBS := $(DEPLIBS) $(LIBRPC2) $(LIBSE) $(LIBLWP) $(LIBS)
+LIBS := $(DEPLIBS) $(LIBRPC2) $(LIBSE) $(LIBLWP) $(LIBCRYPTO) $(LIBS)
 
 include $(TOPDIR)/configs/Makerules
 
diff -Nru coda.orig/coda-src/vice/Makefile.in coda/coda-src/vice/Makefile.in
--- coda.orig/coda-src/vice/Makefile.in	2003/05/23 18:27:22	4.46
+++ coda/coda-src/vice/Makefile.in	2003/10/13 17:51:57
@@ -69,7 +69,7 @@
 	$(CXX) $(LDFLAGS) srv.o ${objects} ${SRVLIBS} -o codasrv
 
 printvrdb: printvrdb.o 
-	$(CXX) ${LDFLAGS} printvrdb.o $(LIBUTIL) $(LIBBASE) $(LIBS) -o printvrdb
+	$(CXX) ${LDFLAGS} printvrdb.o $(LIBUTIL) $(LIBBASE) $(LIBCRYPTO) $(LIBS) -o printvrdb
 
 libviceerror.a: ViceErrorMsg.o
 
diff -Nru coda.orig/coda-src/volutil/vol-backup.cc coda/coda-src/volutil/vol-backup.cc
--- coda.orig/coda-src/volutil/vol-backup.cc	2003/07/23 21:41:28	4.24
+++ coda/coda-src/volutil/vol-backup.cc	2003/10/13 17:51:57
@@ -710,7 +710,6 @@
 		    rwVnode->cloned = 0;	// backupVnodes can't be cloned.
 		    rwVnode->versionvector.Flags = 0; // R/O vnodes shouldn't be inconsistent.
 		    rwVnode->vol_index = bvdop->vol_index;
-		    rwVnode->lock = bvdop->lock;	// Use the backupVnode's lock
 		    rwVnode->nextvn = bvdop->nextvn;
 
 		    rvmlib_modify_bytes(bvdop, rwVnode, (vclass == vLarge) ?
diff -Nru coda.orig/coda-src/vtools/Makefile.in coda/coda-src/vtools/Makefile.in
--- coda.orig/coda-src/vtools/Makefile.in	2003/06/02 13:27:40	4.30
+++ coda/coda-src/vtools/Makefile.in	2003/10/13 17:51:57
@@ -39,7 +39,7 @@
 CMON_LIBS   = $(LIBVICEDEP) $(LIBBASE)
 CFS_LIBS    = $(LIBKERNDEP) $(LIBUTIL) $(LIBBASE)
 HOARD_LIBS  = $(LIBUTIL) $(LIBKERNDEP) $(LIBBASE)
-STD_LIBS = $(LIBCURSES) $(LIBS)
+STD_LIBS = $(LIBCURSES) $(LIBCRYPTO) $(LIBS)
 
 CXXFLAGS := $(CXXFLAGS) -UVENUS
 
@@ -49,10 +49,10 @@
 	$(CXX) $(LDFLAGS) cmon.o $(CMON_LIBS) $(LIBRPC2) $(LIBSE) $(LIBLWP) $(LIBCOMPAT) $(STD_LIBS) -o cmon
 
 codacon: codacon.o $(LIBBASE)
-	$(CXX) $(LDFLAGS) codacon.o $(LIBBASE) $(LIBS) -o codacon
+	$(CXX) $(LDFLAGS) codacon.o $(LIBBASE) $(LIBCRYPTO) $(LIBS) -o codacon
 
 codaconfedit: codaconfedit.o $(LIBBASE)
-	$(CXX) $(LDFLAGS) codaconfedit.o $(LIBBASE) $(LIBS) -o codaconfedit
+	$(CXX) $(LDFLAGS) codaconfedit.o $(LIBBASE) $(LIBCRYPTO) $(LIBS) -o codaconfedit
 
 cfs:  cfs.o $(CFS_LIBS)
 	$(CXX) $(LDFLAGS) cfs.o $(CFS_LIBS) $(STD_LIBS) -o cfs
@@ -61,7 +61,7 @@
 	$(CXX) $(LDFLAGS) hoard.o $(HOARD_LIBS) $(STD_LIBS) -o hoard
 
 spy: spy.o $(LIBBASE)
-	$(CXX) $(LDFLAGS) spy.o $(LIBBASE) $(LIBS) -o spy
+	$(CXX) $(LDFLAGS) spy.o $(LIBBASE) $(LIBCRYPTO) $(LIBS) -o spy
 
 coda_replay: replay.o
 	$(CXX) $(LDFLAGS) replay.o $(LIBS) -o coda_replay
Received on 2003-10-13 13:58:48