<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ものぐさ備忘録 &#187; FFI</title>
	<atom:link href="http://www.ginriki.net/wd/category/ffi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ginriki.net/wd</link>
	<description>ソフトウェア関係の話を中心とした備忘録的日記</description>
	<lastBuildDate>Sun, 16 Jan 2011 20:07:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>rubyプロセスのコアファイルからバックトレースする。（おまけ: python）</title>
		<link>http://www.ginriki.net/wd/2009/11/09/80/</link>
		<comments>http://www.ginriki.net/wd/2009/11/09/80/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 22:00:34 +0000</pubDate>
		<dc:creator>ginriki</dc:creator>
				<category><![CDATA[FFI]]></category>
		<category><![CDATA[GDB]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gdbscript]]></category>

		<guid isPermaLink="false">http://www.ginriki.net/wd/?p=80</guid>
		<description><![CDATA[某所で、「rubyプロセスがSEGVとかした時のコアファイルから、rubyスクリプトのバックトレースは取れるの？」って聞かれたので、ちょっと調べてみました。
結論としては、「rubyメソッドの呼び出し位置(ファイル名,  [...]]]></description>
			<content:encoded><![CDATA[<p>某所で、「rubyプロセスがSEGVとかした時のコアファイルから、rubyスクリプトのバックトレースは取れるの？」って聞かれたので、ちょっと調べてみました。</p>
<p>結論としては、「rubyメソッドの呼び出し位置(ファイル名, 行番号)は取れるけど、呼び出し時の実引数を見るのは難しい」っていう感じです。<br />
rubyのスタックフレームは、当然、rubyプロセスのメモリ上に構築されるので、スタックフレームのデータ構造さえわかれば、ある程度は表示できます。</p>
<p>ただ、コアファイルを出力したrubyプロセスはすでに存在しないので、ruby実装に使われているC関数をデバッガで（正確にはrubyプロセス上で）実行することができません。<br />
そのため、オブジェクトのinspectなどを実行することが難しく、実引数のオブジェクトが何か調べることが困難です。ということで、今回はスタックフレームを表示させる方法を以下で説明します。</p>
<p>rubyスタックフレームを表示するGDBスクリプトは以下になります(rb_dump.gdb)。<br />
(moriyoshiさんのブログ「<a href="http://d.hatena.ne.jp/moriyoshi/20070927/1190910311"> GDBで実行中のスクリプト言語のスタックフレームをダンプしてみる試み</a>」のコードをほとんどそのまま使わせていただきました。ありがとうございます。)</p>
<div class="igBar"><span id="lcode-4"><a href="#" onclick="javascript:showPlainTxt('code-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-4">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">define dump_rb_bt_from_core</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; set $t = ruby_frame</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; while $t</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; printf <span style="color:#CC0000;">"[0x%08x] "</span>, $t</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; if $t-&gt;<span style="">node</span>.<span style="">nd_file</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; printf <span style="color:#CC0000;">"(%s:%d)<span style="color:#000099; font-weight:bold;">\n</span>"</span>, $t-&gt;<span style="">node</span>.<span style="">nd_file</span>, <span style="color:#006600; font-weight:bold;">&#40;</span>$t-&gt;<span style="">node</span>.<span style="">flags</span>&gt;&gt; <span style="color:#800000;color:#800000;">19</span><span style="color:#006600; font-weight:bold;">&#41;</span> &amp; <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">1</span> &lt;&lt;<span style="color:#006600; font-weight:bold;">&#40;</span>sizeof<span style="color:#006600; font-weight:bold;">&#40;</span>NODE*<span style="color:#006600; font-weight:bold;">&#41;</span> * <span style="color:#800000;color:#800000;">8</span> - <span style="color:#800000;color:#800000;">19</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> - <span style="color:#800000;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; else</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; printf <span style="color:#CC0000;">"(UNKNOWN)<span style="color:#000099; font-weight:bold;">\n</span>"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; end</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; set $t = $t-&gt;<span style="">prev</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; end</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">end</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">document dump_rb_bt_from_core</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; dumps the current frame stack from core file. <span style="">usage</span>: dump_rb_bt_from_core</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">end </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>今回はサンプルプログラムとして、0アドレスにアクセスするC拡張ライブラリを実行するrubyスクリプトを用意します。<br />
まず、C拡張ライブラリ(segv.c)、</p>
<div class="igBar"><span id="lc-5"><a href="#" onclick="javascript:showPlainTxt('c-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C:</span>
<div id="c-5">
<div class="c">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #339933;">#include &quot;ruby.h&quot;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">VALUE do_segv<span style="color: #66cc66;">&#40;</span>VALUE self<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; *<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span>*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>0x0<span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> Qnil;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333;">void</span> Init_segv<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; VALUE module;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; module = rb_define_module<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Segv"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; rb_define_module_function<span style="color: #66cc66;">&#40;</span>module, <span style="color: #ff0000;">"do_segv"</span>, &amp;do_segv, <span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
で、後は適当にextconf.rbを作って、segv.soを作ります。</p>
<p>次にsegv.soを呼び出すRubyスクリプト(test.rb)。</p>
<div class="igBar"><span id="lruby-6"><a href="#" onclick="javascript:showPlainTxt('ruby-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-6">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> 'segv'</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">def</span> test1<span style="color:#006600; font-weight:bold;">&#40;</span>a<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; test2<span style="color:#006600; font-weight:bold;">&#40;</span>a<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">def</span> test2<span style="color:#006600; font-weight:bold;">&#40;</span>b<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; Segv::do_segv</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">test1<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>さて、サンプルプログラムの用意ができたので、SEGVさせてみます。</p>
<pre>
$ ulimit -c unlimited
$ ruby test.rb
test.rb:8: [BUG] Segmentation fault
ruby 1.8.5 (2006-08-25) [i386-linux]

アボートしました (core dumped)
</pre>
<p>これでコアファイルが出力されたので、それをGDBで解析します。</p>
<p>今回はCentOS 5.3のyumでインストールしたrubyから出力されたコアファイルなので、<br />
GDBで解析するには、<a href="http://debuginfo.centos.org/">ここ</a>からrubyのdebuginfoをインストールしておく必要があります。</p>
<pre>
$ wget http://debuginfo.centos.org/5/i386/ruby-debuginfo-1.8.5-5.el5_3.7.i386.rpm
# rpm -i ruby-debuginfo-1.8.5-5.el5_3.7.i386.rpm
</pre>
<p>それでは、GDBでコアファイルからrubyのバックトレースをさせてみます。</p>
<pre>
$ gdb ruby core.29443
GNU gdb Fedora (6.8-37.el5)
...
(gdb) backtrace   #通常のC関数レベルのバックトレース。
#0  0x00b3a402 in __kernel_vsyscall ()
#1  0x0056fdf0 in raise () from /lib/libc.so.6
#2  0x00571701 in abort () from /lib/libc.so.6
#3  0x00c514c2 in rb_bug (fmt=<value optimized out>) at error.c:214
#4  0x00cbd80b in sigsegv (sig=<value optimized out>) at signal.c:537
#5  [signal handler called]
#6  do_segv (self=3086662140) at segv.c:4
#7  0x00c54dd5 in call_cfunc (...) at eval.c:5657
#8  0x00c5c4ab in rb_call0 (...) at eval.c:5810

(gdb) source rb_dump.gdb      #この記事の最初に作ったGDBスクリプトをロード
(gdb) dump_rb_bt_from_core  # rubyバックトレース
[0xbfc1da20] (test.rb:8)
[0xbfc1e0e0] (test.rb:4)
[0xbfc1e7c0] (test.rb:11)
[0x00d0f960] Cannot access memory at address 0x4
</pre>
<p>以上になります。</p>
<p>pythonもコアファイルからスタックフレームが取れるか調べてみましたが、<br />
<a href="http://wiki.python.org/moin/DebuggingWithGdb">DebuggingWithGDB</a>のgdbinitスクリプトを読む限り、<br />
rubyと同様に実行していたpythonスクリプトのファイル名と行番号は取れそうです。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ginriki.net/wd/2009/11/09/80/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Haskellだってバグるよねっていう話し（Ｃ言語の関数をHaskellで呼ぶ）</title>
		<link>http://www.ginriki.net/wd/2007/07/09/24/</link>
		<comments>http://www.ginriki.net/wd/2007/07/09/24/#comments</comments>
		<pubDate>Sun, 08 Jul 2007 21:44:59 +0000</pubDate>
		<dc:creator>ginriki</dc:creator>
				<category><![CDATA[FFI]]></category>
		<category><![CDATA[Haskell]]></category>

		<guid isPermaLink="false">http://www.gikogeek.net/wd/?p=24</guid>
		<description><![CDATA[
C言語の関数をHaskellから呼び出すための記述に関する仕様が存在します*1
自分が使っているHaskell処理系のGHCは、この仕様に準拠しています。そこで、この機能を使ってバグったC関数をHaskellから呼ぶこ [...]]]></description>
			<content:encoded><![CDATA[<div class="section">
<p>C言語の関数をHaskellから呼び出すための記述に関する仕様が存在します<span class="footnote"><a href="/gikogeek/#f1" name="fn1" title="http://www.cse.unsw.edu.au/~chak/haskell/ffi/ffi.pdf">*1</a></span></p>
<p>自分が使っているHaskell処理系のGHCは、この仕様に準拠しています。そこで、この機能を使ってバグったC関数をHaskellから呼ぶことでメモリアクセス違反させてみます<span class="footnote"><a href="/gikogeek/#f2" name="fn2" title="このコードを書く際には、こちらの日記を参考にさせていただきました。http://d.hatena.ne.jp/E_Mattsan/20070616">*2</a></span>。</p>
<pre class="syntax-highlight">
<span class="synComment">// foo.c</span>
<span class="synPreProc">#include </span><span class="synConstant">&#34;HsFFI.h&#34;</span>

<span class="synType">static</span> <span class="synType">int</span> mem;

HsPtr wrong_ptr(<span class="synType">int</span> wrong)
{
<span class="synStatement">if</span>(wrong){
<span class="synStatement">return</span> (HsPtr)<span class="synConstant">0xcfcfcfcf</span>;
}<span class="synStatement">else</span>{
<span class="synStatement">return</span> (HsPtr)
}

}
</pre>
<p>このwrong_ptr関数を呼ぶHaskellコードは以下、</p>
<pre class="syntax-highlight">
-- main.hs

import Foreign

foreign import ccall &#34;wrong_ptr&#34; wrong_ptr :: Int -&#62; IO (Ptr Int32)

main = do
ptr &#60;- wrong_ptr 0            -- 変数memのアドレスがptrを束縛する
pokeElemOff ptr 0 5           -- ptr[0] = 5
peekElemOff ptr 0 &#62;&#62;= print   -- 5を出力

ptr &#60;- wrong_ptr 1            -- 0xcfcfcfcfがptrを束縛する
pokeElemOff ptr 0 100         -- メモリアクセス違反!!!
peekElemOff ptr 0 &#62;&#62;= print
</pre>
<p>で、実際にやってみると、<span class="footnote"><a href="/gikogeek/#f3" name="fn3" title="WindowsにmsiパッケージからGHCをインストールした場合、cc1が存在しないっていわれますが、C:/ghc/ghc-6.6.1/gcc-libにPATHを通せば動きます（GHC6.6.1をデフォルトのパスにインストールした場合） ">*3</a></span></p>
<pre class="syntax-highlight">
<span class="synStatement">&#62;</span> ghc foo.c main.hs <span class="synSpecial">-ffi</span> <span class="synSpecial">-o</span> foo
<span class="synStatement">&#62;</span> foo
<span class="synConstant">5</span>
<span class="synStatement">&#60;</span>------ここで異常終了
<span class="synStatement">&#62;</span>
</pre>
<p>この例はわざとらしいですが、Haskellのプログラムも、わかりにくいタイプのバグが入り込む余地があるっていうことがわかると思います。</p>
<p>C言語の関数を使わなきゃ良いっていう意見もあると思いますが、win32apiやらLinux等のシステムコールを直に扱いたい時には使わざる得ないでしょう<span class="footnote"><a href="/gikogeek/#f4" name="fn4" title="win32apiは、ある程度Haskellの標準ライブラリとして用意されてるようです">*4</a></span>。</p>
<p>また、絶対にC言語の関数を使わないっていうスタンスは、既存のライブラリを使ったほうが楽なのに、わざわざHaskellで書き直さなきゃいけないといった問題が発生する点でコストが高いと思います。</p>
<p></p>
<p>個人的には、デバッグ周辺のツールがもう少し充実しないと、普通のプログラムを書くのにHaskellを使う気になれません。上の例よりもっと複雑なコードがバグった時のデバッグ作業を考えると恐ろしすぎます。</p>
<p>GHC6.7からはデバッガが付属するそうなので、正式にリリースされたら使ってみようと思います。</p>
</div>
<div class="footnote">
<p class="footnote"><a href="/gikogeek/#fn1" name="f1">*1</a>：<a href="http://www.cse.unsw.edu.au/~chak/haskell/ffi/ffi.pdf" target="_blank">http://www.cse.unsw.edu.au/~chak/haskell/ffi/ffi.pdf</a></p>
<p class="footnote"><a href="/gikogeek/#fn2" name="f2">*2</a>：このコードを書く際には、こちらの日記を参考にさせていただきました。<a href="http://d.hatena.ne.jp/E_Mattsan/20070616" target="_blank">http://d.hatena.ne.jp/E_Mattsan/20070616</a></p>
<p class="footnote"><a href="/gikogeek/#fn3" name="f3">*3</a>：WindowsにmsiパッケージからGHCをインストールした場合、cc1が存在しないっていわれますが、C:/ghc/ghc-6.6.1/gcc-libにPATHを通せば動きます（GHC6.6.1をデフォルトのパスにインストールした場合） </p>
<p class="footnote"><a href="/gikogeek/#fn4" name="f4">*4</a>：win32apiは、ある程度Haskellの標準ライブラリとして用意されてるようです</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ginriki.net/wd/2007/07/09/24/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

