You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shared libraries should not be installed executable, since the dynamic linker does not require this and trying to execute a shared library usually results in a core dump.
当前 librime 明确检查插件文件是否可执行,这可能导致部分 Linux 发行版的插件无法得到识别。且如不考虑发行版问题,检查是否可执行的意义不明确,似乎是多此一举。如果检查插件是否可执行没有特别的意义,我建议采纳 #518 的修改。
As original author of #431, maybe I thought that executable permission is needed (for plugins loaded by dlopen function which is internally used by boost::dll::shared_library), but apparently it may be dependent on operating system (according to discussion from above URL, executable permission would be needed on HP-UX operating system).
Instead of dropping check for permissions, it may be better to check for readable permission.
On checking readable permission:
Non-readable plugin executable shouldn't be considered a supported case. I prefer logging an error to silently skipping it.
(本 issue 来源于 #518 ,以及 libera.chat
#fcitx
频道 2021-12-30 的讨论)我在作为 Debian Developer 维护 Debian 中的 librime 时注意到以下代码:
librime/plugins/plugins_module.cc
Lines 35 to 46 in bc589fd
如上所示,目前 librime 仅在 plugin 文件具有可执行权限时才尝试加载。但现代 Linux 系统中并无 shared library 一定具有可执行权限的规定。特别地对于 deb 系发行版,Debian Policy ( https://www.debian.org/doc/debian-policy/ch-sharedlibs.html ) 有 shared library 不应添加 executable bit 的规定:
当前 librime 明确检查插件文件是否可执行,这可能导致部分 Linux 发行版的插件无法得到识别。且如不考虑发行版问题,检查是否可执行的意义不明确,似乎是多此一举。如果检查插件是否可执行没有特别的意义,我建议采纳 #518 的修改。
参考:
The text was updated successfully, but these errors were encountered: