After confirming with someone competent, I'm clear that there is no way ever to use more than one libstdc++ version concurrently in one OS process.
Therefore, my question is now purely: How do you compile a port and all of its dependencies that use G++, with a specific G++ version e.g. /usr/local/bin/eg++? Also then, how install these in a separate directory/directory structure as not to mess up other programs by interfering with the ordinary OS-preinstalled versions of the same libraries, that should indeed remain compiled with the OS-bundled G++ version Thanks! Mikael 2013/11/29 Mikael <mikael.tr...@gmail.com> > Dear list, > > I've seen issues where a process links to one library compiled with the > OS-bundled G++ version and another that's compiled with a newer G++ version > (4.7 etc.). Libraries include boost, QT and their C++-based dependencies. > > I raise this question as there are instances when a newer G++ version is > required for a project to work at all (because of compiler version > specifics, C++X11 support etc). > > > The typical error I've seen, is that exception handling goes bazonkas: > > As soon as the default exception handler is trigged, an error message is > printed and then the process SIGSEGV:s. > > Also, ordinary exception handling may malfunction and lead to SIGSEGV. > > > Picking up what others say on this, > > * #gcc on FreeNode say libstdc++ versions are *not* intercompatible with > each others, > > and also they say newer libstdc++ versions are *not* providing > backwards compatibility with older ones > > * FreeBSD published a workaround to the libstdc++ compatibility issue > using their "libmap.conf" feature: > http://www.freebsd.org/doc/en/articles/custom-gcc/article.html . > > > > What is OpenBSD's take on this?; > > What's the best practice? > > If the only way is to actually recompile all dependency libraries in the > newer G++ version, then, is there a way to build ports and their > dependencies with a specific G++ version and then install them all in a > separate directory i.e. /usr/local/lib/g++-4.7-compiled/ ? > > Thanks! > Mikael