你如何在亚马逊Linux上编译Pango?

时间:2018-03-16 16:33:54

标签: amazon-ec2 compiler-errors aws-lambda pango

我正在尝试在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

1 个答案:

答案 0 :(得分:1)

我认为警告来自构建的gobject-introspection步骤。

这些错误表明缺少harfbuzz库。