开发者

How do I fix Perl's Font::FreeType compilation errors?

开发者 https://www.devze.com 2022-12-17 09:15 出处:网络
I am trying to install the Perl module Font::FreeType on a CentOS linux box using cpan. I run sudo cpan and inside the cpan shell I run install Font::FreeType. However make fails as follows:

I am trying to install the Perl module Font::FreeType on a CentOS linux box using cpan. I run sudo cpan and inside the cpan shell I run install Font::FreeType. However make fails as follows:

Writing Makefile for Font::FreeType
cp lib/Font/FreeType.pm blib/lib/Font/FreeType.pm
cp lib/Font/FreeType/Face.pm blib/lib/Font/开发者_如何学运维FreeType/Face.pm
cp lib/Font/FreeType/Glyph.pm blib/lib/Font/FreeType/Glyph.pm
/usr/bin/perl /usr/lib/perl5/site_perl/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap  FreeType.xs > FreeType.xsc && mv FreeType.xsc FreeType.c
gcc -c  -I/usr/include/freetype2 -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables   -DVERSION=\"0.03\" -DXS_VERSION=\"0.03\" -fPIC "-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE"   FreeType.c
FreeType.c: In function ‘XS_Font__FreeType_new’:
FreeType.c:425: warning: unused variable ‘class’
FreeType.xs: In function ‘XS_Font__FreeType__Face_has_reliable_glyph_names’:
FreeType.xs:528: warning: implicit declaration of function ‘FT_Has_PS_Glyph_Names’
FreeType.xs: In function ‘XS_Font__FreeType__Glyph_char_code’:
FreeType.xs:808: error: invalid lvalue in assignment

I have googled but can't seem to find any advice on how to solve this issue. I have a feeling something may be corupted with cpane, because when I went to check my version, I was surprised:

# sudo cpan --version
/usr/bin/cpan version [unknown] calling Getopt::Std::getopts (version 1.05 [paranoid]),
running under Perl version 5.8.8.


See http://rt.cpan.org/Public/Dist/Display.html?Name=Font-FreeType, the RT queue has patches you can apply to make the module build correctly.

Ether and Cfreak were guessing wrong, it's simply a bug due to bitrot in Font::FreeType.


It looks like you don't have the freetype development package installed. On the command line try:

yum install freetype-devel

Let that install and then rerun the install for your perl module. (you man need to do clean Font::Freetype first)


You can always reinstall cpan either by using itself (sudo cpan CPAN), or by manually downloading the CPAN distribution and following the build instructions.

However, generally when you get C-ish compile errors from a CPAN installation, that suggests you might be missing an underlying library. Font::FreeType uses the FreeType2 library; did you install that first? (Is it in /usr/lib/?)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号