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
(I may be the clueless one here so don't take this for granted) In my mind the best result you'll get here is when the snapshot has a newer libc (e.g. libc.so.66.1) your packages may still be linked against your new libc.so.66.0 but nothing in the base system will. AFAICT at least the tools in /bin and /sbin are statically linked and would need to be rebuilt to include any changes in libc. To take into account statically built binaries and since basically everything else depends on libc, my advise is to rebuild/install at least the whole base system from source. This way you should be able to test if your system survives a reboot and some basic system usage with your changes included. (You may actually need to build the base system once more to check if the build itself didn't break) Eventually xenocara and probably a ports bulk build would be necessary as well. > 11) goto 2)