These pages are written by only Japanese.
|
Namazu for hns による簡易全文検索です。 詳細は 詳細指定/ヘルプをご参照下さい。 |
||||||||||||||||||||||||||||||||||||||||||||||||
In file included from jpeg.c:10: /usr/include/stdlib.h:589: error: conflicting types for 'g_malloc' /usr/include/glib-2.0/glib/gmem.h:47: error: previous declaration of 'g_malloc' was hereglib-2.15 (2.16 は見つからず、かつ 2.2x はインターフェース変わってるので) を /usr/local に install してチャレンジ。
env \ GLIB_CFLAGS="-pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include" \ ./configure --disable-gstreamer --disable-gtk
jpeg.c: In function 'jpeg_decoder_verify_header': jpeg.c:68: error: 'G_STRFUNC' undeclared (first use in this function) jpeg.c:68: error: (Each undeclared identifier is reported only once jpeg.c:68: error: for each function it appears in.) jpeg.c: In function 'jpeg_decoder_init_decoder': jpeg.c:168: error: 'G_STRFUNC' undeclared (first use in this function)G_STRFUNC の定義は 2.12 ではあったけど、2.15 では消えてました。 でもって、2.2 でもないです。最新の 2.9.6 で発見したのでこれで…
In file included from jpeg.c:10: /usr/include/stdlib.h:589: error: conflicting types for 'g_malloc' /usr/local/include/glib-2.0/glib/gmem.h:47: error: previous declaration of 'g_malloc' was herestdlib.h より先に glib の define 置換を読み込んで malloc の名前が 変わってしまってる不具合発見。
#include <swfdec_debug.h> #include <stdlib.h> /* append by yoya */ #include <glib.h>
swfdec_as_context.c:1100: warning: implicit declaration of function 'g_ascii_strtoll' swfdec_as_context.c:1100: warning: nested extern declaration of 'g_ascii_strtoll' make[2]:むー… g_ascii_strtoll の定義は 2.12 ではあったけど 2.96 では消えてますね…
--TEST-- SWF Editor getJpegData: SWF Editor support for DefineBitsJPEG --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php echo "ok\n"; ?> --EXPECT-- okとりあえず ok だけ出力させて実行。
% make test ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- SWF Editor getJpegData: SWF Editor support for DefineBitsJPEG [tests/getjpeg.phpt] ========ダメらしい
---- EXPECTED OUTPUT ok ---- ACTUAL OUTPUT Warning: Module 'swfed' already loaded in Unknown on line 0 ok ---- FAILED… install 済みの so と作ったばかりの so がぶつかってるんだろうけど、 一体どうすれば…
% pkg-config --exists --print-errors "glib-2.0 >= 2.17.3 gobject-2.0 gmodule-no-export-2.0" Requested 'glib-2.0 >= 2.17.3' but version of GLib is 2.12.3って感じでチェックするので、/usr/local で頑張っても /usr に入ってる パッケージでバージョンチェックして跳ねられるんですよね。
% ls /usr/lib/pkgconfig/ ImageMagick.pc gnome-mime-data-2.0.pc pango.pc Wand.pc gnome-python-2.0.pc pangocairo.pc alsa.pc gnome-python-desktop-2.0.pc pangoft2.pc <略>こんななってて、pc ファイルの中は
% cat /usr/lib/pkgconfig/ImageMagick.pc prefix=/usr exec_prefix=/usr libdir=/usr/lib includedir=/usr/include Name: ImageMagick Description: ImageMagick - Convert, Edit, and Compose Images Version: 6.2.8 Libs: -L${libdir} -lWand -lMagick Cflags: -I${includedir}こんなです。
% /usr/local/bin/pkg-config --libs glib-2.0 -L/usr/local/lib -lglib-2.0これで、おk
% grep _VER= configure GLIB_VER=2.16 PANGO_VER=1.16 GTK_VER=2.8.0 LIBOIL_VER=0.3.1 CAIRO_VER=1.6.02.19 は開発版らしいので、とりあえず 2.18。 どうでもいいけど、GNOME のトップからダウンロードページを 探すのが大変なのですが… プレイヤーを動かす気はないので GTK は要らないかな。 あと、gstreamer も面倒なので後回し。
env PKG_CONFIG=/usr/local/bin/pkg-config ./configure \ --disable-gtk --disable-gstreamer
env PKG_CONFIG=/usr/local/bin/pkg-config ./configure
checking for cairo's image surface backend feature... checking for pixman... no no checking whether cairo's image surface backend feature could be enabled... no (requires pixman-1 >= 0.12.0 http://cairographics.org/releases/) configure: error: mandatory image surface backend feature could not be enabled怒られた…
env PKG_CONFIG=/usr/local/bin/pkg-config ./configureで make install
env PKG_CONFIG=/usr/local/bin/pkg-config ./configure問題なし。順調。
env PKG_CONFIG=/usr/local/bin/pkg-config ./configure <略> configure: WARNING: Could not find libpng in the pkg-config search path checking whether cairo's PNG functions feature could be enabled... no configure: error: recommended PNG functions feature could not be enabled/usr/local にも入れるか…
% ./configure
env PKG_CONFIG=/usr/local/bin/pkg-config ./configure <略> configure: error: Cairo requires at least one native font backend. Please install FreeType and fontconfig and try again.ふーむw
env PKG_CONFIG=/usr/local/bin/pkg-config ./configure
env PKG_CONFIG=/usr/local/bin/pkg-config ./configure <略> cairo (version 1.8.0 [release]) will be compiled with: The following surface backends: Image: yes (always builtin) Xlib: yes Xlib Xrender: yes Quartz: no (requires CoreGraphics framework) Quartz-image: no (disabled, use --enable-quartz-image to enable) XCB: no (disabled, use --enable-xcb to enable) Win32: no (requires a Win32 platform) OS2: no (disabled, use --enable-os2 to enable) PostScript: yes PDF: yes SVG: yes glitz: no (disabled, use --enable-glitz to enable) BeOS: no (disabled, use --enable-beos to enable) DirectFB: no (disabled, use --enable-directfb to enable) The following font backends: User: yes (always builtin) FreeType: yes Win32: no (requires a Win32 platform) Quartz: no (requires CoreGraphics framework) The following functions: PNG functions: yes And the following internal features: gcov support: no test surfaces: no (disabled, use --enable-test-surfaces to enable) ps testing: yes pdf testing: no (requires poppler-glib >= 0.9.2) svg testing: no (requires librsvg-2.0 >= 2.15.0)ふむ。
env PKG_CONFIG=/usr/local/bin/pkg-config ./configure
env PKG_CONFIG=/usr/local/bin/pkg-config ./configure \ --disable-gtk --disable-gstreamer <略> checking for ALSA... configure: error: Package requirements (alsa >= 1.0) were not met: No package 'alsa' found面倒なので手抜き
# ln -s /usr/lib/pkgconfig/alsa.pc /usr/local/lib/pkgconfig/.これ、おk
% ./tools/dump ~/flash/chara.swf file: version: 6 rate : 30 fps size : 800x545 pixels objects: 1: SwfdecImage JPEG with global table 800 x 545 2: SwfdecShape 800x545 image 1 (no repeat, bilinear) 3: SwfdecFont _???? 11 characters 4: SwfdecTextField
$(PHP_EXECUTABLE) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( . $(PHP_MODULES) ; echo extension=$$dlname)` tests/;なるほど。ここの extension 読み込みを削除しつつ、 so ファイルを install してから make test をすれば、OK と。
$ make test <略> ===================================================================== Running selected tests. PASS SWF Editor getJpegData: SWF Editor support for DefineBitsJPEG [tests/getjpeg.phpt] ===================================================================== Number of tests : 1 1 Tests skipped : 0 ( 0.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 0 ( 0.0%) ( 0.0%) Tests passed : 1 (100.0%) (100.0%) --------------------------------------------------------------------- Time taken : 0 seconds =====================================================================おk。テストパターンを書きまくろう。
-m Test for memory leaks with Valgrind.memory leak も見てくれるらしいので、install
# yum install valgrindさて…
rate = swfdec_player_get_rate(player); swfdec_player_get_default_size(player, &width, &height); printf("rate=%1.1f\n", rate); printf("width=%d height=%d\n", width, height);
% gcc swfdec_getheader.c `pkg-config --cflags --libs swfdec-0.8` \ -Wl,-rpath,/usr/local/lib % a.out ~/flash/chara.swf rate=30.0 width=800 height=545あっさり、frame_rate と rect が取れました。
% gcc png2rgb.c -lpng bitstream.c % ./aout test0.png > test0.rgb % rgb2gif -1 -s 512 382 test_0.rgb > test_0-2.gif