[HarfBuzz] not linking to libstdc++

Behdad Esfahbod behdad at behdad.org
Fri Nov 6 10:46:48 PST 2009

On 11/06/2009 02:46 AM, Martin Hosken wrote:
> Dear Behdad,
> I'm about to try adding graphite support as a contrib to harfbuzz-ng. Graphite itself is in C++ and so the linking code is going to have to bridge between C and C++. But I notice that you go to great lengths to ensure that harfbuzz doesn't link to libstdc++. I am wondering why this is the case.

Hi Martin,

Basically what Adam already said:  We don't want an unused libstdc++ 
dependency for GNOME.  That said, I need to figure out how to compile/link all 
the various backends and glue code.  Right now I have glue code for glib, 
FreeType, and ICU, and all are compiled into libharfbuzz.so.  Linking to ICU 
is also a problem for GNOME (at least right now).  So what I probably end up 
doing is to either:

   1) Move ICU code in libharfbuzz-icu.so.  Kind of an overkill since that 
library will expose one and only one function.

   2) Use dlopen so we can avoid linking to ICU.

The same can't be said about Graphite though since being a backend, we need to 
access it even if the user doesn't ask for it.  Having modules like Pango has 
may help here.  Again, this is something I have not figured out yet, but 
expect to figure out by winter time (which is about freeze time for GNOME).
In the mean time, the goal is to get all the code we need ported to this 
framework so we can call the API stable with some confidence.  So, thanks for 
looking into it.


> TIA,
> Yours,
> Martin

More information about the HarfBuzz mailing list