Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manjaro 上无法加载 lua 插件 #53

Closed
yanhuacuo opened this issue Mar 7, 2023 · 19 comments
Closed

manjaro 上无法加载 lua 插件 #53

yanhuacuo opened this issue Mar 7, 2023 · 19 comments

Comments

@yanhuacuo
Copy link

看到已关掉的 issues 里,有人反馈过相同的问题,不过那时 fcitx5-rime 的设置界面里有手动加载入口。

看到您两年前回复说已经修复,现在是自动加载的逻辑,当然那个手动加载的入口也没有了。

所到现在 manjaro 的官方仓库里, fcitx5-5.0.15-1 和 librime 1.8.3 这个组合到底是哪里出了问题呢?

看到官方仓库里 librime 1.8.3 的 plugins 下面,是有 librime-lua 这个插件的。

希望大大指点一下。

@XieJiSS
Copy link

XieJiSS commented Mar 7, 2023

https://archlinux.org/packages/community/x86_64/librime/

usr/lib/rime-plugins/
usr/lib/rime-plugins/librime-charcode.so
usr/lib/rime-plugins/librime-lua.so
usr/lib/rime-plugins/librime-octagram.so

似乎并没有看到您说的路径错误的问题。该目录下还有另外两个插件,如果只有 librime-lua 加载有问题的话,更大概率是 librime-lua 本身的问题。

UPDATE: felixonmars/archriscv-packages#2273 (comment)

thread 可以在这里继续,这里是更合适的讨论问题的地方

@CoelacanthusHex
Copy link

librime-lua 曾经改变过脚本的加载方式,也请您检查下是否使用了错误的脚本布局。

@yanhuacuo
Copy link
Author

yanhuacuo commented Mar 7, 2023

librime-lua 曾经改变过脚本的加载方式,也请您检查下是否使用了错误的脚本布局。

https://archlinux.org/packages/community/x86_64/librime/

usr/lib/rime-plugins/
usr/lib/rime-plugins/librime-charcode.so
usr/lib/rime-plugins/librime-lua.so
usr/lib/rime-plugins/librime-octagram.so

似乎并没有看到您说的路径错误的问题。该目录下还有另外两个插件,如果只有 librime-lua 加载有问题的话,更大概率是 librime-lua 本身的问题。

UPDATE: felixonmars/archriscv-packages#2273 (comment)

thread 可以在这里继续,这里是更合适的讨论问题的地方

确认 Arch 源里的 librime 是不能正常加载 lua 组件的

下面,是我解决问题的经过:

** 首先,安装过 fcitx5 , fcitx5-rime 之后:

  • 安装编译依赖
sudo pacman -S gcc --noconfirm
sudo pacman -S cmake --noconfirm
sudo pacman -S extra-cmake-modules --noconfirm
sudo pacman -S pkg-config --noconfirm
sudo pacman -S make --noconfirm
sudo pacman -S boost-libs --noconfirm
sudo pacman -S extra/boost --noconfirm
sudo pacman -S leveldb --noconfirm
sudo pacman -S yaml-cpp --noconfirm
sudo pacman -S gflags --noconfirm
sudo pacman -S google-glog --noconfirm
sudo pacman -S gtest --noconfirm
sudo pacman -S marisa --noconfirm
  • 编译 librime

补足 librime 扩展之后,进入其中,编译:

mkdir build
cd build
cmake ..
make
sudo make install

这样替换了 librime.so 和 librime-lua.so,Lua 组件加载便正常了。

遇到同样问题的朋友,使用这个 编译好的库 ,替换即可。

@XieJiSS
Copy link

XieJiSS commented Mar 8, 2023

无法复现加载失败的问题,看上去在我这里工作正常。不排除是 Manjaro 的打包方式有问题。Arch 用户如果遇到类似问题建议首先 -Syu 然后重启(使用第三方编译产物可能因 ABI 变化而导致不可预期的错误)。

@HowcanoeWang
Copy link

HowcanoeWang commented Oct 8, 2023

遇到了同样的问题,在rime的配置里插件设置直接不出现:

image

控制台输出信息:

fcitx5                                                                                                         ✔  base  
I2023-10-08 16:07:39.681088 instance.cpp:1314] Override Enabled Addons: {}
I2023-10-08 16:07:39.681162 instance.cpp:1315] Override Disabled Addons: {}
I2023-10-08 16:07:39.686631 xcbconnection.cpp:185] Connecting to X11 display, display name::0.
I2023-10-08 16:07:39.699172 addonmanager.cpp:193] Loaded addon xcb
I2023-10-08 16:07:39.699990 addonmanager.cpp:193] Loaded addon quickphrase
I2023-10-08 16:07:39.700083 addonmanager.cpp:193] Loaded addon imselector
I2023-10-08 16:07:39.702089 addonmanager.cpp:193] Loaded addon keyboard
I2023-10-08 16:07:39.703154 addonmanager.cpp:193] Loaded addon dbus
I2023-10-08 16:07:39.713078 addonmanager.cpp:193] Loaded addon fcitx4frontend
I2023-10-08 16:07:39.713742 addonmanager.cpp:193] Loaded addon ibusfrontend
I2023-10-08 16:07:39.714089 addonmanager.cpp:193] Loaded addon xim
E2023-10-08 16:07:39.714903 waylandmodule.cpp:258] Failed to open wayland connection
I2023-10-08 16:07:39.714910 addonmanager.cpp:193] Loaded addon wayland
I2023-10-08 16:07:39.715226 addonmanager.cpp:193] Loaded addon dbusfrontend
I2023-10-08 16:07:39.715460 addonmanager.cpp:193] Loaded addon clipboard
I2023-10-08 16:07:39.715561 addonmanager.cpp:193] Loaded addon waylandim
I2023-10-08 16:07:39.715629 addonmanager.cpp:193] Loaded addon unicode
I2023-10-08 16:07:39.715837 addonmanager.cpp:193] Loaded addon pinyinhelper
I2023-10-08 16:07:39.731752 inputmethodmanager.cpp:198] Found 735 input method(s) in addon keyboard
I2023-10-08 16:07:39.748709 addonmanager.cpp:193] Loaded addon kimpanel
I2023-10-08 16:07:39.748844 addonmanager.cpp:193] Loaded addon virtualkeyboard
I2023-10-08 16:07:39.774799 classicui.cpp:59] Created classicui for x11 display::0
I2023-10-08 16:07:39.774817 addonmanager.cpp:193] Loaded addon classicui
I2023-10-08 16:07:39.775027 addonmanager.cpp:193] Loaded addon notificationitem
I2023-10-08 16:07:39.775416 addonmanager.cpp:193] Loaded addon notifications
I2023-10-08 16:07:39.780864 kimpanel.cpp:113] Kimpanel new owner: 
I2023-10-08 16:07:39.780877 virtualkeyboard.cpp:220] VirtualKeyboard new owner: 
E20231008 16:07:40.985450 217451 plugins_module.cc:54] error loading plugin lua: boost::dll::shared_library::load() failed (dlerror system message: libboost_filesystem.so.1.81.0: 无法打开共享对象文件: 没有那个文件或目录): 错误的文件描述符 [generic:9]
I2023-10-08 16:07:40.998551 addonmanager.cpp:193] Loaded addon rime
I2023-10-08 16:07:52.579192 addonmanager.cpp:193] Loaded addon mozc
E20231008 16:08:07.524506 217451 engine.cc:347] error creating translator: 'lua_translator'

OS版本信息:

██████████████████  ████████   hwang@NERV-Linux 
██████████████████  ████████   ---------------- 
██████████████████  ████████   OS: Manjaro Linux x86_64 
██████████████████  ████████   Kernel: 6.6.0-1-MANJARO 
████████            ████████   Uptime: 2 days, 16 hours, 21 mins 
████████  ████████  ████████   Packages: 1656 (pacman), 31 (flatpak) 
████████  ████████  ████████   Shell: bash 5.1.16 
████████  ████████  ████████   Resolution: 3840x2160 
████████  ████████  ████████   DE: Plasma 5.27.8 
████████  ████████  ████████   WM: KWin 
████████  ████████  ████████   WM Theme: Oxygen 轻氧 
████████  ████████  ████████   Theme: [Plasma], Breeze [GTK2/3] 
████████  ████████  ████████   Icons: KwinDE [Plasma], KwinDE [GTK2/3] 
████████  ████████  ████████   Terminal: konsole 
                               CPU: 13th Gen Intel i9-13900K (32) @ 5.500GHz 
                               GPU: Intel Raptor Lake-S GT1 [UHD Graphics 770] 
                               GPU: NVIDIA GeForce GTX 1650 SUPER 
                               Memory: 17255MiB / 31828MiB 

@XieJiSS 尝试过-Syu,提示所有的都是最新版本

@yanhuacuo 尝试使用你提供的编译号的库,替换了/usr/lib/librime.so.1.8.5rime-plugin/librime-lua.so之后,重启fcitx5 rime输入法无法正常工作。能否提供更加详细的编译步骤,我尝试在本地编译?

  • 编译 librime
    补足 librime 扩展之后,进入其中,编译:

比如补足扩展的步骤是?


PS: 我发现在压缩包里,librime.so.1是指向librime.so.1.8.5的:

image

但是解压缩后,以及默认的安装文件,/usr/lib/librime.so.1都是指向自身的

image

尝试删掉后,用ln -s ./librime.so.1 ./librime.so.1.8.5 修改指向,发现结果依然没有变化。不确定是不是这个原因导致的


感觉破案了,打包的依赖是libboost-1.81,但是manjaro系统里最新装得是libloost1.83

@CoelacanthusHex
Copy link

遇到了同样的问题,在rime的配置里插件设置直接不出现:

image

控制台输出信息:

fcitx5                                                                                                         ✔  base  
I2023-10-08 16:07:39.681088 instance.cpp:1314] Override Enabled Addons: {}
I2023-10-08 16:07:39.681162 instance.cpp:1315] Override Disabled Addons: {}
I2023-10-08 16:07:39.686631 xcbconnection.cpp:185] Connecting to X11 display, display name::0.
I2023-10-08 16:07:39.699172 addonmanager.cpp:193] Loaded addon xcb
I2023-10-08 16:07:39.699990 addonmanager.cpp:193] Loaded addon quickphrase
I2023-10-08 16:07:39.700083 addonmanager.cpp:193] Loaded addon imselector
I2023-10-08 16:07:39.702089 addonmanager.cpp:193] Loaded addon keyboard
I2023-10-08 16:07:39.703154 addonmanager.cpp:193] Loaded addon dbus
I2023-10-08 16:07:39.713078 addonmanager.cpp:193] Loaded addon fcitx4frontend
I2023-10-08 16:07:39.713742 addonmanager.cpp:193] Loaded addon ibusfrontend
I2023-10-08 16:07:39.714089 addonmanager.cpp:193] Loaded addon xim
E2023-10-08 16:07:39.714903 waylandmodule.cpp:258] Failed to open wayland connection
I2023-10-08 16:07:39.714910 addonmanager.cpp:193] Loaded addon wayland
I2023-10-08 16:07:39.715226 addonmanager.cpp:193] Loaded addon dbusfrontend
I2023-10-08 16:07:39.715460 addonmanager.cpp:193] Loaded addon clipboard
I2023-10-08 16:07:39.715561 addonmanager.cpp:193] Loaded addon waylandim
I2023-10-08 16:07:39.715629 addonmanager.cpp:193] Loaded addon unicode
I2023-10-08 16:07:39.715837 addonmanager.cpp:193] Loaded addon pinyinhelper
I2023-10-08 16:07:39.731752 inputmethodmanager.cpp:198] Found 735 input method(s) in addon keyboard
I2023-10-08 16:07:39.748709 addonmanager.cpp:193] Loaded addon kimpanel
I2023-10-08 16:07:39.748844 addonmanager.cpp:193] Loaded addon virtualkeyboard
I2023-10-08 16:07:39.774799 classicui.cpp:59] Created classicui for x11 display::0
I2023-10-08 16:07:39.774817 addonmanager.cpp:193] Loaded addon classicui
I2023-10-08 16:07:39.775027 addonmanager.cpp:193] Loaded addon notificationitem
I2023-10-08 16:07:39.775416 addonmanager.cpp:193] Loaded addon notifications
I2023-10-08 16:07:39.780864 kimpanel.cpp:113] Kimpanel new owner: 
I2023-10-08 16:07:39.780877 virtualkeyboard.cpp:220] VirtualKeyboard new owner: 
E20231008 16:07:40.985450 217451 plugins_module.cc:54] error loading plugin lua: boost::dll::shared_library::load() failed (dlerror system message: libboost_filesystem.so.1.81.0: 无法打开共享对象文件: 没有那个文件或目录): 错误的文件描述符 [generic:9]
I2023-10-08 16:07:40.998551 addonmanager.cpp:193] Loaded addon rime
I2023-10-08 16:07:52.579192 addonmanager.cpp:193] Loaded addon mozc
E20231008 16:08:07.524506 217451 engine.cc:347] error creating translator: 'lua_translator'

请检查并贴出以下命令的输出

  • file /usr/lib/libboost_filesystem.so.1.81.0
  • pacman -Qi boost librime
  • pacman -Si boost librime

@HowcanoeWang
Copy link

HowcanoeWang commented Oct 8, 2023

$ file /usr/lib/libboost_filesystem.so.1.81.0                                                                    ✔  base  
/usr/lib/libboost_filesystem.so.1.81.0: cannot open `/usr/lib/libboost_filesystem.so.1.81.0' (No such file or directory)


$ pacman -Qi boost librime                                                                                       ✔  base  
名字           : boost
版本           : 1.83.0-2
描述           : Free peer-reviewed portable C++ source libraries (development headers)
架构           : x86_64
URL            : https://www.boost.org/
软件许可       : custom
组             : 无提供           : 无依赖于         : boost-libs=1.83.0
可选依赖       : python: for python bindings [已安装]
依赖它         : cgal  pcl
被可选依赖     : 无与它冲突       : 无取代           : 无安装后大小     : 178.93 MiB
打包者         : Evangelos Foutras <foutrelis@archlinux.org>
编译日期       : Mon 04 Sep 2023 03:54:08 AM JST
安装日期       : Sat 07 Oct 2023 01:50:02 PM JST
安装原因       : 作为其他软件包的依赖关系安装安装脚本       : 否验证者         : 数字签名
名字           : librime
版本           : 1:1.8.5-5
描述           : Rime input method engine
架构           : x86_64
URL            : https://github.com/rime/librime
软件许可       : GPL3
组             : 无提供           : 无依赖于         : boost-libs  capnproto  opencc  yaml-cpp  leveldb  librime-data  lua  google-glog  marisa
可选依赖       : 无依赖它         : fcitx5-rime
被可选依赖     : 无与它冲突       : 无取代           : 无安装后大小     : 3.13 MiB
打包者         : Frederik Schwan <freswa@archlinux.org>
编译日期       : Mon 11 Sep 2023 05:29:19 PM JST
安装日期       : Fri 06 Oct 2023 09:10:57 PM JST
安装原因       : 作为其他软件包的依赖关系安装安装脚本       : 否验证者         : 数字签名


$pacman -Si boost librime                                                                                       ✔  base  
软件库         : extra
名字           : boost
版本           : 1.83.0-2
描述           : Free peer-reviewed portable C++ source libraries (development headers)
架构           : x86_64
URL            : https://www.boost.org/
软件许可       : custom
组             : 无提供           : 无依赖于         : boost-libs=1.83.0
可选依赖       : python: for python bindings
与它冲突       : 无取代           : 无下载大小       : 14.43 MiB
安装后大小     : 178.93 MiB
打包者         : Evangelos Foutras <foutrelis@archlinux.org>
编译日期       : Mon 04 Sep 2023 03:54:08 AM JST
验证者         : MD5校验值  SHA-256 校验值  数字签名
软件库         : extra
名字           : librime
版本           : 1:1.8.5-5
描述           : Rime input method engine
架构           : x86_64
URL            : https://github.com/rime/librime
软件许可       : GPL3
组             : 无提供           : 无依赖于         : boost-libs  capnproto  opencc  yaml-cpp  leveldb  librime-data  lua  google-glog  marisa
可选依赖       : 无与它冲突       : 无取代           : 无下载大小       : 884.23 KiB
安装后大小     : 3209.19 KiB
打包者         : Frederik Schwan <freswa@archlinux.org>
编译日期       : Mon 11 Sep 2023 05:29:19 PM JST
验证者         : MD5校验值  SHA-256 校验值  数字签名

manajro安装的是1.83版本:

image

@CoelacanthusHex
Copy link

执行 ldd /usr/lib/rime-plugins/librime-lua.so 把结果贴出来

@HowcanoeWang
Copy link

ldd /usr/lib/rime-plugins/librime-lua.so                                                                       ✔  base  
        linux-vdso.so.1 (0x00007ffdcc786000)
        librime.so.1 (0x00007fc99ba0c000)
        libboost_filesystem.so.1.81.0 => not found
        libboost_atomic.so.1.81.0 => not found
        libboost_regex.so.1.81.0 => not found
        libboost_system.so.1.81.0 => not found
        libglog.so.1 (0x00007fc99b992000)
        libyaml-cpp.so.0.7 => not found
        libgflags.so.2.2 (0x00007fc99b965000)
        libleveldb.so.1 (0x00007fc99b90c000)
        libmarisa.so.0 (0x00007fc99b8e8000)
        libopencc.so.1.1 (0x00007fc99b8aa000)
        libstdc++.so.6 (0x00007fc99b600000)
        libm.so.6 (0x00007fc99b513000)
        libgcc_s.so.1 (0x00007fc99b885000)
        libc.so.6 (0x00007fc99b331000)
        libboost_filesystem.so.1.83.0 => /usr/lib/libboost_filesystem.so.1.83.0 (0x00007fc99b30c000)
        libyaml-cpp.so.0.8 => /usr/lib/libyaml-cpp.so.0.8 (0x00007fc99b2bd000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007fc99bd64000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fc99b87e000)
        libsnappy.so.1 => /usr/lib/libsnappy.so.1 (0x00007fc99b2b1000)
        libboost_atomic.so.1.83.0 => /usr/lib/libboost_atomic.so.1.83.0 (0x00007fc99b2a7000)

@CoelacanthusHex
Copy link

pacman -Qkk librime

@HowcanoeWang
Copy link

HowcanoeWang commented Oct 8, 2023

警告:librime: /usr/lib/librime.so.1 (符号链接路径不匹配)
警告:librime: /usr/lib/librime.so.1 (修改时间不匹配)
警告:librime: /usr/lib/rime-plugins/librime-lua.so (修改时间不匹配)
警告:librime: /usr/lib/rime-plugins/librime-lua.so (大小不匹配)
警告:librime:/usr/lib/rime-plugins/librime-lua.so(MD5校验和不一致)警告:librime:/usr/lib/rime-plugins/librime-lua.so(SHA256校验和不一致)librime: 23 全部文件,2 变化的文件

哦等一下,这个似乎是上面 @yanhuacuo 提供的,我忘记替换回来了,稍等

@CoelacanthusHex
Copy link

那从头开始,把 fcitx5 执行的输出,以及启动完之后 /tmp/rime.fcitx-rime.* 发出来

@HowcanoeWang
Copy link

HowcanoeWang commented Oct 8, 2023

恢复为原始版本的/usr/lib/rime-plugins/librime-lua.so日志:

$ fcitx5 
I2023-10-08 16:30:13.612370 instance.cpp:1314] Override Enabled Addons: {}
I2023-10-08 16:30:13.612392 instance.cpp:1315] Override Disabled Addons: {}
I2023-10-08 16:30:13.616078 xcbconnection.cpp:185] Connecting to X11 display, display name::0.
I2023-10-08 16:30:13.616475 addonmanager.cpp:193] Loaded addon xcb
I2023-10-08 16:30:13.618811 addonmanager.cpp:193] Loaded addon quickphrase
I2023-10-08 16:30:13.619071 addonmanager.cpp:193] Loaded addon imselector
I2023-10-08 16:30:13.624600 addonmanager.cpp:193] Loaded addon keyboard
I2023-10-08 16:30:13.625370 addonmanager.cpp:193] Loaded addon dbus
I2023-10-08 16:30:13.629294 addonmanager.cpp:193] Loaded addon fcitx4frontend
I2023-10-08 16:30:13.630913 addonmanager.cpp:193] Loaded addon ibusfrontend
I2023-10-08 16:30:13.632449 addonmanager.cpp:193] Loaded addon xim
E2023-10-08 16:30:13.636060 waylandmodule.cpp:258] Failed to open wayland connection
I2023-10-08 16:30:13.636098 addonmanager.cpp:193] Loaded addon wayland
I2023-10-08 16:30:13.637253 addonmanager.cpp:193] Loaded addon dbusfrontend
I2023-10-08 16:30:13.637973 addonmanager.cpp:193] Loaded addon clipboard
I2023-10-08 16:30:13.638312 addonmanager.cpp:193] Loaded addon waylandim
I2023-10-08 16:30:13.638551 addonmanager.cpp:193] Loaded addon unicode
I2023-10-08 16:30:13.639225 addonmanager.cpp:193] Loaded addon pinyinhelper
I2023-10-08 16:30:13.667164 inputmethodmanager.cpp:198] Found 735 input method(s) in addon keyboard
I2023-10-08 16:30:13.698891 addonmanager.cpp:193] Loaded addon kimpanel
I2023-10-08 16:30:13.699097 addonmanager.cpp:193] Loaded addon virtualkeyboard
I2023-10-08 16:30:13.720262 classicui.cpp:59] Created classicui for x11 display::0
I2023-10-08 16:30:13.720285 addonmanager.cpp:193] Loaded addon classicui
I2023-10-08 16:30:13.720497 addonmanager.cpp:193] Loaded addon notificationitem
I2023-10-08 16:30:13.720657 addonmanager.cpp:193] Loaded addon notifications
I2023-10-08 16:30:13.722023 kimpanel.cpp:113] Kimpanel new owner: 
I2023-10-08 16:30:13.722038 virtualkeyboard.cpp:220] VirtualKeyboard new owner: 
file:///usr/share/kpackage/kcms/org.fcitx.fcitx5.kcm/contents/ui/main.qml:35:9: QML SwipeListItem: Binding loop detected for property "width"
file:///usr/share/kpackage/kcms/org.fcitx.fcitx5.kcm/contents/ui/main.qml:35:9: QML SwipeListItem: Binding loop detected for property "width"
I2023-10-08 16:30:14.979447 addonmanager.cpp:193] Loaded addon rime

/tmp/rime.fcitx-rime.INFO | WARNING | ERROR 均为之前的报错(19分钟以前),最新的启动没有创建相关日志文件

INFO:

Log file created at: 2023/10/08 16:07:40
Running on machine: NERV-Linux
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
E20231008 16:07:40.985450 217451 plugins_module.cc:54] error loading plugin lua: boost::dll::shared_library::load() failed (dlerror system message: libboost_filesystem.so.1.81.0: 无法打开共享对象文件: 没有那个文件或目录): 错误的文件描述符 [generic:9]
E20231008 16:08:07.524506 217451 engine.cc:347] error creating translator: 'lua_translator'
E20231008 16:08:47.837834 217451 engine.cc:347] error creating translator: 'lua_translator'
E20231008 16:11:26.238620 217451 engine.cc:347] error creating translator: 'lua_translator'

WARNING:

Log file created at: 2023/10/08 16:07:40
Running on machine: NERV-Linux
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
E20231008 16:07:40.985450 217451 plugins_module.cc:54] error loading plugin lua: boost::dll::shared_library::load() failed (dlerror system message: libboost_filesystem.so.1.81.0: 无法打开共享对象文件: 没有那个文件或目录): 错误的文件描述符 [generic:9]
E20231008 16:08:07.524506 217451 engine.cc:347] error creating translator: 'lua_translator'Q
E20231008 16:08:47.837834 217451 engine.cc:347] error creating translator: 'lua_translator'
E20231008 16:11:26.238620 217451 engine.cc:347] error creating translator: 'lua_translator'

ERROR

Log file created at: 2023/10/08 16:07:40
Running on machine: NERV-Linux
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
E20231008 16:07:40.985450 217451 plugins_module.cc:54] error loading plugin lua: boost::dll::shared_library::load() failed (dlerror system message: libboost_filesystem.so.1.81.0: 无法打开共享对象文件: 没有那个文件或目录): 错误的文件描述符 [generic:9]
E20231008 16:08:07.524506 217451 engine.cc:347] error creating translator: 'lua_translator'
E20231008 16:08:47.837834 217451 engine.cc:347] error creating translator: 'lua_translator'
E20231008 16:11:26.238620 217451 engine.cc:347] error creating translator: 'lua_translator'

以及

ldd /usr/lib/rime-plugins/librime-lua.so   
        linux-vdso.so.1 (0x00007ffc3fca1000)
        liblua.so.5.4 => /usr/lib/liblua.so.5.4 (0x00007f6cc1fbd000)
        librime.so.1 => /usr/lib/librime.so.1 (0x00007f6cc1dce000)
        libboost_filesystem.so.1.83.0 => /usr/lib/libboost_filesystem.so.1.83.0 (0x00007f6cc1da9000)
        libglog.so.1 => /usr/lib/libglog.so.1 (0x00007f6cc1d73000)
        libopencc.so.1.1 => /usr/lib/libopencc.so.1.1 (0x00007f6cc1d37000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f6cc1a00000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f6cc1d10000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f6cc181e000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f6cc1731000)
        libyaml-cpp.so.0.8 => /usr/lib/libyaml-cpp.so.0.8 (0x00007f6cc1cc1000)
        libleveldb.so.1 => /usr/lib/libleveldb.so.1 (0x00007f6cc16d8000)
        libmarisa.so.0 => /usr/lib/libmarisa.so.0 (0x00007f6cc1c9d000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f6cc2134000)
        libboost_atomic.so.1.83.0 => /usr/lib/libboost_atomic.so.1.83.0 (0x00007f6cc1c91000)
        libgflags.so.2.2 => /usr/lib/libgflags.so.2.2 (0x00007f6cc16ab000)
        libsnappy.so.1 => /usr/lib/libsnappy.so.1 (0x00007f6cc1c85000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f6cc1c80000)

看起来好像是rime压根就没加载lua插件?

@CoelacanthusHex
Copy link

不好说,INFO 日志也啥都没有,我感觉像是 rime 也没正常工作,可能得问问开发者

@HowcanoeWang
Copy link

不好说,INFO 日志也啥都没有,我感觉像是 rime 也没正常工作,可能得问问开发者

但是默认的时候,rime的打字啥的都挺正常的,只是lua插件不能用

@wengxt
Copy link
Member

wengxt commented Oct 8, 2023

你安裝的包有問題

E20231008 16:07:40.985450 217451 plugins_module.cc:54] error loading plugin lua: boost::dll::shared_library::load() failed (dlerror system message: libboost_filesystem.so.1.81.0: 无法打开共享对象文件: 没有那个文件或目录): 错误的文件描述符 [generic:9]

這個鏈接的 boost 和你系統上的不一致

建議相關的包全都從官方源重新下載

@HowcanoeWang
Copy link

你安裝的包有問題

E20231008 16:07:40.985450 217451 plugins_module.cc:54] error loading plugin lua: boost::dll::shared_library::load() failed (dlerror system message: libboost_filesystem.so.1.81.0: 无法打开共享对象文件: 没有那个文件或目录): 错误的文件描述符 [generic:9]

這個鏈接的 boost 和你系統上的不一致

建議相關的包全都從官方源重新下載

这个是由于忘记把上面提供的so文件替换回去导致的:

#53 (comment)
遇到同样问题的朋友,使用这个 编译好的库 ,替换即可。

恢复成官方文件之后,没有报错也没有日志,能正常打字使用,但是插件设置UI依然不出现,详情在这里。#53 (comment)

@rocka
Copy link
Member

rocka commented Oct 8, 2023

7f08341

插件设置 UI 只对 librime 1.7.0 以下版本有效,高于这个版本的 librime 会自己加载插件

@HowcanoeWang
Copy link

HowcanoeWang commented Oct 8, 2023

7f08341

插件设置 UI 只对 librime 1.7.0 以下版本有效,高于这个版本的 librime 会自己加载插件

抱歉,在知道非UI问题后,经测试,lua插件是可以正常运行的,导致之前的误判原因在于:

  1. 从rime-lua的官方文档复制的date代码,混合了缩进和空格
  2. 上述问题修复后,由于自身添加了一些词库,把date转换成日期的选项顶到了第三页后面,而不是插件说明中的第一个选项

把词库都屏蔽后,插件确实能出现为第一个选项,正常运行。

感谢大佬们的耐心解答!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants