操作
バグ #1270
完了GEM_HOMEにライブラリをインストールしてもvendor/にあるライブラリが読み込まれる
プラグイン名:
ブランチ:
クラッシュする:
はい
説明
GEM_HOME
を設定してbundle install
するとGEM_HOME
以下に依存ライブラリがインストールされる。
しかし、その後bundle exec ./mikutter.rb
するとvendor/
が存在する場合はそちらにあるライブラリが読み込まれる。
この挙動により、vendor/
にある.soが利用できない環境ではライブラリのインストール後も起動時にld.so
のエラーで起動することができない。bundle install
の前後に関わらずvendor/
を削除すると起動することができるようになる。
報告者は以下の環境でテストした。
- mikutter 3.7.1, OpenBSD 6.3 amd64,
vendor/
あり(起動失敗) - mikutter 3.7.1, OpenBSD 6.3 amd64,
vendor/
なし(起動成功) - mikutter
4cf829202d
, OpenBSD 6.3 amd64(起動成功、vendor/
はバンドルされていない)
この挙動について、としぁさんから現段階では意図した仕様である旨を確認している。(https://social.mikutter.hachune.net/@toshi_a/100116959221271340)
Masanori Ogino あー、難しいな、確かに仕様ではあるけど、tarballやArch含むいくつかのディストリではこの仕様を利用してるし、問題になるケースを具体的に報告されたらどこかのマイナーアップデートで廃止しようということになるかも。
OpenBSD 6.3 GENERIC.MP amd64での例:
bash-4.4$ bundle25 exec ./mikutter.rb Traceback (most recent call last): 66: from ./mikutter.rb:42:in `<main>' 65: from /home/omasanori/mikutter/core/miquire.rb:18:in `miquire' 64: from /home/omasanori/mikutter/core/miquire.rb:75:in `miquire' 63: from /home/omasanori/mikutter/core/miquire.rb:75:in `each' 62: from /home/omasanori/mikutter/core/miquire.rb:76:in `block in miquire' 61: from /home/omasanori/mikutter/core/miquire.rb:95:in `file_or_directory_require' 60: from /home/omasanori/mikutter/core/miquire.rb:98:in `miquire_original_require' 59: from /home/omasanori/mikutter/core/miquire.rb:98:in `require' 58: from /home/omasanori/mikutter/core/boot/load_plugin.rb:10:in `<top (required)>' 57: from /home/omasanori/mikutter/core/miquire_plugin.rb:96:in `load_all' 56: from /home/omasanori/mikutter/core/miquire_plugin.rb:36:in `each_spec' 55: from /home/omasanori/mikutter/core/miquire_plugin.rb:33:in `each' 54: from /home/omasanori/mikutter/core/miquire_plugin.rb:33:in `each' 53: from /home/omasanori/mikutter/core/miquire_plugin.rb:38:in `block in each_spec' 52: from /home/omasanori/mikutter/core/miquire_plugin.rb:98:in `block in load_all' 51: from /home/omasanori/mikutter/core/miquire_plugin.rb:146:in `load' 50: from /home/omasanori/mikutter/core/utils.rb:278:in `atomic' 49: from /usr/local/lib/ruby/2.5/monitor.rb:226:in `mon_synchronize' 48: from /home/omasanori/mikutter/core/utils.rb:278:in `block in atomic' 47: from /home/omasanori/mikutter/core/miquire_plugin.rb:147:in `block in load' 46: from /home/omasanori/mikutter/core/miquire_plugin.rb:147:in `each' 45: from /home/omasanori/mikutter/core/miquire_plugin.rb:149:in `block (2 levels) in load' 44: from /home/omasanori/mikutter/core/miquire_plugin.rb:146:in `load' 43: from /home/omasanori/mikutter/core/utils.rb:278:in `atomic' 42: from /usr/local/lib/ruby/2.5/monitor.rb:226:in `mon_synchronize' 41: from /home/omasanori/mikutter/core/utils.rb:278:in `block in atomic' 40: from /home/omasanori/mikutter/core/miquire_plugin.rb:147:in `block in load' 39: from /home/omasanori/mikutter/core/miquire_plugin.rb:147:in `each' 38: from /home/omasanori/mikutter/core/miquire_plugin.rb:149:in `block (2 levels) in load' 37: from /home/omasanori/mikutter/core/miquire_plugin.rb:146:in `load' 36: from /home/omasanori/mikutter/core/utils.rb:278:in `atomic' 35: from /usr/local/lib/ruby/2.5/monitor.rb:226:in `mon_synchronize' 34: from /home/omasanori/mikutter/core/utils.rb:278:in `block in atomic' 33: from /home/omasanori/mikutter/core/miquire_plugin.rb:158:in `block in load' 32: from /home/omasanori/mikutter/core/miquire_plugin.rb:158:in `load' 31: from /home/omasanori/mikutter/core/plugin/gtk/gtk.rb:7:in `<top (required)>' 30: from /home/omasanori/mikutter/core/miquire.rb:18:in `miquire' 29: from /home/omasanori/mikutter/core/miquire.rb:75:in `miquire' 28: from /home/omasanori/mikutter/core/miquire.rb:75:in `each' 27: from /home/omasanori/mikutter/core/miquire.rb:76:in `block in miquire' 26: from /home/omasanori/mikutter/core/miquire.rb:95:in `file_or_directory_require' 25: from /home/omasanori/mikutter/core/miquire.rb:98:in `miquire_original_require' 24: from /home/omasanori/mikutter/core/miquire.rb:98:in `require' 23: from /home/omasanori/mikutter/core/mui/cairo_inner_tl.rb:3:in `<top (required)>' 22: from /home/omasanori/mikutter/core/miquire.rb:18:in `miquire' 21: from /home/omasanori/mikutter/core/miquire.rb:75:in `miquire' 20: from /home/omasanori/mikutter/core/miquire.rb:75:in `each' 19: from /home/omasanori/mikutter/core/miquire.rb:76:in `block in miquire' 18: from /home/omasanori/mikutter/core/miquire.rb:95:in `file_or_directory_require' 17: from /home/omasanori/mikutter/core/miquire.rb:98:in `miquire_original_require' 16: from /home/omasanori/mikutter/core/miquire.rb:98:in `require' 15: from /home/omasanori/mikutter/core/mui/cairo_timeline.rb:9:in `<top (required)>' 14: from /home/omasanori/mikutter/core/miquire.rb:18:in `miquire' 13: from /home/omasanori/mikutter/core/miquire.rb:75:in `miquire' 12: from /home/omasanori/mikutter/core/miquire.rb:75:in `each' 11: from /home/omasanori/mikutter/core/miquire.rb:76:in `block in miquire' 10: from /home/omasanori/mikutter/core/miquire.rb:95:in `file_or_directory_require' 9: from /home/omasanori/mikutter/core/miquire.rb:98:in `miquire_original_require' 8: from /home/omasanori/mikutter/core/miquire.rb:98:in `require' 7: from /home/omasanori/mikutter/core/mui/gtk_postbox.rb:9:in `<top (required)>' 6: from /home/omasanori/mikutter/core/mui/gtk_postbox.rb:9:in `require' 5: from /home/omasanori/mikutter/vendor/twitter-text.rb:22:in `<top (required)>' 4: from /home/omasanori/mikutter/vendor/twitter-text.rb:22:in `each' 3: from /home/omasanori/mikutter/vendor/twitter-text.rb:23:in `block in <top (required)>' 2: from /home/omasanori/mikutter/vendor/twitter-text.rb:23:in `require' 1: from /home/omasanori/mikutter/vendor/twitter-text/extractor.rb:2:in `<top (required)>' /home/omasanori/mikutter/vendor/twitter-text/extractor.rb:2:in `require': Cannot load specified object - /home/omasanori/mikutter/vendor/idn.so (LoadError)
再現手順
1. Linux x86_64でない環境を用意する
2. GEM_HOME=$HOME/gems; export GEM_HOME
3. cd mikutter; bundle install
4. bundle exec ./mikutter.rb
Masanori Ogino さんが6年以上前に更新
- トラッカー を 機能 から バグ に変更
- 開始日 を削除 (
2018-06-15) - 再現手順 を更新 (差分)
- クラッシュする を はい にセット
操作