忍者ブログ

素人翻訳

適当に翻訳する。

freetype2 のヘッダが見つからない

 xpdf-3.04 をソースコードから作ろうとしたら、configureで1回、makeで1回引っかかった。

 configure では、freetypeとfreetype2の両方ともインストールされていたのに、どちらも検知されなかった。

 config.logには次のような出力があった。

...
...
configure:7453: checking whether to use freetype2 library
configure:7460: result: maybe
configure:7509: checking where to find the freetype2 header files
configure:7516: result:
configure:7535: checking ft2build.h usability
configure:7535: gcc -std=gnu99 -c -g -O2 conftest.c >&5
In file included from conftest.c:67:
/usr/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
...
...

 ft2build.hには、「#include <freetype/config/ftheader.h>」と書かれているが、「/usr/include/freetype」と「/usr/include/freetype2/freetype」の2つがあって、freetype2の方が要るようだ。

 ft2build.h を書き換えて、

...
//#include <freetype/config/ftheader.h>
#include <freetype2/freetype/config/ftheader.h>
...

 これで configure のエラーは消えた。

[AAA@localhost xpdf-3.04]$ make
cd goo; make
make[1]: ディレクトリ `/home/AAA/xpdf/xpdf-3.04/goo' に入ります
...
...
SplashFTFont.cc:18:22: error: freetype/ftoutln.h: そのようなファイルやディレクトリはありません
SplashFTFont.cc:19:20: error: freetype/ftsizes.h: そのようなファイルやディレクトリはありません
SplashFTFont.cc:20:20: error: freetype/ftglyph.h: そのようなファイルやディレクトリはありません
...
...
SplashFTFont.cc:426: error: ‘pt’ was not declared in this scope
make[1]: *** [SplashFTFont.o] エラー 1
make[1]: ディレクトリ `/home/AAA/xpdf/xpdf-3.04/splash' から出ます
make: *** [all] エラー 2
[AAA@localhost xpdf-3.04]$

 freetype2のヘッダの多くは、「ft2build.h」だけを取り込んでおり、「ft2build.h」は「ftheader.h」だけを取り込んでいる。

 そこで「ftheader.h」のなかの「<freetype/......>」を全て「<freetype2/freetype/......>」に書き換えてしまうことにした。

---------------

ftheader.h = (/usr/include/freetype2/freetype/config)

...
110:#define FT_CONFIG_CONFIG_H <freetype2/freetype/config/ftconfig.h>
125:#define FT_CONFIG_STANDARD_LIBRARY_H <freetype2/freetype/config/ftstdlib.h>
140:#define FT_CONFIG_OPTIONS_H <freetype2/freetype/config/ftoption.h>
156:#define FT_CONFIG_MODULES_H <freetype2/freetype/config/ftmodule.h>
...
...
759:#define FT_CACHE_INTERNAL_SBITS_H <freetype2/freetype/ftcache.h>
762:#define FT_INCREMENTAL_H <freetype2/freetype/ftincrem.h>
764:#define FT_TRUETYPE_UNPATENTED_H <freetype2/freetype/ttunpat.h>
772:#define FT_INTERNAL_INTERNAL_H <freetype2/freetype/internal/internal.h>
...

 これで xpdf-3.04 の構築に成功。

 make install で「pdftohtml」と「pdftopng」がインストールできなかった。実行ファイルは作成されていたので手動でコピー。

[AAA@localhost xpdf-3.04]$ sudo cp xpdf/pdftohtml /usr/local/bin [AAA@localhost xpdf-3.04]$ sudo cp xpdf/pdftopng /usr/local/bin [AAA@localhost xpdf-3.04]$
PR

コメント

お名前
タイトル
文字色
メールアドレス
URL
コメント
パスワード Vodafone絵文字 i-mode絵文字 Ezweb絵文字

カレンダー

03 2024/04 05
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

最新コメント

[08/18 NONAME]
[05/18 NONAME]
[04/09 NONAME]
[03/21 NONAME]
[03/20 NONAME]

最新記事

ブログ内検索

広告

バーコード

広告