Search code examples
centosharfbuzz

installing harfbuzz 1.0.1 on CentOS 5


I'm trying to install harfbuzz-1.0.1 on a CentOS 5 machine where I do NOT have sudo access, and hence need to install into non-standard locations. I have downloaded and unpacked the source code, and added what I believe to be the relevant dependences to my $PKG_CONFIG_PATH. These packages include:

  • freetype2
  • icu-uc

Checking that '$PKG_CONFIG_PATH` is correct:

$pkg-config --modversion freetype2
9.22.3
$pkg-config --modversion icu-uc
55.1

Within the unpacked source directory, I ran:

$ ./configure --prefix=/some/custom/path
# produces lots of output, but summary here
Build configuration:

Unicode callbacks (you want at least one):
    Glib:           true
    ICU:            true
    UCDN:           false

Font callbacks (the more the better):
    FreeType:       false

Tools used for command-line utilities:
    Cairo:          true
    Fontconfig:     true

Additional shapers (the more the better):
    Graphite2:      false

Platform shapers (not normally needed):
    CoreText:       false
    Uniscribe:      false

Other features:
    Documentation:      no
    GObject bindings:   false
    Introspection:      false

However, make fails with the following error:

In file included from hb-glib.cc:31:0:
hb-glib.h:50:22: error: 'GBytes' was not declared in this scope
 hb_glib_blob_create (GBytes *gbytes);
                      ^
hb-glib.h:50:30: error: 'gbytes' was not declared in this scope
 hb_glib_blob_create (GBytes *gbytes);
                              ^
hb-glib.cc:389:22: error: redefinition of 'hb_blob_t* hb_glib_blob_create'
 hb_glib_blob_create (GBytes *gbytes)
                      ^
In file included from hb-glib.cc:31:0:
hb-glib.h:50:1: error: 'hb_blob_t* hb_glib_blob_create' previously defined here
 hb_glib_blob_create (GBytes *gbytes);
 ^
hb-glib.cc:389:22: error: 'GBytes' was not declared in this scope
 hb_glib_blob_create (GBytes *gbytes)
                      ^
hb-glib.cc:389:30: error: 'gbytes' was not declared in this scope
 hb_glib_blob_create (GBytes *gbytes)
                              ^
make[4]: *** [libharfbuzz_la-hb-glib.lo] Error 1

I can't determine anything from the config.log file, but then again I'm not exactly sure what to look for. I'm guessing that perhaps there's an unmet dependency somewhere, but I'm kind of at a loss at this point. Any help would be greatly appreciated and I'm happy to provide more info if needed. Thanks a lot.

If it's helpful, here is the full config.log.


Solution

  • The glib GBytes type was added in glib 2.32.

    The version of glib is CentOS 5 is 2.12 which is much older.

    The harfbuzz configure setup should be checking for a compatible version of glib and not getting as far as compiling before failing. That's a "bug" on their part.

    You get to either use an older version of harfbuzz that can use the version of glib that CentOS 5 ships with or you get to build and "install" your own copy of glib too.