Patch: glibc update for Kylix 3 C++ package loading

By: John Kaster

Abstract: A patch now available for glibc 2.2.x will resolve package loading issues for Kylix 3 C++ edition.

Linux distributions using glibc 2.2.x will probably encounter issues loading the database and SOAP packages for the Kylix 3 IDE for C++. This patch resolves that issue.

This patch is relative to the glibc-2.2.5-mumble rpm from Red Hat 7.3 and is taken from the source rpm that was used to build the binaries that Borland's QA staff tested. The change is the same, modulo line numbers, for Mandrake 8.2, Mandrake 9, SuSE 8, and SuSE 8.1.

Note! The patch will fail on both Mandrake 8.2 and SuSE 8.0 (Mandrake 9 appears to be ok, and SuSE 8.1 is untested) because the trailing context is different. The "GL(dl_load_lock)" would need to be changed to "_dl_load_lock". Also, the user would need to go to the "elf" directory and apply the patch with "-p2" to avoid problems with differing directory names.

This is a very small patch that modifies the source code to glibc to resolve this contention problem when loading packages. Borland is not providing rpms, so as soon as you try and install your own glibc there's a good chance your system will no longer update correctly unless you build new rpms. To do that, you need to update the spec file correctly.

Because linux distributions vary, only general information on the steps required to do this are provided. You will need to be logged in as root.

  1. get the appropriate glibc source rpm for the distribution, and install it (as root):
  2. rpm -i glibc-blah.src.rpm
  3. copy the patch into the correct source directory. (For example, on Mandrake it's /usr/src/RPMS/SOURCES, and on Red Hat it's /usr/src/redhat/SOURCES.)
  4. Edit the spec file which might be /usr/src/RPMS/SPECS/glibc.spec and add this patch to the list of patches to apply. Note that the patch might need to be compressed with gzip or bzip2; if the other patches in the spec file are, then this one should be, too. Also, bump the version, which again requires making vendor-specific edits to the spec files.
  5. run
  6. rpm -ba /the/correct/path/to/the/correct/spec/file
    if patch complains that the changes are already present, stop and go back to work. if it throws a reject, then someone will need to study the source to see why.
  7. Have some sort of rescue media available because if something goes wrong on the next step, the machine may not reboot sucessfully. You may want to do a system backup.
  8. when that's done, find the build rpms, which could be somewhere like /usr/src/redhat/RPMS. Go there and update the appropriate packages. If everything works,
  9. rpm -F -Uvh *.rpm
    will do the right thing.

Mandrake 9 and Red Hat 7.3 use version glibc-2.2.5-x. Mandrake 8.2 and SuSE-8 use glibc-2.2.4-x.

Please note! This is an unsupported patch. If you are not comfortable with patching glibc, Borland recommends that you upgrade your Linux distribution to one that contains a recent version of glibc.

You can download the patch from CodeCentral.


Server Response from: ETNASC03