From owner-freebsd-current Sat Apr 10 9:17: 7 1999 Delivered-To: freebsd-current@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 330D614F98 for ; Sat, 10 Apr 1999 09:17:04 -0700 (PDT) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.1) with ESMTP id JAA28349; Sat, 10 Apr 1999 09:14:51 -0700 (PDT) (envelope-from jdp@polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id JAA34261; Sat, 10 Apr 1999 09:14:51 -0700 (PDT) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199904100848.KAA93819@greenpeace.grondar.za> Date: Sat, 10 Apr 1999 09:14:51 -0700 (PDT) Organization: Polstra & Co., Inc. From: John Polstra To: Mark Murray Subject: RE: Libraries with library dependancies Cc: current@freebsd.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mark Murray wrote: > > The "undefined references" are all in libmd which is listed as above > in libcrypt's Makefile. > > I would hate to have to hunt down all usages of -lcrypt to add -lmd. As Peter already mentioned, the problem is that library dependencies aren't recorded in archive libraries. I ran into a similar problem for static PAM. After some discussion with Bruce, I held my nose and put this into bsd.libnames.mk: # The static PAM library doesn't know its secondary dependencies, # so we have to specify them explictly. LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a # XXX doesn't exist MINUSLPAM?= -lpam .if defined(NOSHARED) && ${NOSHARED} != "no" && ${NOSHARED} != "NO" .ifdef MAKE_KERBEROS4 LIBPAM+= ${LIBKRB} ${LIBDES} MINUSLPAM+= -lkrb -ldes .endif LIBPAM+= ${LIBRADIUS} ${LIBTACPLUS} ${LIBSKEY} ${LIBCRYPT} ${LIBMD} MINUSLPAM+= -lradius -ltacplus -lskey -lcrypt -lmd .endif Then in utilities such a login: DPADD+= ${LIBPAM} LDADD+= ${MINUSLPAM} This could get out of hand pretty quickly, but it may be the most reasonable solution at this time. John --- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-interest is the aphrodisiac of belief." -- James V. DeLong To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message