From owner-freebsd-questions Sun Aug 13 13:00:47 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id NAA01843 for questions-outgoing; Sun, 13 Aug 1995 13:00:47 -0700 Received: from diamond.sierra.net (diamond.sierra.net [204.94.39.235]) by freefall.FreeBSD.org (8.6.11/8.6.6) with SMTP id NAA01837 for ; Sun, 13 Aug 1995 13:00:45 -0700 Received: from martis-d226.sierra.net by diamond.sierra.net with SMTP id AA11270 (5.67b8/IDA-1.5 for ); Sun, 13 Aug 1995 13:00:34 -0700 Message-Id: <199508132000.AA11270@diamond.sierra.net> From: "Jim Howard" To: Faried Nawaz , freebsd-questions@freefall.FreeBSD.org Date: Sun, 13 Aug 1995 11:31:10 -0800 Subject: Re: gnumalloc Reply-To: jiho@sierra.net Priority: normal X-Mailer: Pegasus Mail/Windows (v1.22) Sender: questions-owner@FreeBSD.org Precedence: bulk Faried Nawaz wants to know: > how did you compile things in /bin and /sbin with shared libraries? > is your /usr/lib in the same partition as / ? or did you do something > with ldconfig and ld.so? i'm curious because i've never tried it, but > wanted to... Yes, everything is in the same partition. My notes are terrible on this, so bear with me, but this is basically how I went about it: I copied the source trees for /bin and /sbin, in bulk, off the CD-ROM where they are present as: /filesys/usr/src/ At the top of each there is a file, Makefile.inc, which has these two lines: BINDIR?= NOSHARED?= YES I changed the BINDIRs to bogus temporary destinations, so the installs wouldn't overwrite the existing directories. And of course, I changed NOSHARED to NO. I think I patched those lines into the respective Makefile at the top of each tree, on the assumption that this was done automatically by a script I would not be executing. The compile/install cycles went off without a hitch, except that afterwards I think I had to create some symbolic links in the new directories by hand. I then moved the old directories out and the new ones in, rebooted and got blown away, because not only did everything work fine, I could tell no difference in how long it took to bring up the command line. (If you actually timed some scripts you'd probably see a substantial performance loss, though, so servers might complain.) In removing the old directories, there were a number of files that refused to remove (especially init). I think I had to run the chflags command on those files to change their flags, before I could get rid of them and their directories. Faried then nudges me gently with the following: > I'm actually interested in rebuilding just about everything to > use GNU malloc(). > > how about replacing the malloc in libc with it? thanks to shared > libraries, once you install the libc with the gnu malloc, everything > dynamically linked with libc will use it. Good point, which is probably why it hadn't occured to me yet. That's also why replacing /bin and /sbin works transparently, come to think of it. And it means you don't have to rebuild X anyway.