编译pango-1.40.1时遇到的问题及解决方法

在编译pango-1.40.1过程中遇到了X11头文件缺失、libtoolize宏问题及Automake配置错误。解决方案包括安装xorg以解决头文件问题,更新libtoolize并添加AC_CONFIG_MACRO_DIRS,以及确保所有依赖如fontconfig、FreeType等已安装,并正确配置configure选项。在某些情况下,还需要设置环境变量FREETYPE_CONFIG。
摘要由CSDN通过智能技术生成

编译遇到的问题,抓狂

pango


1.configuration:
backends: FreeType

解决:没有Xft,是需要fontconfig 2.12.0.8
2.configure: creating ./config.lt
config.lt: creating libtool
checking for some Win32 platform... no
checking pkg-config is at least version 0.9.0... yes
checking for HARFBUZZ... no
checking for CoreText availability... no
checking for CAIRO... yes
checking which cairo font backends could be used... none
configure: Disabling cairo support
configure: error: *** Could not enable any backends.
*** Must have at least one backend to build Pango.
解决:
export HARFBUZZ_CFLAGS='-I/tmp/harfbuzz/lin32/include'
export HARFBUZZ_LIBS='-L/tmp/harfbuzz/lin32/lib -lharfbuzz -lharfbuzz-gobject'
3.pango-utils.c: In function 'pango_version_check':
pango-utils.c:148: error: 'PANGO_BINARY_AGE' undeclared (first use in this function)
pango-utils.c:148: error: (Each undeclared identifier is reported only once
pango-utils.c:148: error: for each function it appears in.)
4.acloacal
acinclude.m4:68: warning: the serial number must appear before any macro definition
autom4te: -: no such file or directory
解决:export AUTOM4TE='/path/to/autoconf-2.69/bin/autom4te'

5.automake --add-missing
configure.ac:115: installing './compile'
configure.ac:90: installing './config.guess'
configure.ac:90: installing './config.sub'
configure.ac:52: installing './install-sh'
configure.ac:142: error: required file './ltmain.sh' not found
解决:
export AUTOM4TE='/path/to/autoconf-2.69/bin/autom4te'
libtoolize

6.In file included from ../pango/pango.h:31,
                 from pango-impl-utils.h:28,
                 from break.c:27:
../pango/pango-enum-types.h:13:9: error: macro names must be identifiers
../pango/pango-enum-types.h:15:9: error: macro names must be identifiers
../pango/pango-enum-types.h:19:9: error: macro names must be identifiers
../pango/pango-enum-types.h:21:9: error: macro names must be identifiers
../pango/pango-enum-types.h:25:9: error: macro names must be identifiers
../pango/pango-enum-types.h:29:9: error: macro names must be identifiers
../pango/pango-enum-types.h:31:9: error: macro names must be identifiers
../pango/pango-enum-types.h:33:9: error: macro names must be identifiers
../pango/pango-enum-types.h:35:9: error: macro names must be identifiers
../pango/pango-enum-types.h:37:9: error: macro names must be identifiers
../pango/pango-enum-types.h:41:9: error: macro names must be identifiers
../pango/pango-enum-types.h:43:9: error: macro names must be identifiers
../pango/pango-enum-types.h:47:9: error: macro names must be identifiers
../pango/pango-enum-types.h:49:9: error: macro names must be identifiers
../pango/pango-enum-types.h:51:9: error: macro names must be identifiers
../pango/pango-enum-types.h:55:9: error: macro names must be identifiers
../pango/pango-enum-types.h:59:9: error: macro names must be identifiers
../pango/pango-enum-types.h:63:9: error: macro names must be identifiers
break.c: In function 'pango_get_log_attrs':
break.c:1858: warning: unused parameter 'language'
In file included from break.c:1898:
break-thai.c: In function 'break_thai':
break-thai.c:58: warning: unused parameter 'text'
break-thai.c:59: warning: unused parameter 'len'
break-thai.c:61: warning: unused parameter 'attrs'
break.c: In function 'pango_language_engine_init':
break.c:1955: warning: unused parameter 'object'
make[4]: *** [break.lo] Error 1


7.In file included from ../pango/pangoxft.h:30,
                 from cxx-test.C:14:
../pango/pangoxft-render.h:30:22: error: X11/Xlib.h: No such file or directory
../pango/pangoxft-render.h:31:25: error: X11/Xft/Xft.h: No such file or directory
../pango/pangoxft-render.h:34:2: error: #error "must have Xft version 2 or newer"
In file included from ../pango/pangoxft.h:30,
                 from cxx-test.C:14:
../pango/pangoxft-render.h:63: error: ISO C++ forbids declaration of 'Display' with no type
../pango/pangoxft-render.h:63: error: expected ';' before '*' token
../pango/pangoxft-render.h:65: error: ISO C++ forbids declaration of 'XftDraw' with no type
../pango/pangoxft-render.h:65: error: expected ';' before '*' token
../pango/pangoxft-render.h:90: error: 'XTrapezoid' has not been declared
../pango/pangoxft-render.h:93: error: 'XftFont' has not been declared
../pango/pangoxft-render.h:94: error: 'XftGlyphSpec' has not been declared
../pango/pangoxft-render.h:100: error: 'Display' was not declared in this scope
../pango/pangoxft-render.h:100: error: 'display' was not declared in this scope
../pango/pangoxft-render.h:101: error: expected primary-expression before 'int'
../pango/pangoxft-render.h:101: error: initializer expression list treated as compound expression
../pango/pangoxft-render.h:103: error: 'XftDraw' has not been declared
../pango/pangoxft-render.h:107: error: variable or field 'pango_xft_render' declared void
../pango/pangoxft-render.h:107: error: 'XftDraw' was not declared in this scope
../pango/pangoxft-render.h:107: error: 'draw' was not declared in this scope
../pango/pangoxft-render.h:108: error: 'XftColor' was not declared in this scope
../pango/pangoxft-render.h:108: error: 'color' was not declared in this scope
../pango/pangoxft-render.h:109: error: expected primary-expression before '*' token
../pango/pangoxft-render.h:109: error: 'font' was not declared in this scope
../pango/pangoxft-render.h:110: error: expected primary-expression before '*' token
../pango/pangoxft-render.h:110: error: 'glyphs' was not declared in this scope
../pango/pangoxft-render.h:111: error: expected primary-expression before 'x'
../pango/pangoxft-render.h:112: error: expected primary-expression before 'y'
../pango/pangoxft-render.h:113: error: variable or field 'pango_xft_picture_render' declared void
../pango/pangoxft-render.h:113: error: 'Display' was not declared in this scope
../pango/pangoxft-render.h:113: error: 'display' was not declared in this scope
../pango/pangoxft-render.h:114: error: 'Picture' was not declared in this scope
../pango/pangoxft-render.h:115: error: 'Picture' was not declared in this scope
../pango/pangoxft-render.h:116: error: expected primary-expression before '*' token
../pango/pangoxft-render.h:116: error: 'font' was not declared in this scope
../pango/pangoxft-render.h:117: error: expected primary-expression before '*' token
../pango/pangoxft-render.h:117: error: 'glyphs' was not declared in this scope
../pango/pangoxft-render.h:118: error: expected primary-expression before 'x'
../pango/pangoxft-render.h:119: error: expected primary-expression before 'y'
../pango/pangoxft-render.h:120: error: variable or field 'p

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值