我正在尝试在Amazon Linux 2017.9上编译Pango的最新版本(1.38或更高版本),最终目标是编译librsvg的版本。./configure
没有给出任何错误,我想我已经安装了所有依赖项。但是,当我运行make
时,会收到大量警告和一些错误。
一些例子:
警告:
pango-renderer.c:1463: Warning: Pango: invalid annotation option: nullable
pango-utils.c:131: Warning: Pango: invalid annotation option: nullable
pango-engine.h:123: Warning: Pango: invalid annotation option: nullable
pango-engine.h:170: Warning: Pango: missing ':' at column 20:
* PangoEngineShape
错误:
autofit.c:(.text+0x82a6): undefined reference to `hb_buffer_create'
/home/ec2-user/build/lib/libfreetype.a(autofit.o): In function `af_shaper_buf_destroy':
/home/ec2-user/freetype-2.9/src/autofit/afshaper.c:441: undefined reference to `hb_buffer_destroy'
/home/ec2-user/build/lib/libfreetype.a(autofit.o): In function `af_shaper_buf_create':
autofit.c:(.text+0x6701): undefined reference to `hb_buffer_create'
/home/ec2-user/build/lib/libfreetype.a(autofit.o): In function `af_shaper_buf_destroy':
autofit.c:(.text+0x6714): undefined reference to `hb_buffer_destroy'
collect2: error: ld returned 1 exit status
linking of temporary binary failed: Command '['/bin/sh', '../libtool', '--mode=link', '--tag=CC', '--silent', 'gcc', '-o', '/home/ec2-user/pango-1.39.0/pango/tmp-introspect84YaJG/Pango-1.0', '-export-dynamic', '/home/ec2-user/pango-1.39.0/pango/tmp-introspect84YaJG/Pango-1.0.o', '-L.', 'libpango-1.0.la', '-Wl,--export-dynamic', '-pthread', '-L/home/ec2-user/build/lib', '-lgio-2.0', '-lgmodule-2.0', '-lgobject-2.0', '-lcairo', '-lglib-2.0', '-lfreetype']' returned non-zero exit status 1
make[4]: *** [Pango-1.0.gir] Error 1
最佳答案
我认为警告来自构建的gobject-introspection步骤。
这些错误表明缺少harfbuzz库。