Skip site navigation (1)Skip section navigation (2)
Date:               Sun, 13 Aug 1995 11:31:10 -0800
From:      "Jim Howard" <jiho@sierra.net>
To:        Faried Nawaz <fn@pain.csrv.uidaho.edu>, freebsd-questions@freefall.FreeBSD.org
Subject:         Re: gnumalloc 
Message-ID:  <199508132000.AA11270@diamond.sierra.net>

next in thread | raw e-mail | index | archive | help
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:

   <CD mount point>/filesys/usr/src/<bin | sbin>

At the top of each there is a file, Makefile.inc, which has these two
lines:

   BINDIR?=           </bin | /sbin>
   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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508132000.AA11270>