cygwin に導入したばかりの emacs が何も言わずに終了する

とある事情で Cygwin を入れることになって、エディターも必要だなあと emacs を入れたところ起動しない。
いや、起動するのだけれどエラーの表示もなしに即終了してしまう。

結論としてはバージョン 24.2-1 の emacs には libgnutls26 パッケージが必要で、しかるに emacs を入れた時に入っていたのは libgnutls28 で、必要なライブラリーが見つからずにプロセスが起きる段階で異常終了していたというもの。追加インストールすることで解決しました。

解決に至るまでの道筋

emacs が何も言わず終了したあと echo $? として終了コードを確認。 128 でした。何かエラーが起きているらしい。
けれど Google さんで emacs cygwin exit code 128 などと検索しても有用な情報はヒットしない。
ptrace は Cygwin になかったので gdb を導入。
gdb ごしに起動してみたところ unknown target exception 0xc0000135 なるエラーが発生している。

$ gdb emacs
GNU gdb (GDB) 7.5.50.20120815-cvs (cygwin-special)
Copyright (C) 2012 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 "i686-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/emacs...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/emacs
[New Thread 5628.0x74c]
dll path too long
dll path too long
gdb: unknown target exception 0xc0000135 at 0x7d64c5cc
During startup program exited with code 0x80.
(gdb)

これは Google 先生、詳しかった。 Missing component だそうで DLL がないときなどに出るエラーだとか。
じゃあ何が足りないんだってことだけれど、 Cygwin のインストール先ディレクトリーを見て emacs-nox.exe を見つけ(X Window なしのコンソール版 emacs ですね)、これを起動してみた。
すると「cyggnutls-26.dll が見つからなかったため、このアプリケーションを開始できませんでした」うんぬんとダイアログボックスが表示され、先の結論にたどりつくことができたという流れ。
あまりに無言で終了されると困っちゃうよね、という話でした。