[emacs-rime] Rime编译failed了,原因是什么啊

gcc lib.c -o librime-emacs.so -fPIC -O2 -Wall -shared -lrime
lib.c: In function ‘set_cursor_pos’:
lib.c:293:16: error: ‘RimeApi {aka struct rime_api_t}’ has no member named ‘set_caret_pos’; did you mean ‘get_caret_pos’?
     rime->api->set_caret_pos(rime->session_id, pos);
                ^~~~~~~~~~~~~
                get_caret_pos
lib.c: In function ‘inline_ascii’:
lib.c:394:18: error: ‘RimeApi {aka struct rime_api_t}’ has no member named ‘user_config_open’; did you mean ‘config_open’?
   if(!rime->api->user_config_open("build/default.yaml", conf)) {
                  ^~~~~~~~~~~~~~~~
                  config_open
Makefile:40: recipe for target 'lib' failed
make: *** [lib] Error 1

我狂按C-\才弄出这么一个错误信息,这什么啊

应该是 librime-dev 版本的原因(我之前用 Debian 9 编译 librime-emacs 也是类似的的报错,换成 Debian 10 就没问题了)

额,从哪里下载呢?我好想进入依赖地狱了,我又不敢下aptitude

应该是 librime 的版本太老了。可以手工编译 librime,不过比较麻烦。

不管是librime还是librime-dev都可以吧?

最好用 1.5.1 的版本(或更高)

我傻了,我该怎么办 :joy:

- Found gflags: /usr/lib/x86_64-linux-gnu/libgflags.so
-- Found glog: /usr/lib/x86_64-linux-gnu/libglog.so
CMake Error at /usr/local/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find GTest (missing: GTEST_LIBRARY GTEST_MAIN_LIBRARY)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.16/Modules/FindGTest.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:97 (find_package)

报错是说缺gtest依赖,试试

sudo apt install libgtest-dev

我后来直接升级成 Debian 10 了,所以没仔细研究,确实依赖问题有时候会很难搞

试过了,没什么用

(换系统吧,Arch 之类的

神奇。。zszs

加油啦w

其实更推荐 gentoo(

怎么办 :joy: librime没有linux的二进制版本

没有,ubuntu或debian的话只能自己编译。arch的话可以直接包管理器装。