hchunhui / librime-lua

Extending RIME with Lua scripts
BSD 3-Clause "New" or "Revised" License
309 stars 43 forks source link

使用luarocks 安裝的dynamic library 無法 requrie #313

Open shewer opened 7 months ago

shewer commented 7 months ago

在librime-lua(使用 系統lua 5.4) script 錯誤訊息是 找不到 lua_gettop 在 terninal 下的lua 的 require ok

目前是手動 下載 luarock package 把 so 檔案重新link gcc -shared -llua ..... 才正常

hchunhui commented 7 months ago

重新link也算是一种方法。

另一种是需要在载入 librrime-lua 时,采用 RTLD_GLOBAL 模式,见: https://github.com/hchunhui/ibus-rime.AppImage/blob/ae63bda26fc238ca0a0d6b8372c2a3f0e2b806ac/patches/librime/relocatable-plugins.patch#L10