Since Autopackage 1.2, each package contains two different versions of each binary - one for each ABI so this problem is no longer critical.
This is easily one of the most troublesome binary compatibility problems we've found so far. Unfortunately the GCC people seem unlikely to fix it anytime soon.
At the GCC summit a new solution based on __attribute__((strong)) was proposed by a couple of Intel employees. It is not currently implemented and involves transparent modification of the namespaces in which symbols reside (so it doesn't solve anything for C based apps).
When we provide a separate binary for each ABI in 1.2 the problem will be masked (but we should still push for it to be fixed). For 1.0.x we have to hack around each instance of it in turn. There is no global solution known currently.
SDL/aRts
Something like the following as an LD_PRELOAD should work:
void *dlopen(char *path, int mode)
{
if (!strcmp(path, "libartsc.so.0")) return dlmopen(RTLD_DEFAULT, "libartsc.so.0 was suppressed", mode);
return dlmopen(RTLD_DEFAULT, path, mode);
}
dlmopen is like dlopen except with an extra feature, which allows for namespace control. Unfortunately this feature is also buggy and caused crashes inside the dynamic linker when I tried it, so we have to go for the scattergun approach of just disabling dlopen of aRts entirely. As SDL dlopens the library and most other programs won't, this seems to work OK for now.
We have to call it even in the suppression case (rather than return NULL) because SDL checks dlerror and crashes if it's not set: therefore, we always have to call into the real dynamic linker even if we want to return NULL.
