[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

new libc working on gnu-0.2!

I have successfully upgraded my gnu-0.2 machine to use the current
glibc-2.1 development version and everything seems to work (with binaries
for the hurd and everything else still the gnu-0.2 binaries).  Here are
some details and gotchas for using current libc with gnu-0.2 binaries.

First of all, we are very grateful to Mark Kettenis <kettenis@phys.uva.nl>
for doing most of the actual work to make this happen, and for Herculean
feats of patience waiting for me to merge his changes in.
Let's hear it for Mark!

This is NOT the glibc-2.0.105 prerelease, you need a newer version from the
CVS repository (or 2.0.106 or later, whenever Ulrich puts that out).
Specifically, if and only if your libc/ChangeLog has the following log
entry, then your sources are recent enough; otherwise you need to do a cvs

     1998-12-04  Mark Kettenis  <kettenis@phys.uva.nl>

	     Provide backwards binary compatibility for the Hurd.
	     * hurd/geteuids.c [PIC && DO_VERSIONING]: Make __getuids a weak
	     alias for geteuids.
	     * hurd/Versions [GLIBC_2.0]: Add __getuids,
	     __hurd_file_name_lookup and _hurd_umask.
	     [GLIBC_2.1]: Add _hurd_proc_init.
	     * hurd/Makefile [versioning] (routines): Add compat-20.
	     (shared-only-routines): Likewise.
	     * hurd/hurdinit.c (_hurd_new_proc_init): Renamed from
	     _hurd_proc_init.  Use it as the default _hurd_proc_init version
	     for GLIBC_2.1.
	     * hurd/compat-20.c: New file.
	     * mach/Versions [GLIBC_2.0]: Add __vm_allocate.

I have only done a cross-build (from Linux with egcs-1.1b), not a native
build.  When cross-building, `make install' with install_root set works ok.
I don't know if the native `make install' for libc works, probably not.

Gotchas for installing new libc binaries on a gnu-0.2 system:

* You must install (at least) ld.so, libc.so, and libdl.so all at once
  (that is, the foo-2.N.M.so file and the foo.so.N symlink for each foo.so).
  You probably won't be able to run any programs at all if you have some
  but not all of these upgraded to the new binaries, or if the symlinks get
  messed up.

* You must make sure the symlink /lib/ld.so -> ld.so.1 is there.  Note that
  libc's `make install' will NOT install `ld.so' for you, only `ld.so.1'.
  If you do not have a /lib/ld.so or your /lib/ld.so does not point to the
  ld.so.1 that goes with your libc.so.0.2, then you will not be able to run
  any programs.

At the moment, the easiest thing to do is to mount your hurd partition from
another OS (linux if you're using ext2fs, *BSD if you're using ufs) and
write it there.  On FreeBSD I had to use `mount -o force', and remember
never to run a BSD fsck on your Hurd ufs partition!  (BSD will ask you to,
but you must not!)

If you are really clever you will do it all in a single mv command, like
"mv -f /where-you-installed-libc/lib/*.so* /lib/" (but make sure that
directory has only what libc installed, not other libraries you aren't
ready to upgrade yet!).  But I botched it several times myself and had to
use the other-OS approach to fix my mistakes.

Hopefully soon there will be a debian package so you can use dpkg to
install the .so's that must be installed together in the same command.


Reply to: