LiteLDev / LeviLamina

A lightweight, modular and versatile mod loader for Minecraft Bedrock Edition, formerly known as LiteLoaderBDS
https://levimc.org/software/levilamina
GNU Lesser General Public License v3.0
1.14k stars 117 forks source link

Lua插件无法使用require函数加载socket.dll库 #712

Closed YuChuXi closed 2 years ago

YuChuXi commented 2 years ago

异常模块

ScriptEngine(脚本引擎)

操作系统

GNU/Linux with docker

LiteLoader版本

2.5.1

BDS版本

1.19.20

发生了什么?

使用linux的wine64启动bds时lua脚本无法加载dll库 system: Ubuntu22.04 wine: 7.14 未使用docker

复现此问题的步骤

bedrock_server# git clone https://github.com/yuxibenxi/socket.git bedrock_server# cd plugins plugins# touch test.lua plugins# echo"local socket = require'socket' " > test.lua plugins# cd .. bedrock_server# wine64 bedrock_server_mod.exe

有关的日志/输出

[38;2;173;216;230m22:42:58[0m[38;2;032;178;170m INFO [0m[37m[PreLoader] [Symbol] Loading symbols from pdb...
[0m[38;2;173;216;230m22:43:01[0m[38;2;032;178;170m INFO [0m[37m[PreLoader] [Symbol] Fast Dlsym Loaded <469743>
[0m[38;2;173;216;230m22:43:01[0m[38;2;032;178;170m INFO [0m[37m[PreLoader] LiteLoader.dll Injected.
22:43:01 INFO [CrashLogger] 检测到当前处于Wine环境,内置CrashLogge
r无法工作

          _     _ _       _                    _
         | |   (_) |_ ___| |    ___   __ _  __| | ___ _ __
         | |   | | __/ _ \ |   / _ \ / _` |/ _` |/ _ \ '__|
         | |___| | ||  __/ |__| (_) | (_| | (_| |  __/ |
         |_____|_|\__\___|_____\___/ \__,_|\__,_|\___|_|

       --------   Light-Weight BDS Plugin Loader   ----------

22:43:02 INFO [LiteLoader] 加载原生插件...
22:43:02 INFO [LiteLoader] 原生插件 <LLMoney.dll> 已加载
22:43:02 INFO [LiteLoader] * Js 脚本引擎已加载
22:43:02 INFO [LiteLoader] * Lua 脚本引擎已加载
22:43:02 INFO [LiteLoader] * NodeJs 脚本引擎已加载
22:43:02 INFO [LLMoney] Loaded version: 2.5.0
22:43:02 INFO [LiteLoader] ScriptEngine initializing...

22:43:02 INFO [LiteLoader] 依赖项 BaseLib.lua 已加载。
22:43:02 INFO [LiteLoader] 加载 Lua 插件...
22:43:02 ERROR [LiteLoader] Fail in
Loading Script Plugin!

22:43:02 ERROR [LiteLoader] Fail to
load ./plugins/test.lua!
22:43:02 ERROR [LiteLoader] In Plugi
n: test.lua
Error in Logger::endlImpl
22:43:02 INFO [LiteLoader] 0 个 Lua 插件已加载。
22:43:02 INFO [LiteLoader] 依赖项 BaseLib.js 已加载。
22:43:02 INFO [LiteLoader] 加载 QuickJs 插件...
22:43:02 INFO [LiteLoader] 0 个 QuickJs 插件已加载。
22:43:02 INFO [LiteLoader] 加载 Node.js 插件...
22:43:02 INFO [LiteLoader] 0 个 Node.js 插件包已安装。
22:43:02 INFO [LiteLoader] 0 个 Node.js 插件已加载。
22:43:02 INFO [LiteLoader] 已加载 1 个原生插件
22:43:02 INFO [Server] Starting Server
22:43:02 INFO [Server] Version 1.19.20.02(ProtocolVersion
544) with LiteLoaderBDS 2.5.0
22:43:02 INFO [Server] Session ID 1454e744-368a-465e-ae17-
79b59cfce948
22:43:02 INFO [Server] Level Name: Bedrock level
22:43:02 INFO [Server] Game mode: 1 Creative
22:43:02 INFO [Server] Difficulty: 3 HARD
22:43:02 INFO [Server] opening worlds/Bedrock level/db
22:43:04 INFO [Server] IPv4 supported, port: 19132
22:43:04 INFO [Server] IPv6 supported, port: 19133
22:43:05 INFO [LiteLoader] LiteLoader采用 LGPLv3 许可证开源
22:43:05 INFO [LiteLoader] 我们的新论坛上线了啦! -> https://forum.li
tebds.com
22:43:05 INFO [LiteLoader] 帮助我们翻译&改进翻译 -> https://crowdin.
com/project/liteloaderbds
22:43:05 INFO [LiteLoader] Thanks to RhyMC(rhymc.com) for
the support
22:43:06 INFO [Server] IPv4 supported, port: 39909
22:43:06 INFO [Server] IPv6 supported, port: 53494
22:43:06 INFO [Server] Done (4.4s)! For help, type "help"
or "?"

插件列表

22:56:06 INFO [Server] 插件列表 [4]
22:56:06 INFO [Server] - LLMoney [v2.5.0] (LLMoney.dll)
22:56:06 INFO [Server]   EconomyCore for LiteLoaderBDS
22:56:06 INFO [Server] - ScriptEngine-Lua [v2.5.0] (LiteLoader.Lua.dll)
22:56:06 INFO [Server]   Lua ScriptEngine for LiteLoaderBDS
22:56:06 INFO [Server] - ScriptEngine-QuickJs [v2.5.0] (LiteLoader.Js.dll)
22:56:06 INFO [Server]   Javascript ScriptEngine for LiteLoaderBDS
22:56:06 INFO [Server] - ScriptEngine-NodeJs [v2.5.0] (LiteLoader.NodeJs.dll)
22:56:06 INFO [Server]   Node.js ScriptEngine for LiteLoaderBDS
22:56:06 INFO [Server]
22:56:06 INFO [Server]
22:56:06 INFO [Server] * 使用命令“ll list <Plugin Name>”来获取更多信
息
Redbeanw44602 commented 2 years ago

试试直接用Lua能不能正常加载

YuChuXi commented 2 years ago

我用lua5.4.4的标准环境可以使用

Redbeanw44602 commented 2 years ago

不用wine可以正常加载吗?在本地环境试一下?

YuChuXi commented 2 years ago

我没有Windows系统,让别人试也不行

Redbeanw44602 commented 2 years ago

那就不是Wine或者LL的问题咯?你自己检查下是不是Luasocket库版本和lua对不上,或者缺什么依赖了?

YuChuXi commented 2 years ago

但是在lua5.4.4可以用啊

Redbeanw44602 commented 2 years ago

方便把你的插件和luasocket打包发过来看一下吗,我也有用动态库的lua插件,是可以正常用的

YuChuXi commented 2 years ago

放在https://github.com/yuxibenxi/socket.git

Redbeanw44602 commented 2 years ago

a 非LL问题,检查下编译时链接的库是否有误。

YuChuXi commented 2 years ago

可以,我用lua5.1,和5.4都试过了

---原始邮件--- 发件人: @.> 发送时间: 2022年8月23日(周二) 晚上8:08 收件人: @.>; 抄送: @.**@.>; 主题: Re: [LiteLDev/LiteLoaderBDS] Lua插件无法使用require函数加载socket.dll库 (Issue #712)

试试直接用Lua能不能正常加载

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>