_ [debian] smokeping 動かなくなった

perl のヴァージョンが 5.8.4-1 に上がったせい?

DynaLoader object version 1.04 does not match $DynaLoader::VERSION 1.05 at /usr/lib/perl/5.8/DynaLoader.pm line 103.
Compilation failed in require at /usr/lib/perl/5.8/Digest/MD5.pm line 12.
Compilation failed in require at /usr/share/perl5/smokeping/Smokeping.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/smokeping/Smokeping.pm line 8.
Compilation failed in require at smokeping.cgi line 6.
speedy_backend[XXXXX]: perl_parse error
speedy[XXXXX]: Cannot spawn backend process

_ [comp] mono で遊ぶ

環境を整えてやるついでにチェックしてみた。dotgnu と mono どっちがいいかよくわからないんだけど、Debian official に入ってるってことで mono で。 kernel で binfmt_misc いるのか、入れておく。 てことで hello.cs で検索して拾ってきた Hello, World!

% mcs hello.cs

mono でコンパイルしてできたバイナリが Linux でも Win でも動くな。結構面白い。 一方、ウィンドウアプリとなると話は別らしい。System.Windows.Forms ってのが鬼門ぽい。また 検索して拾ってきたウィンドウ版 Hello, World! は、上記のように単純にはコンパイルできなかったので探してみると、 コンパイル時には、-r:System.Windows.Formsを指定するようだ。実際にはそれだけでは足りなくて -r:System.Drawing を追加。これはきちんとエラーとして表示された。

% mcs -r:System.Windows.Forms -r:System.Drawing hello2.cs

とやって作成。できたバイナリは Win 上では動くが、Linux 上では駄目だった。Wine がらみ?

Could not load winelib.exe.so
Unhandled Exception: System.TypeInitializationException:
 An exception was thrown by the type initializer for System.Windows.Forms.Control ---> System.TypeInitializationException:
 An exception was thrown by the type initializer for System.Windows.Forms.Win32 ---> System.DllNotFoundException: winelib.exe.so
in <0x00053> (wrapper managed-to-native) System.Windows.Forms.Win32:WineLoadLibrary (string)
in <0x002e1> System.Windows.Forms.Win32:.cctor ()
--- End of inner exception stack trace ---

in (unmanaged) System.Windows.Forms.Win32:RegisterWindowMessage (string)
in <0x000f2> System.Windows.Forms.Control:.cctor ()
--- End of inner exception stack trace ---

in (unmanaged) System.Windows.Forms.Control:.ctor ()
in <0x0000f> System.Windows.Forms.ScrollableControl:.ctor ()
in <0x0000a> System.Windows.Forms.ContainerControl:.ctor ()
in <0x00017> System.Windows.Forms.Form:.ctor ()
in <0x00023> MyNameSpace.MyForm:.ctor ()
in <0x0004f> (wrapper remoting-invoke-with-check) MyNameSpace.MyForm:.ctor ()
in <0x0001b> MyNameSpace.MyForm:Main ()

まず、最初の問題として、Wine が 1:0.20030603.034328 なのがまずかった。0:0.0.20040408-1 にしたら、wine.exe.so が見つからない問題は解消された。ただし、wineserver が /usr/bin から /usr/lib/wine に移動してしまったので、symlink を張るか PATH に追加してやる必要があった。

Unhandled Exception: System.TypeInitializationException:
 An exception was thrown by the type initializer for System.Windows.Forms.Control ---> System.DllNotFoundException: user32.dll
in <0x00053> (wrapper managed-to-native) System.Windows.Forms.Win32:RegisterWindowMessage (string)
in <0x000f1> System.Windows.Forms.Control:.cctor ()
--- End of inner exception stack trace ---

in (unmanaged) System.Windows.Forms.Control:.ctor ()
in <0x0000f> System.Windows.Forms.ScrollableControl:.ctor ()
in <0x0000a> System.Windows.Forms.ContainerControl:.ctor ()
in <0x00017> System.Windows.Forms.Form:.ctor ()
in <0x00023> MyNameSpace.MyForm:.ctor ()
in <0x0004f> (wrapper remoting-invoke-with-check) MyNameSpace.MyForm:.ctor ()
in <0x0001b> MyNameSpace.MyForm:Main ()

これは user32.dll を持ってこれば解決するんだろうか。手元に user32.dll がないので、今日はこれまで。