2011-10-23 :-)
_ [cygwin][ruby-gtk2]cygwin で ruby-gtk2 を入れた
Ruby-GNOME2 Project Website - Ruby-GNOME2 Project Website
gem しろと書いてあるのでおもむろにやる。
エラーになる
% gem install gtk2 ERROR: Error installing gtk2: ERROR: Failed to build gem native extension. /usr/bin/ruby.exe extconf.rb checking for GCC... yes checking for Win32 OS... yes checking for Mac OS X... no checking for cairo version (>= 1.2.0)... yes checking for HAVE_RUBY_ST_H in ruby.h... no checking for ruby/st.h... no checking for HAVE_RUBY_IO_H in ruby.h... no checking for ruby/io.h... no checking for rb_errinfo() in ruby.h... no checking for enum ruby_value_type in ruby.h... no creating Makefile make gcc -I. -I. -I/usr/lib/ruby/1.8/i386-cygwin -I. -DRUBY_CAIRO_PLATFORM_WIN32 -DRB_CAIRO_COMPILATION -g -O2 -Wall -I../../vendor/local/include -I../../vendor/local/include/cairo -I../../vendor/loca l/include/pixman-1 -I../../vendor/local/include/freetype2 -I../../vendor/local/include -I/usr/include/libpng12 -c rb_cairo.c rb_cairo.c:17 から include されたファイル中: rb_cairo.h:20:19: error: cairo.h: No such file or directory In file included from rb_cairo.c:17: rb_cairo.h:209: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ▒▒ token rb_cairo.h:210: error: expected ▒▒ before ▒▒ token rb_cairo.h:212: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ▒▒ token rb_cairo.h:213: error: expected ▒▒ before ▒▒ token rb_cairo.h:215: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ▒▒ token rb_cairo.h:216: error: expected ▒▒ before ▒▒ token rb_cairo.h:223: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ▒▒ token rb_cairo.h:224: error: expected ▒▒ before ▒▒ token rb_cairo.h:226: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ▒▒ token rb_cairo.h:227: error: expected ▒▒ before ▒▒ token rb_cairo.h:229: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ▒▒ token rb_cairo.h:230: error: expected ▒▒ before ▒▒ token rb_cairo.h:232: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ▒▒ token rb_cairo.h:233: error: expected ▒▒ before ▒▒ token rb_cairo.h:235: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ▒▒ token rb_cairo.h:236: error: expected ▒▒ before ▒▒ token rb_cairo.h:238: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ▒▒ token rb_cairo.h:239: error: expected ▒▒ before ▒▒ token rb_cairo.h:241: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ▒▒ token rb_cairo.h:242: error: expected ▒▒ before ▒▒ token rb_cairo.h:249: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ▒▒ token rb_cairo.h:250: error: expected ▒▒ before ▒▒ token rb_cairo.h:252: error: expected ▒▒ before ▒▒ token rb_cairo.h:297: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_operator_from_ruby_object▒▒ rb_cairo.h:298: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_antialias_from_ruby_object▒▒ rb_cairo.h:299: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_fill_rule_from_ruby_object▒▒ rb_cairo.h:300: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_line_cap_from_ruby_object▒▒ rb_cairo.h:301: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_line_join_from_ruby_object▒▒ rb_cairo.h:302: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_font_slant_from_ruby_object▒▒ rb_cairo.h:303: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_font_weight_from_ruby_object▒▒ rb_cairo.h:304: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_subpixel_order_from_ruby_object▒▒ rb_cairo.h:305: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_hint_style_from_ruby_object▒▒ rb_cairo.h:306: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_hint_metrics_from_ruby_object▒▒ rb_cairo.h:307: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_path_data_type_from_ruby_object▒▒ rb_cairo.h:308: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_content_from_ruby_object▒▒ rb_cairo.h:309: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_format_from_ruby_object▒▒ rb_cairo.h:310: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_extend_from_ruby_object▒▒ rb_cairo.h:311: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo_filter_from_ruby_object▒▒ rb_cairo.h:335: error: expected ▒▒ before ‘status▒▒ In file included from rb_cairo.c:18: rb_cairo_private.h:81: error: expected declaration specifiers or ..▒▒ before ‘cairo_glyph_t▒▒ rb_cairo_private.h:84: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo__is_kind_of▒▒ rb_cairo_private.h:112: error: expected ‽ ※ ‘asm▒▒ or ‘__attribute__▒▒ before ‘rb_cairo__exception_to_status▒▒ rb_cairo.c: In function ‘rb_cairo_satisfied_version› rb_cairo.c:40: error: ‘CAIRO_VERSION_MAJOR▒▒ undeclared (first use in this function) rb_cairo.c:40: error: (Each undeclared identifier is reported only once rb_cairo.c:40: error: for each function it appears in.)
ググる
Idea, Design, Engineering, Architecture, etc: rubyのTest::UnitのGUIインターフェイス
--with-opt-include を指定するんだそうな。-- も忘れずに
% gem install gtk2 -- --with-opt-include=/usr/include/cairo
おk
_ [cygwin][ruby]cygwin で ruby1.9.2 を入れた
普通にやればおk Ruby Install Guide::Cygwin (ソースから) と書いてあるのでやってみた。エラーになる。
% ./configure --enable-shared % make : gcc: error trying to exec '/usr/lib/gcc/i686-pc-cygwin/4.3.4/collect2.exe': execv: Bad address collect2: vfork: Resource temporarily unavailable make[1]: *** [.ext/i386-cygwin/enc/trans/japanese_sjis.so] エラー 1 make[1]: ディレクトリ `/home/rin/usr/local/ruby-1.9.2-p290' から出ま make: *** [trans] エラー 2
/bin/rebaseall すればよいっていう自分の過去日記 [ 20110520#p04 ] を発見。
- C:\cygwin\usr\x86_64-w64-mingw32\sys-root\mingw を C:\cygwin\usr\x86_64-w64-mingw32\sys-root\mingw.d などに rename
- C:\cygwin\bin\ash.exe 起動
- /bin/rebaseall
これで おk
再度 make する。エラーになる。
: win32ole.c:2725: undefined reference to `_IID_IDispatch :
とかたくさん出た
ググる。
Backport92 - Backport #5042: ruby-1.9.2-p290 Build Error @Cygwin - Ruby Issue Tracking System
LIBRARY_PATH を追加すればおk らしい。
% export LIBRARY_PATH=/usr/lib/w32api:$LD_LIBRARY_PATH; make % make install : installing binary commands: /usr/local/bin installing base libraries: /usr/local/lib installing arch files: /usr/local/lib/ruby/1.9.1/i386-cygwin installing extension objects: /usr/local/lib/ruby/1.9.1/i386-cygwin installing extension objects: /usr/local/lib/ruby/site_ruby/1.9.1/i386-cygwin installing extension objects: /usr/local/lib/ruby/vendor_ruby/1.9.1/i386-cygwin installing extension headers: /usr/local/include/ruby-1.9.1/i386-cygwin installing extension scripts: /usr/local/lib/ruby/1.9.1 installing extension scripts: /usr/local/lib/ruby/site_ruby/1.9.1 installing extension scripts: /usr/local/lib/ruby/vendor_ruby/1.9.1 installing extension headers: /usr/local/include/ruby-1.9.1/ruby installing rdoc: /usr/local/share/ri/1.9.1/system installing capi-docs: /usr/local/share/doc/ruby installing command scripts: /usr/local/bin installing library scripts: /usr/local/lib/ruby/1.9.1 installing common headers: /usr/local/include/ruby-1.9.1 installing manpages: /usr/local/share/man/man1 installing default gems: /usr/local/lib/ruby/gems/1.9.1 (cache, doc, gems, specifications) rake 0.8.7 rdoc 2.5.8 minitest 1.6.0
おk
% ruby --version ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
あら?
% which ruby /usr/bin/ruby
あ
% /usr/local/bin/ruby --version ruby 1.9.2p290 (2011-07-09) [i386-cygwin]
オウフ
[ツッコミを入れる]