Messages in this thread | | | Date | Wed, 17 Feb 1999 10:08:21 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | Re: Possible ld-so bug. |
| |
On Wed, 17 Feb 1999, Pavel Machek wrote:
> Hi! > > > Yes. The install does `mv library library.sav` ; `cp new_library library`. > > So, In principle, this should work. However it doesn't, apparently > > because one can only perform one operation at a time so at some instant, > > there is a new ld-linux.so and an old libc.n.n.so. And `mv`, `install`, > > 'cp`, etc. all use these libraries. This would not happen if the library > > version numbers were different because 'mv'. etc., would always use > > the library.n.n.so it was linked against. > > Hmm, you don't need to do it at same time. You just want to do it from > one executable. So if you do neccessary operations from midnight > commander (:-O) you should be ok. >
Yikes! If your "midnight commander" is like most, every copy or rename operation creates a child which execs `mv` and/or `cp`. They will get a heart-attack when half, but not all, the library is copied.
Easy way. I did it last night. I made a root-fs which had the limited tools that I required. It took 29 Mb (I could have make it smaller, but I didn't waste time gettng rid of a lot of stuff. I just got rid of /usr/doc, /usr/X11... /lib/X11, etc. I had already built the new glibc.
Then I booted, using the new root file-system. Then I mounted the old off from /mnt and installed glibc by modifing configparms. This puts the stuff where it will be on the old root.
Then I made a static copy of ldconfig.static, /sbin/mount.static, /sbin/umount.static, and /bin/bash.static.
I booted the original root at: init=/bin/bash.static, mounted the root fs r/w using mount.static, executed ldconfig.static, unmounted the fs using umount.static, and then hit the boot-switch.
Done. I now have the 'original' glibc-2.0.6, compiled with a later/better 'C' compiler, gcc-2.8.1. The original was compiled with gcc-2.7.2.
As I mentioned, there would not have been any of these problems if I was compiling and installing a later version of the C-library because none of the executables would have know about it, having been linked against the existing which would not have been touched.
What I should have done in the beginning is just bumped the minor version number of glibc and everybody would have been happy. However, If I had a problem with the library gnu.gurus might not appreciate that.
Cheers, Dick Johnson ***** FILE SYSTEM WAS MODIFIED ***** Penguin : Linux version 2.2.1 on an i686 machine (400.59 BogoMips). Warning : It's hard to remain at the trailing edge of technology. Wisdom : It's not a Y2K problem. It's a Y2Day problem.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |