On Sat, Apr 16, 2005 at 11:47:05PM +0100, Mike Hearn wrote: > I have a copy of Inkscape compiled with GCC 3.3, running on a GCC 3.4 > based system. All of the C++ libraries it links directly against, like > GTKmm, are statically linked. In other words, it dynamically links > against no C++ libraries. > > Inkscape dlopens libgtkspell, which in turn dlopens libaspell (to add > a spelling checker). libgtkspell is written in C, but libaspell is written > in C++ and exposes a C interface. > > This causes a crash, even though the GCC documentation explicitly says > this should work because the C++ standard library has symbol versioning > applied so the usual ELF cross-wiring mess is (theoretically) avoided.
Do we really promise somewhere that this will work? I know that we warn in other places that it probably will not. Yes, symbol versioning is present, and will avoid many problems, but there were also a couple of layout bugs in gcc 3.3 that were fixed in 3.4. These could cause code compiled by 3.3 to assume that fields of classes are at different positions than code compiled by 3.4. Such cases are not common, but it is another way to get a crash. > But this isn't what happens. Here is an LD_DEBUG=binding trace at the > point of the crash: > [ trace deleted ] I'm not enough of a linker expert to help you track this one down. I