2019-06-21

lang/mono2がビルドできない

dynabook SS SX/15Aに入れたNetBSD/i386のアプリケーションを更新するためにpkg_rolling-replaceを実行しています。lang/rustの更新が上手くいかず手間取りました。しかし未解決のまま、先にすすめています。順調に処理が進んだかと思ったら、lang/mono2でエラーになりました。このパッケージは以前にも失敗しており、同じ現象が出ています。

失敗した時点のログは以下のようになっています。
gmake[7]: Entering directory '/usr/pkgsrc/lang/mono2/work/mono-2.10.9/mcs/tools/gacutil'
/usr/pkg/bin/gmake all-local
gmake[8]: Entering directory '/usr/pkgsrc/lang/mono2/work/mono-2.10.9/mcs/tools/gacutil'
MCS     [basic] gacutil.exe
mv gacutil.exe ./../../class/lib/basic/gacutil.exe
mv: rename gacutil.exe to ./../../class/lib/basic/gacutil.exe: No such file or directory
gmake[8]: *** [../../build/executable.make:106: ../../class/lib/basic/gacutil.exe] Error 1
gmake[8]: Leaving directory '/usr/pkgsrc/lang/mono2/work/mono-2.10.9/mcs/tools/gacutil'

ビルドに失敗した直接の原因は、ログにもあるように、gacutil.exeが存在しないため、mvに失敗したことです。なぜファイルが存在しないのかを探ってみると、コアファイルが残っていました。
# ls -l /usr/pkgsrc/lang/mono2/work/mono-2.10.9/mcs/tools/gacutil
total 718
-rw-rw-r--  1 furusawa  furusawa   12419 Feb  4  2012 ChangeLog
-rw-rw-r--  1 furusawa  furusawa     198 Jan 31  2012 Makefile
-rw-rw-r--  1 furusawa  furusawa   28150 Jan 31  2012 driver.cs
-rw-rw-r--  1 furusawa  furusawa      43 Nov 16  2011 gacutil.exe.sources
-rw-------  1 root      furusawa  668188 Jun 20 17:50 mono.core

このディレクトリで処理が正常に行われればgacutil.exeが作られるはずなのでしょう。ところがコアを吐いているところをみると、何か問題があるようです。折角コアが出来ているので、念のために状況を確認してみました。
# gdb  ../../../mono/mini/mono mono.core
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486--netbsdelf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ../../../mono/mini/mono...done.
[New process 1]
Core was generated by `mono'.
Program terminated with signal SIGABRT, Aborted.
#0  0xad063df7 in _lwp_kill () from /usr/lib/libc.so.12
(gdb) where
#0  0xad063df7 in _lwp_kill () from /usr/lib/libc.so.12
#1  0xad063d81 in raise () from /usr/lib/libc.so.12
#2  0xad063a57 in abort () from /usr/lib/libc.so.12
#3  0x080e0617 in mono_handle_native_sigsegv (signal=signal@entry=11, ctx=ctx@entry=0xbfb6eba4) at mini-exceptions.c:2223
#4  0x08061228 in mono_sigsegv_signal_handler (_dummy=11, info=0xbfb6eb24, context=0xbfb6eba4) at mini.c:5875
#5  <signal handler called>
#6  GC_push_all_eager (bottom=bottom@entry=0x0, top=top@entry=0xbfb6ef6c "") at mark.c:1468
#7  0x0820cdab in GC_push_current_stack (cold_gc_frame=cold_gc_frame@entry=0xbfb6ef6c "") at mark_rts.c:491
#8  0x08220e5c in GC_with_callee_saves_pushed (arg=0xbfb6ef6c "", fn=<optimized out>) at mach_dep.c:476
#9  GC_generic_push_regs (cold_gc_frame=cold_gc_frame@entry=0xbfb6ef6c "") at mach_dep.c:487
#10 0x0820ce81 in GC_push_roots (all=all@entry=1, cold_gc_frame=cold_gc_frame@entry=0xbfb6ef6c "") at mark_rts.c:631
#11 0x0820c37f in GC_mark_some (cold_gc_frame=cold_gc_frame@entry=0xbfb6ef6c "") at mark.c:391
#12 0x08205d75 in GC_stopped_mark (stop_func=stop_func@entry=0x8205ac0 <GC_never_stop_func>) at alloc.c:543
#13 0x0820637d in GC_try_to_collect_inner (stop_func=0x8205ac0 <GC_never_stop_func>) at alloc.c:382
#14 0x0820dd0b in GC_init_inner () at misc.c:820
#15 0x0820ddd2 in GC_init_inner () at misc.c:603
#16 GC_init () at misc.c:517
#17 0x08127676 in mono_gc_base_init () at boehm-gc.c:126
#18 0x081423c0 in mono_init_internal (filename=filename@entry=0xbfb6f8d8 "./../../class/lib/basic/mcs.exe", exe_filename=exe_filename@entry=0xbfb6f8d8 "./../../class/lib/basic/mcs.exe", runtime_version=runtime_version@entry=0x0) at domain.c:1303
#19 0x081437ae in mono_init_from_assembly (domain_name=domain_name@entry=0xbfb6f8d8 "./../../class/lib/basic/mcs.exe", filename=filename@entry=0xbfb6f8d8 "./../../class/lib/basic/mcs.exe") at domain.c:1688
#20 0x0806225f in mini_init (filename=0xbfb6f8d8 "./../../class/lib/basic/mcs.exe", runtime_version=runtime_version@entry=0x0) at mini.c:6348
#21 0x080ba9d4 in mono_main (argc=14, argv=0xbfb6f1b8) at driver.c:1746
#22 0x080576f6 in ___start ()
#23 0x08057427 in _start ()
(gdb)

コアが吐かれた原因は分かりません。何かの不整合があるのかもしれないし、もしかするとハードウェアのどこかに問題を抱えているのかもしれません。

この状況をどのようにして打開すればよいのか考えてみました。もしビルドしている環境(ハードウェアの何らかの故障や、OSの些細な不整合)が問題の原因であるなら、他のマシンでビルドすれば成功するかもしれません。そこでWindows10上のVirtualBoxを利用して、NetBSD/i386の環境を作ってみました。新規にOSをインストールし、そこでlang/mono2をビルドしてみました。これでうまくいくと思ったのですが、なんと同様のエラーが出て、やはりビルドできませんでした。そもそもlang/mono2は正常にビルド出来る状態にあるのか、不信感が生じてきました。

根本に立ち返ると、mono2が必要な理由は、security/KeePassが必要としているからです。KeePassを利用しようと思った理由は、dynabook SS SX/15Aに当初インストールされていたWindows VistaでID Managerという管理ソフトを利用しており、その移行先として利用してみようと思ったからです。移行先はKeePassに限定されるわけではないので、mono2にこれほど手間取るのであれば、KeePass以外の類似ツールを検討してみようかと考えています。

0 件のコメント:

コメントを投稿