Meson build of pango static library does not link in dependencies

164 Views Asked by At

I'm trying to build pango (https://github.com/GNOME/pango) as a static library. It is using Meson build which I'm not familiar with. Anyway, the compile steps succeed, but linking fails with a lot of undefined references to libfontconfig, libpixman-1 and libpng. These are all present and can be found via PKG_CONFIG_PATH. The preceding build of cairo (https://cairographics.org/snapshots/cairo-1.17.8.tar.xz) seemed to succeed.

I'm trying to build pango via

meson setup --reconfigure --buildtype release --strip --prefix $INSTALL_ROOT/pango --libdir $INSTALL_ROOT/pango/lib --default-library static $BUILD_ROOT\pango $DOWNLOAD_ROOT/pango
meson compile -C $BUILD_ROOT/pango
meson install -C $BUILD_ROOT/pango

and the errors are:

[361/445] Linking target subprojects/harfbuzz/util/hb-view
FAILED: subprojects/harfbuzz/util/hb-view
g++  -o subprojects/harfbuzz/util/hb-view subprojects/harfbuzz/util/hb-view.p/hb-view.cc.o -L/home/test/Intermediates/ThirdParty/BuildProducts/zlib/lib -I/home/test/Intermediates/ThirdParty/BuildProducts/zlib/include -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -fPIC -pthread -Wl,--start-group subprojects/harfbuzz/src/libharfbuzz.a /home/test/Intermediates/ThirdParty/BuildProducts/freetype/lib/libfreetype.a /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libbz2.so /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libz.so /home/test/Intermediates/ThirdParty/BuildProducts/cairo/lib/libcairo.a /home/test/Intermediates/ThirdParty/BuildProducts/glib/lib/libglib-2.0.a -lm /home/test/Intermediates/ThirdParty/BuildProducts/glib/lib/libpcre2-8.a -Wl,--end-group
/bin/ld: /home/test/Intermediates/ThirdParty/BuildProducts/cairo/lib/libcairo.a(cairo-image-compositor.o): in function `lerp':
cairo-image-compositor.c:(.text+0x86): undefined reference to `pixman_image_composite32'
/bin/ld: cairo-image-compositor.c:(.text+0xca): undefined reference to `pixman_image_composite32'
/bin/ld: /home/test/Intermediates/ThirdParty/BuildProducts/cairo/lib/libcairo.a(cairo-image-compositor.o): in function `_mono_finish_unbounded_spans':
...
/bin/ld: /home/test/Intermediates/ThirdParty/BuildProducts/cairo/lib/libcairo.a(cairo-png.o): in function `write_png':
cairo-png.c:(.text+0x304): undefined reference to `png_create_write_struct'
/bin/ld: cairo-png.c:(.text+0x31a): undefined reference to `png_create_info_struct'
...

Any ideas? TIA!

0

There are 0 best solutions below