|
Namazu for hns による簡易全文検索 詳しくは 詳細指定/ヘルプを参照して下さい |
|||||||||||||||||||||||||||||||||||||||||||||
2011年05月14日(土) 旧暦 [n年日記] [更新:"2011/05/14 15:07:33"]#1 [pkgsrc][ghostscript] puzzle for FT_Incremental_MetricsRec->advance_v
謎: While I'm packaging wip/ghostscript (9.0.1), I got
./psi/fapi_ft.c: In function 'get_fapi_glyph_metrics': ./psi/fapi_ft.c:294: error: 'FT_Incremental_MetricsRec' has no member named 'advance_v' gmake[1]: *** [obj/../soobj/fapi_ft.o] Error 1 gmake[1]: Leaving directory `/export/pkgsrc/wip/ghostscript/work/ghostscript-9.01' gmake: *** [so] Error 2 *** Error code 2この時、freetype-lib だけ既に設置済 At that moment, freetype-lib was already installed. freetype2 が要るのでは ? と 手で package-install した ml110-2@makoto 07:36:43/110514(..wip/ghostscript)% pkg_info -qL freetype-lib |grep ftincrem.h ml110-2@makoto 07:36:51/110514(..wip/ghostscript)% pkg_info -qL freetype2 |grep ftincrem.h /usr/pkg/include/freetype2/freetype/ftincrem.h何とはなく、 advance -> freetype2 advance_v -> freetype-libの気がしている。(だったら、最初に問題が出た時に、advance_v の方が入っていたはず) ./work/ghostscript-9.01/freetype/include/freetype/ftincrem.h: FT_Long advance_v; /* since 2.3.12 */ftincrem.h は同じ名前のものが両方あるのか ml110-2@makoto 07:49:20/110514(..wip/ghostscript)% find . -name ftincrem.h -ls 5802339 24 -rw-r--r-- 1 makoto wheel 11406 jul 20 2010 ./work/ghostscript-9.01/freetype/include/freetype/ftincrem.h 5780831 4 lrwxr-xr-x 1 makoto wheel 62 may 14 07:39 ./work/.buildlink/include/freetype2/freetype/ftincrem.h -> /usr/pkg/share/x11-links/include/freetype2/freetype/ftincrem.hsource に内蔵しているのと buildlink したものと。 内蔵している方が欲しい方なのに、buildlink した方が勝っている ? (buildlink した方は手で後から入れた方 ?) じゃなくて x11-links が入れたらしい ml110-2@makoto 07:53:35/110514(..wip/ghostscript)% pkg_info -ql x11-links | grep ftincrem.h /usr/pkg/share/x11-links/include/freetype2/freetype/ftincrem.h以前に問題が出なかったのは xorg-modular の方で x11-links を使っていなかった所為 ? sub pkgtools/x11-links ml110-2@makoto 08:01:58/110514(..wip/ghostscript)% grep freetype ../../pkgtools/x11-links/* ../../pkgtools/x11-links/xfree.mk:.include "../../graphics/freetype2/buildlink3.mk" ../../pkgtools/x11-links/xorg.mk:.include "../../graphics/freetype2/buildlink3.mk"xrog でも xfree でも、 両方とも freetype2 を参照している(らしい) 謎なのは、(名前からして) freetype-lib は古くて、 freetype2 が新しいものに見えるのに、 ghostscript は古い方の member を参照していることかな。 ghostscript は 9.0.2 が出ているらしい --> ここで問題にしている件には改善はない。 @ 二つの版の差分を見たら:ml110-2@makoto 08:21:44/110514(..wip/ghostscript)% diff -u ./work/.buildlink/include/freetype2/freetype/ftincrem.h \ ./work/ghostscript-9.02/freetype/include/freetype/ftincrem.h --- ./work/.buildlink/include/freetype2/freetype/ftincrem.h 2010-11-07 22:49:34.000000000 +0900 +++ ./work/ghostscript-9.02/freetype/include/freetype/ftincrem.h 2010-07-20 00:45:36.000000000 +0900 @@ -4,7 +4,7 @@ /* */ /* FreeType incremental loading (specification). */ /* */ -/* Copyright 2002, 2003, 2006, 2007, 2008 by */ +/* Copyright 2002, 2003, 2006, 2007, 2008, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -101,7 +101,10 @@ * Top bearing, in font units. * * advance :: - * Glyph advance, in font units. + * Horizontal component of glyph advance, in font units. + * + * advance_v :: + * Vertical component of glyph advance, in font units. * * @note: * These correspond to horizontal or vertical metrics depending on the @@ -114,6 +117,7 @@ FT_Long bearing_x; FT_Long bearing_y; FT_Long advance; + FT_Long advance_v; /* since 2.3.12 */ } FT_Incremental_MetricsRec; ml110-2@makoto 08:21:46/110514(..wip/ghostscript)%x11-links 側で、単に入替(更新す)れば良い話らしい。 さて、どうやって ? ますます不思議。freetype2 は 2.4.4 が既に入っていて ftincrem.h の内容は上の差分の新しい方 になっている。 Native X11 の (in-tree の source の)版が古いのかな。 ml110-2@makoto 08:29:33/110514(..pkgtools/x11-links)% find . -name ftincrem.h -ls 4059816 0 lrwxr-xr-x 1 makoto wheel 48 May 13 19:06 ./work/share/x11-links/include/freetype2/freetype/ftincrem.h -> /usr/X11R7/include/freetype2/freetype/ftincrem.h 4077990 0 lrwxr-xr-x 1 makoto users 48 May 13 19:06 ./work/.destdir/usr/pkg/share/x11-links/include/freetype2/freetype/ftincrem.h -> /usr/X11R7/include/freetype2/freetype/ftincrem.h結局、今まで、写したのは次の三点 /usr/X11R7/include/freetype2/freetype/ftincrem.h /usr/X11R7/include/freetype2/freetype/ftimage.h /usr/X11R7/include/freetype2/freetype/config/ftstdlib.hこれで次は freetype/src/bdf/bdflib.c: In function '_bdf_parse_start': freetype/src/bdf/bdflib.c:2094: error: 'BDF_Err_Missing_Fontboundingbox_Field' undeclared (first use in this function) freetype/src/bdf/bdflib.c:2094: error: (Each undeclared identifier is reported only once freetype/src/bdf/bdflib.c:2094: error: for each function it appears in.) gmake[1]: *** [obj/../soobj/bdflib.o] Error 1 gmake[1]: Leaving directory `/export/pkgsrc/wip/ghostscript/work/ghostscript-9.02' gmake: *** [so] Error 2 *** Error code 2これ、やっかいで、定義されているのは .. copied so far: /usr/X11R7/include/freetype2/freetype/config/ftoption.h /usr/X11R7/include/freetype2/freetype/config/ftstdlib.h /usr/X11R7/include/freetype2/freetype/fterrdef.h /usr/X11R7/include/freetype2/freetype/ftimage.h /usr/X11R7/include/freetype2/freetype/ftincrem.h /usr/X11R7/include/freetype2/freetype/ftsnames.hこれ、入替えなくても探索順序の設定を変更すれば良いのでは ? 下記の -I./freetype/include を入れることは出来るのだけれど、これを X11R7 よりも前に持って来ることは出来ないかな cc -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FONTCONFIG -DHAVE_SETLOCALE -O2 -fPIC -Ijpeg -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/X11R7/include/freetype2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long long" -I./freetype/include -DA4 -fPIC -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/X11R7/include/freetype2 -DUSE_LIBPAPER -I./psi -I./obj/../soobj -I./obj/../soobj -I./base -Ifreetype/include -o ./obj/../soobj/fapi_ft.o -c ./psi/fapi_ft.c ./psi/fapi_ft.c: In function 'get_fapi_glyph_metrics': ./psi/fapi_ft.c:298: error: 'FT_Incremental_MetricsRec' has no member named 'advance_v' gmake[1]: *** [obj/../soobj/fapi_ft.o] Error 1 gmake[1]: Leaving directory `/export/pkgsrc/wip/ghostscript/work/ghostscript-9.02' gmake: *** [so] Error 2 *** Error code 2freetype-config には二つあって、 -rwxr-xr-x 1 root wheel 3834 May 14 07:24 /usr/pkg/bin/freetype-config -r-xr-xr-x 1 root wheel 3741 Nov 7 2010 /usr/pkg/share/x11-links/bin/freetype-configwhich freetype-config すると、前者が出て来て、 ml110-2@makoto 14:39:10/110514(..pkgtools/x11-links)% freetype-config --cflags -I/usr/pkg/include/freetype2 -I/usr/pkg/includeというのだけれど、後のを使うと、 ml110-2@makoto 14:39:30/110514(..pkgtools/x11-links)% /usr/pkg/share/x11-links/bin/freetype-config --cflags -I/usr/X11R7/include/freetype2 -I/usr/X11R7/includeとなる。前者を使っていれば、うまく行くような気がするけれど。 試しに後者を隠して見たけれど、変らなかった。 @ 冗談見たいだけれど、CC_OPT_FLAGS_TO_TRY=:
冗談見たいだけれど、次のようにすると、package が完了した。
--- work/ghostscript-9.02/configure.orig 2011-03-30 17:59:21.000000000 +0900 +++ configure 2011-05-14 14:54:42.000000000 +0900 @@ -3726,7 +3727,7 @@ ;; *BSD) if test $ac_cv_c_compiler_gnu = yes; then - CC_OPT_FLAGS_TO_TRY="-O2" + CC_OPT_FLAGS_TO_TRY="-O2 -I./freetype/include" CC_DBG_FLAGS_TO_TRY="-g -O0" fi ;;-O2 が最初の方に出て来るのを見て、試しただけ。 ( つっこみ )
|
最近の日記 2024年03月10日 ・停電 (瞬電) 2024年03月03日 ・the second try on bare-metal ・useradd 2024年02月29日 ・opendkim and senmail 2024年01月24日 ・chat/iam 0.0.8 2024年01月21日 ・uselocale vs setlocale (textproc/R-readxl) | ||