On Thu, Sep 20, 2012 at 09:42:16AM +0100, Stuart Henderson wrote: > On 2012/09/19 22:06, Stefan Sperling wrote: > > On Wed, Sep 19, 2012 at 10:37:09PM +0300, Alexey Suslikov wrote: > > > Could you guide me how to rebuild/reinstall libc in a proper way? > > > > It's easy, just needs 11 steps. This is how I did it: > > > > 1) $ cd /usr/src/lib/libc > > 2) edit files > > 3) $ make obj > > 4) $ make clean > > 5) $ make > > 6) pray !!! > > 7) $ sudo make install > > 8) ??? > > 9) Realise that step 7) should really be: > > $ sudo cp /usr/lib/libc.so.66.0 /usr/lib/libc.so.66.0.bak > > $ sudo make install > > 10) reinstall system from snapshot > > see? step 6 was pointless! > > > 11) goto 2)
Plus sudo needs a shared libc, so if you break libc you cannot copy a working one back unless yhou already have a root shell available. I remember doing that quite often in the early days of my malloc work. -Otto