Apple SiliconのMacBook Airを買いました。
???「買うとどうなる」
あひる「知らんのか。mikutterInstallBattleが始まる。」
というわけで?mikutterInstallBattleをやっていきしたので記録です。
とはいえ久々なので、まずは過去の誰かの記録を見て思い出すことから。
mikutterinstallbattle [検索]
GitHub - Na0ki/mikutterInstallBattle: mikutterInstallBattle の覚書
はい、パーソナライズのせいな気もしますが私のGitHubリポジトリが出てきました。
過去の私えらい。
ざっと見て思い出したような出さないような。
とりあえず今回の目標は起動するところまでとします。
日本語入力?nanisore oishiino?
バトル環境
名称 |
バージョン |
ハード |
MacBook Air M2 2022 |
OS |
Sonoma (14.2.1) |
ruby |
3.3.0 |
mikutter |
eadafa50 (2024/02/24時点の最新のmaster) |
バトル開始
なぜか既にされていた。mikutterユーザーは新しいマシンを買ったら無意識のうちにmikutterをgit cloneしてしまうものだし仕方がないね。
依存のインストール
以前から必要な依存が変わってるかもしれないので、一旦homebrewでは色々と入れずbundleを走らせてみます。
他の環境構築の過程で必要な依存入れてたらごめんって感じ。
$ bundle
gobject-introspection
An error occurred while installing gobject-introspection (4.1.7), and Bundler cannot continue.
In Gemfile:
gtk3 was resolved to 4.1.7, which depends on
gdk3 was resolved to 4.1.7, which depends on
gdk_pixbuf2 was resolved to 4.1.7, which depends on
gio2 was resolved to 4.1.7, which depends on
gobject-introspection
怒られたので追加
$ brew install gobject-introspection
pango
An error occurred while installing pango (4.1.7), and Bundler cannot continue.
In Gemfile:
gtk3 was resolved to 4.1.7, which depends on
gdk3 was resolved to 4.1.7, which depends on
pango
怒られたので追加
$ brew install pango
これで完走しました。(たしか)
なんだか拍子抜け。
起動
いざ起動
bundle exec ruby mikutter.rb --debug
ruby 3.3.0 環境で実行しているせいか、依存gemでstandard libraryからロードしてるやつがdefault gemになるからGemfileとかに書いとけよってwarningがちょいちょい出てるっぽい(チケットにしろそれはそう)
warning: observer was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add observer to your Gemfile or gemspec.
warning: mutex_m was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile or gemspec. Also contact author of httpclient-2.8.3 to add mutex_m into its gemspec.
途中再現性のないゴタつきはあったものの、起動自体はできてしまいました。
詰まるところがなさすぎでは?
流石に起動して終わりは終わってるのでmastodonのアカウントでも追加しようと思います。
私は social.mikutter.hachune.net にいるので、アカウント追加からmikutterを選んで連携すれば終わりです。
ここでOpenSSL 3.0の問題を引きました。
今mikutterで一番ホットかもしれない気がしなくもない話題です。知らんけど。
(mikutter.rb:17126): Gtk-WARNING **: 20:48:38.827: Couldn't export handle, unsupported windowing system
notice: {MIKUTTER_DIR}/core/serialthread.rb:48:in `force_exit!': all Serial Thread Group jobs canceled.
notice: mikutter.rb:91:in `boot!': raise mainloop exception `OpenSSL::Cipher::CipherError'
notice: mikutter.rb:96:in `error_handling!': catch OpenSSL::Cipher::CipherError
/Users/ahiru/ghq/mikutter/mikutter/plugin/world/keep.rb:125:in `initialize': unsupported (Global default library context, Algorithm (BF-ECB : 0), Properties ()) (OpenSSL::Cipher::CipherError)
from /Users/ahiru/ghq/mikutter/mikutter/plugin/world/keep.rb:125:in `new'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/world/keep.rb:125:in `encrypt'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/world/keep.rb:120:in `block in account_write'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/world/keep.rb:119:in `open'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/world/keep.rb:119:in `account_write'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/world/keep.rb:75:in `block in account_register'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/world/keep.rb:73:in `synchronize'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/world/keep.rb:73:in `account_register'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/world/world.rb:84:in `block (3 levels) in <top (required)>'
from /Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/3.3.0/gems/pluggaloid-1.7.0/lib/pluggaloid/listener.rb:25:in `call'
from /Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/3.3.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:241:in `block (2 levels) in call_all_listeners'
from /Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/3.3.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:240:in `each'
from /Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/3.3.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:240:in `block in call_all_listeners'
from /Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/3.3.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:239:in `catch'
from /Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/3.3.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:239:in `call_all_listeners'
from /Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/3.3.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:62:in `block in call'
from /Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/3.3.0/gems/delayer-1.2.1/lib/delayer/procedure.rb:26:in `run'
from /Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/3.3.0/gems/delayer-1.2.1/lib/delayer/extend.rb:126:in `run_once_without_pop_reserve'
from /Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/3.3.0/gems/delayer-1.2.1/lib/delayer/extend.rb:117:in `run_once'
from /Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/3.3.0/gems/delayer-1.2.1/lib/delayer.rb:38:in `method_missing'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/gtk3/mainloop.rb:23:in `block (2 levels) in mainloop'
from <internal:kernel>:187:in `loop'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/gtk3/mainloop.rb:12:in `block in mainloop'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/gtk3/mainloop.rb:10:in `catch'
from /Users/ahiru/ghq/mikutter/mikutter/plugin/gtk3/mainloop.rb:10:in `mainloop'
from mikutter.rb:79:in `boot!'
from mikutter.rb:115:in `<main>'
これは既にチケット化されており、以下で議論がされているっぽいです。
tsutsuii さんありがとう。
バグ #1585: OpenSSL 3.x 環境 (ubuntu 22.04 等) で mikutter が起動しない - mikutter - やること
私の環境はruby 3.3.0であり、これにバンドルされているopenssl gemのバージョンは3.2.0のため、レガシープロバイダをロードする方法が楽にできます。
というわけで、雑対応。(チケット内の対応をぶっ飛ばしてすんません)
diff --git a/plugin/world/keep.rb b/plugin/world/keep.rb
index c4ae7d3b..ea120a22 100644
--- a/plugin/world/keep.rb
+++ b/plugin/world/keep.rb
@@ -122,12 +122,14 @@ module Plugin::World
account_data end
def encrypt(str)
+ OpenSSL::Provider.load("legacy")
cipher = OpenSSL::Cipher.new('bf-ecb').encrypt
cipher.key_len = ACCOUNT_CRYPT_KEY_LEN
cipher.key = key
cipher.update(str) << cipher.final end
def decrypt(binary_data)
+ OpenSSL::Provider.load("legacy")
cipher = OpenSSL::Cipher.new('bf-ecb').decrypt
cipher.key = key
str = cipher.update(binary_data) << cipher.final
これでなんかアカウント追加できたし、再起動してもmastodonのアカウント読み込みできたし大丈夫なはず。
というわけで日本語が打てないmikutter環境が作れたので、これにてバトル終了です。
taisen arigatou gozaimashita. 39.39 :mikuslime: