cuspy memo


Font::FreeType がビルドできない

2008/08/25 Monday 03:18:29

CPAN の Font-FreeType-0.03 をインストールしようとしたときの事。

% make
cp lib/Font/FreeType.pm blib/lib/Font/FreeType.pm
cp lib/Font/FreeType/Glyph.pm blib/lib/Font/FreeType/Glyph.pm
cp lib/Font/FreeType/Face.pm blib/lib/Font/FreeType/Face.pm
/usr/bin/perl /usr/share/perl/5.10/ExtUtils/xsubpp -typemap /usr/share/perl/5.10/ExtUtils/typemap -typemap typemap FreeType.xs > FreeType.xsc && mv FreeType.xsc FreeType.c
cc -c -I/usr/include/freetype2 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\”0.03\” -DXS_VERSION=\”0.03\” -fPIC “-I/usr/lib/perl/5.10/CORE” FreeType.c
FreeType.xs: In function ‘XS_Font__FreeType__Glyph_char_code’:
FreeType.xs:808: error: lvalue required as left operand of assignment

FreeType.xs:808 はこんなコード

RETVAL = newSVuv((UV) glyph->char_code = char_code);

このキャストは、マズそうなのでカッコで括る。

@@ -805,7 +805,7 @@
             char_code = FT_Get_First_Char(face, &glyph_idx);
             while (glyph_idx) {
                 if (glyph_idx == glyph->index) {
-                    RETVAL = newSVuv((UV) glyph->char_code = char_code);
+                    RETVAL = newSVuv((UV) (glyph->char_code = char_code));
                     break;
                 }
                 char_code = FT_Get_Next_Char(face, char_code, &glyph_idx);

他にいろいろwarning は出てるけどビルドは出来た。めでたしめでたし。

No comments yet.

Leave a comment

You must be logged in to post a comment.

hoge