Date: Sat, 10 Apr 1999 09:34:36 -0400 (EDT) From: Brian Feldman <green@unixhelp.org> To: Peter Wemm <peter@spinner.netplex.com.au> Cc: Mark Murray <mark@grondar.za>, jdp@FreeBSD.ORG, obrien@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: Libraries with library dependancies Message-ID: <Pine.BSF.4.05.9904100930420.69973-100000@janus.syracuse.net> In-Reply-To: <19990410101057.EF0BC1F4D@spinner.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 10 Apr 1999, Peter Wemm wrote: > Mark Murray wrote: > > Hi > > > > I've been helping somebody along with getting the new libcrypt going, > > and something has broken recently (post-egcs?), and I'm having a wee > > problem debugging it. > > > > Libcrypt uses routines out of libmd (MD[45]* and SHA*), and a while > > back (pre-egcs), it was possible to have an "LDADD+=-lmd" in libcrypt's > > Makefile and have anything using libcrypt also automagically pick up the > > -lmd dependancy requirement. This no longer seems to work: > > > > cc -O -pipe -I/usr/src/gnu/usr.bin/perl/miniperl/../../../../contrib/perl5 -I > /usr/obj/usr/src/gnu/usr.bin/perl/miniperl -I/usr/obj/usr/src/tmp/usr/inc > lude -c /usr/src/gnu/usr.bin/perl/miniperl/../../../../contrib/perl5/minipe > rlmain.c > > cc -O -pipe -I/usr/src/gnu/usr.bin/perl/miniperl/../../../../contrib/perl5 -I > /usr/obj/usr/src/gnu/usr.bin/perl/miniperl -I/usr/obj/usr/src/tmp/usr/inc > lude -static -o miniperl miniperlmain.o -lperl -lm -lcrypt > ^^^^^^^^^^^^^^^ > > /usr/obj/usr/src/tmp/usr/lib/libcrypt.a(crypt-shs.o): In function `crypt_shs' > : > > crypt-shs.o(.text+0x11): undefined reference to `SHA_Init' > > crypt-shs.o(.text+0x1f): undefined reference to `SHA_Update' > > crypt-shs.o(.text+0x3c): undefined reference to `SHA_Update' > > > > The "undefined references" are all in libmd which is listed as above > > in libcrypt's Makefile. > > This is only the case for -static.. Shared libraries have dependency > information, static libraries do not. > > > I would hate to have to hunt down all usages of -lcrypt to add -lmd. > > It would affect ports too, breaking a lot of things that know about -lcrypt > and have never heard of -lmd. > > The way I see it, you've got several choices.. > > 1) add -lmd for the cases where things are compiled static and leave the > rest > > 2) compile libcrypt.a differently to libcrypt.so, ie: add in the md*.o and > sha*.o static binaries into libcrypt by using SRCS+= sha.c in the !PIC case YES! Make the mdXXX symbols all weak, so libmd can be added manually! > > 3) help move ld.so to / so we can link everything dynamic.. :-) ld.so, ld-elf.so.1 SHOULD be in /, and fschg. They're definitely up there in importance with the kernel. This would allow something nice: /stand being a storage location for shared libraries. /stand meaning "standalone", hinting that only the root partition is necessary to run a shared program if necessary... let's move /usr/lib ELF libraries to /stand and keep all a.out and static libs (other than libgcc, foo) in /usr/lib. On the other hand, maybe that's a little radical! > > Cheers, > -Peter > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > Brian Feldman _ __ ___ ____ ___ ___ ___ green@unixhelp.org _ __ ___ | _ ) __| \ FreeBSD: The Power to Serve! _ __ | _ \__ \ |) | http://www.freebsd.org _ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9904100930420.69973-100000>