[openbeosstorage] libstdc++.r4.so

  • From: Oliver Tappe <zooey@xxxxxxxxxxxxxxx>
  • To: openbeosstorage@xxxxxxxxxxxxx
  • Date: Tue, 27 Jul 2004 21:52:10 +0200

Hi there,

I have been wrestling with the OBOS^H^H^H^HHaiku-provided libcppunit.so for 
several days only to find out that the crashes I observed were in fact 
caused by the buggy std::string implementation living in libstdc++.r4.so.
If anyone is interested, I have a small testprogram that exposes the bug(s) 
(on my machine).

Googling the net for more info on this didn't bring up much, but brought me 
here instead, to throw my 2cw into the discussion:

I learned from the archives that Haiku doesn't yet have libstdc++.r4.so but 
needs one, as several parts are already using it. This lib must be binary 
compatible with the one from R5. Someone mentioned that the source for the 
R5-version isn't available, but I wonder if this really is true. I (maybe 
naively) think that libstdc++.r4.so is just a collection of template 
instantiations, so the source is actually found in the headers...

If that's true, it should be possible to recreate the library like this:
1. find out which templates are actually contained in libstc++.r4.so
2. write a little tool that explicitly instantiatiates all the required 
   templates, and bundles them into a lib.

During my tests, I have found out that Zeta (maybe Dano, too) provides a 
different libstc++.r4.so, which contains a fixed std:string implementation. 
Surprisingly, the Zeta-version seems to contain a different set of 
template-instantiations, as I needed to relink to get my testprograms 
started.

During the next days, I will try to find out the exact differences between 
these two libraries and I will check if there's a way to extract a lib from 
the Zeta-(STL-)headers that is binary compatible with (but not as bad as) 
the R5-version.

Please shout if this is pointless...

cheers,
        Oliver

Other related posts: