Ubuntu 18.04 の32bit環境でビルドしたプログラムを、32bitのライブラリを組み込んだ64bitの環境で動かそうとするとフリーズしてしまいます。
コードは以下のようなもので、文字列の幅と高さを求めるようにしています。

#include <stdio.h>
#include <string.h>
#include <pango/pangocairo.h>
#include <glib/gprintf.h>

int
main(int argc, char *argv[])
{
  cairo_surface_t *surface;
  cairo_t *cr;
  PangoLayout *layout;
  PangoFontDescription *fontDescr;
  cairo_font_options_t *fontOptions;
  PangoRectangle inkRect, logicalRect;
  int left, right, top, bottom, width, height;

  surface = cairo_image_surface_create(CAIRO_FORMAT_A8, 100, 100);
  cr = cairo_create(surface);
  layout = pango_cairo_create_layout(cr);

  fontOptions = cairo_font_options_create();
  cairo_font_options_set_hint_style(fontOptions, CAIRO_HINT_STYLE_DEFAULT);
  cairo_font_options_set_hint_metrics(fontOptions, CAIRO_HINT_METRICS_DEFAULT);
  cairo_font_options_set_antialias(fontOptions, CAIRO_ANTIALIAS_NONE);
  pango_cairo_context_set_font_options(pango_layout_get_context(layout), fontOptions);

  fontDescr = pango_font_description_from_string("DejaVu Sans, 18px");
  pango_layout_set_font_description(layout, fontDescr);
  pango_layout_set_text(layout, "test", 4);

  printf("checkpoint\n");
  pango_layout_get_pixel_extents(layout, &inkRect, &logicalRect);
  printf("ok\n");

  left = (inkRect.x < logicalRect.x) ? inkRect.x : logicalRect.x;
  top = (inkRect.y < logicalRect.y) ? inkRect.y : logicalRect.y;
  right = inkRect.x + inkRect.width;
  if ((logicalRect.x + logicalRect.width) > right) {
    right = logicalRect.x + logicalRect.width;
  }
  bottom = inkRect.y + inkRect.height;
  if ((logicalRect.y + logicalRect.height) > bottom) {
    bottom = logicalRect.y + logicalRect.height;
  }
  width = right - left;
  height = bottom - top;

  printf("w=%d, h=%d\n", width, height);
}

これをUbuntu 18.04の32bit環境で以下のようなスクリプトでビルドしています。

gcc -Wall `pkg-config --cflags pangocairo` test2.c `pkg-config --libs pangocairo` -o test2

32bit環境で実行すると、以下のような結果が表示されます。

$ ./test2 
checkpoint
ok
w=33, h=22
$

同じバイナリを32bitの各種ライブラリを組み込んだ状態の64bit環境で実行させると以下のようになってフリーズします。

$ ./test2 
checkpoint

gdbで実行してトレースを出力させると以下のようになります。

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
checkpoint
^C
Program received signal SIGINT, Interrupt.
0xf787f952 in ?? () from /usr/lib/i386-linux-gnu/libfreetype.so.6
(gdb) thread apply all backtrace

Thread 1 (Thread 0xf73cba40 (LWP 5370)):
#0  0xf787f952 in ?? () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#1  0xf787fe6b in FT_DivFix () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#2  0xf78a946a in ?? () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#3  0xf78a9b2b in ?? () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#4  0xf78ab7ef in ?? () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#5  0xf78ad6ff in ?? () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#6  0xf78ae28a in ?? () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#7  0xf7885062 in FT_Load_Glyph () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#8  0xf7a6196c in ?? () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#9  0xf7a61ada in ?? () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#10 0xf7a63aab in FcFreeTypeQueryFace () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#11 0xf7a5f34e in ?? () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#12 0xf7a5f81e in ?? () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#13 0xf7a5faa8 in ?? () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#14 0xf7a5a937 in ?? () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#15 0xf7a5a9f6 in FcConfigBuildFonts () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#16 0xf7a64bcf in ?? () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#17 0xf7a64bfa in FcInitLoadConfigAndFonts () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#18 0xf7a57ae6 in ?? () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#19 0xf7a59ec6 in FcConfigSubstituteWithPat () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#20 0xf7a59fb6 in FcConfigSubstitute () from /usr/lib/i386-linux-gnu/libfontconfig.so.1
#21 0xf7fb07d3 in ?? () from /usr/lib/i386-linux-gnu/libpangocairo-1.0.so.0
#22 0xf793dda4 in ?? () from /usr/lib/i386-linux-gnu/libpangoft2-1.0.so.0
#23 0xf7f69ec9 in ?? () from /usr/lib/i386-linux-gnu/libpango-1.0.so.0
#24 0xf7f6b71f in pango_itemize_with_base_dir () from /usr/lib/i386-linux-gnu/libpango-1.0.so.0
#25 0xf7f748ec in ?? () from /usr/lib/i386-linux-gnu/libpango-1.0.so.0
#26 0xf7f76991 in ?? () from /usr/lib/i386-linux-gnu/libpango-1.0.so.0
#27 0xf7f76f1d in pango_layout_get_pixel_extents () from /usr/lib/i386-linux-gnu/libpango-1.0.so.0
#28 0x56555b2a in main ()
(gdb) 

libfreetype.so.6 で止まっているようです。
何か解決につながりそうなヒントがあれば助かります。