ARM 架构的 Mac,使用 HomeBrew 安装的 emacs-plus 和 librime,使用的是 fcitx5-rime 没有安装 squirrel。
开始报错找不到 emacs-module.h
和 library 'rime'
,添加一下设置后编译成功,但会立刻闪退。
(setq rime-emacs-module-header-root "/opt/homebrew/include")
(setq rime-librime-root "/opt/homebrew/opt/librime")
安装出现了报错
Last 15 lines from /Users/charl/Library/Logs/Homebrew/librime/03.cmake:
"snappy::RawCompress(char const*, unsigned long, char*, unsigned long*)", referenced from:
leveldb::TableBuilder::WriteBlock(leveldb::BlockBuilder*, leveldb::BlockHandle*) in libleveldb.a[23](table_builder.cc.o)
"snappy::RawUncompress(char const*, unsigned long, char*)", referenced from:
leveldb::ReadBlock(leveldb::RandomAccessFile*, leveldb::ReadOptions const&, leveldb::BlockHandle const&, leveldb::BlockContents*) in libleveldb.a[20](format.cc.o)
"snappy::MaxCompressedLength(unsigned long)", referenced from:
leveldb::TableBuilder::WriteBlock(leveldb::BlockBuilder*, leveldb::BlockHandle*) in libleveldb.a[23](table_builder.cc.o)
"snappy::GetUncompressedLength(char const*, unsigned long, unsigned long*)", referenced from:
leveldb::ReadBlock(leveldb::RandomAccessFile*, leveldb::ReadOptions const&, leveldb::BlockHandle const&, leveldb::BlockContents*) in libleveldb.a[20](format.cc.o)
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
rime.dir/rime/gear/recognizer.cc.o CMakeFiles/rime.dir/rime/gear/reverse_lookup_filter.cc.o CMakeFiles/rime.dir/rime/gear/reverse_lookup_translator.cc.o CMakeFiles/rime.dir/rime/gear/schema_list_translator.cc.o CMakeFiles/rime.dir/rime/gear/script_translator.cc.o CMakeFiles/rime.dir/rime/gear/selector.cc.o CMakeFiles/rime.dir/rime/gear/shape.cc.o CMakeFiles/rime.dir/rime/gear/simplifier.cc.o CMakeFiles/rime.dir/rime/gear/single_char_filter.cc.o CMakeFiles/rime.dir/rime/gear/speller.cc.o CMakeFiles/rime.dir/rime/gear/switch_translator.cc.o CMakeFiles/rime.dir/rime/gear/table_translator.cc.o CMakeFiles/rime.dir/rime/gear/translator_commons.cc.o CMakeFiles/rime.dir/rime/gear/uniquifier.cc.o CMakeFiles/rime.dir/rime/gear/unity_table_encoder.cc.o CMakeFiles/rime.dir/rime/lever/custom_settings.cc.o CMakeFiles/rime.dir/rime/lever/customizer.cc.o CMakeFiles/rime.dir/rime/lever/deployment_tasks.cc.o CMakeFiles/rime.dir/rime/lever/levers_module.cc.o CMakeFiles/rime.dir/rime/lever/levers_stdbool.cc.o CMakeFiles/rime.dir/rime/lever/switcher_settings.cc.o CMakeFiles/rime.dir/rime/lever/user_dict_manager.cc.o "../plugins/CMakeFiles/rime-plugins-objs.dir/plugins_module.cc.o" -L/tmp/librime-20241220-16692-re41r3/lib -Wl,-rpath,/tmp/librime-20241220-16692-re41r3/lib /tmp/librime-20241220-16692-re41r3/lib/libyaml-cpp.a -ldl /tmp/librime-20241220-16692-re41r3/lib/libleveldb.a /tmp/librime-20241220-16692-re41r3/lib/libmarisa.a /tmp/librime-20241220-16692-re41r3/lib/libopencc.a
make[2]: *** [lib/librime.1.12.0.dylib] Error 1
make[1]: *** [src/CMakeFiles/rime.dir/all] Error 2
make: *** [all] Error 2
If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
https://github.com/tshu-w/homebrew-malt/issues
完全不懂编译,问了 ai 也没解决。
回头我再试试手动编译 librime。
问 copilot 修改文件后安上了 librime,但一打开 emacs-rime 还是闪退。
happyo
6
mac下可以直接安装GitHub - rime/squirrel: 【鼠鬚管】Rime for macOS 这个,当作系统输入来用。
然后可以使用GitHub - Mintimate/oh-my-rime: The Simple Config Template Of Rime By Mintimate. QQ Chat-Group: 703260572 等配置这个输入法。
如果想进Emacs的时候自动切换成英文可以在squirrel.yaml里增加下面的配置:
app_options:
com.apple.dt.Xcode:
ascii_mode: true # 开启默认英文
vim_mode: true
org.gnu.Emacs:
ascii_mode: true
vim_mode: true
com.runningwithcrayons.Alfred:
ascii_mode: true
net.kovidgoyal.kitty:
ascii_mode: true
目前Emacs下的vim_mode配置有bug,按Esc不能直接切换成英文,这个我已经提交了一个bug给Emacs。
已经 uninstall 了,没有用。
能用包管理器就不想手动装,但没办法,最后还是手动下载安装弄好了。
我这边在安装了官方 librime 的情况下brew reinstall tshu-w/malt/librime
和你一样的错误
brew uninstall librime && brew install tshu-w/malt/librime
就可以了
我确实已经 uninstall librime了,问了 copilot 后成功安装了 tshu-w/malt/librime,emacs-rime 仍然闪退,只有手动下载安装 librime 才没有闪退。