Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site cbosgd.UUCP Path: utzoo!linus!decvax!harpo!eagle!mhuxl!houxm!ihnp4!cbosgd!mark From: mark@cbosgd.UUCP Newsgroups: net.bugs.4bsd Subject: libdbm is broken in 4.2 Message-ID: <635@cbosgd.UUCP> Date: Mon, 21-Nov-83 23:53:00 EST Article-I.D.: cbosgd.635 Posted: Mon Nov 21 23:53:00 1983 Date-Received: Wed, 23-Nov-83 04:50:55 EST Distribution: net Organization: AT&T Bell Laboratories, Columbus Lines: 33 If you try to compile any program in 4.2BSD using -ldbm, you'll get the following diagnostics: _environ: ld:/usr/lib/libdbm.a: multiply defined start: /usr/lib/libdbm.a: multiply defined _moncontrol: /usr/lib/libdbm.a: multiply defined mcount: /usr/lib/libdbm.a: multiply defined It turns out the problem is the makefile, which loads (with libc) the dbm.o file and installs that as libdbm.a instead of the usual archive of object files. Here is the fix: *** 2,10 # CFLAGS=-O ! libdbm.a: dbm.c ! libdbm.a: dbm.h ! ${CC} -o libdbm.a ${CFLAGS} dbm.c install: install -m 644 libdbm.a $(DESTDIR)/usr/lib --- 2,12 ----- # CFLAGS=-O ! libdbm.a: dbm.o ! ar rv libdbm.a dbm.o ! ! dbm.o: dbm.h dbm.c ! ${CC} -c ${CFLAGS} dbm.c install: install -m 644 libdbm.a $(DESTDIR)/usr/lib