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

How to transition to G++ 3.2 wthout any breakage

Here is a plan on how to do so. It requires to modify dpkg but allows
complete compatibility and no breakage of binaries (building with
G++-2.95 would no longer work unless wrappers are written).

1. Create a new version of dpkg that does the following;

In the postinst script it checks whether /usr/lib/g++-2.95 is present
and if it isn't it scans symbols in all libraries to determine their ABI
(symbols are mangled differently so this is possible) and moves all
libraries with g++-2.95 mangled names in /usr/lib/g++-2.95 and modifies
/var/lib/dpkg/info/<package>.list/shlibs accordingly.
Then it scans all binaries in the same ways and automatically builds
wrapper scripts that adjust LD_LIBRARY_PATH and modifies the .info files

At every package installation, it checks whether the package to install
depends on either this new version of dpkg or libstdc++5 or if some
dependency depends on either.
If so, it installs it normally (checking ABIs wouldn't hurt, but it's
Otherwise it checks and moves libraries and binaries as above (before
installing it to avoid conflicts).

2. Stop autobuilding of C++ programs and libraries and set GCC 3.2 to be
the default. No GCC 3.1 libraries or binaries may be built or uploaded
from this point in time unless they explicitly set the desired compiler
and until their dependencies are also converted to GCC 3.2. The new gcc
package must be dependent on the new dpkg.

3. Modify C++ library packages to have a 'c' suffix and make them
pre-depend on the new dpkg (and must do so forever until the new version
of dpkg is guaranteed to be installed). They must not conflict with the
old ones. The pre-dependency is required so that the dpkg postinst
script will prevent conflicts with old libraries by moving them to

4. Recompile C++ binary packages. shlibs should automatically make them
dependent on GCC 3.2 libraries.

If the user wants to compile with g++-2.95 and extra c++ libraries or
install g++-2.95 binary packages without using dpkg, he is responsible
for taking the necessary steps himself. Alternatively scripts may be
provided for this.

IMHO this is the proper way to handle this, requires minimal
intervention by maintainers and allows to automagically install any .deb
or .rpm regardless of the ABI they use since dpkg will check and fix
(for .rpm's the new dpkg must be manually installed beforehand - new
alien versions should also depend on the new dpkg).

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: