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

Skynet中使用pbc(protobuf)报错 #1723

Closed
mishuawu opened this issue Mar 22, 2023 · 2 comments
Closed

Skynet中使用pbc(protobuf)报错 #1723

mishuawu opened this issue Mar 22, 2023 · 2 comments

Comments

@mishuawu
Copy link

Skynet中使用pbc(protobuf)报错

下载好pbc之后,进入了binding/lua53目录下,执行make,生成了一个protobuf.so的文件,我把这个文件放到了luaclib下,
然后写了一个lua代码,当我执行 require “protobuf”这条语句时,会报错,报错内容如下:

[:00000008] lua loader error : error loading module 'protobuf.c' from file './luaclib/protobuf.so':
./luaclib/protobuf.so: undefined symbol: lua_newuserdata
stack traceback:
[C]: in ?
[C]: in upvalue 'require'
./skynet/lualib/skynet/require.lua:31: in function 'require'
./lualib/protobuf.lua:1: in main chunk
[C]: in upvalue 'require'
./skynet/lualib/skynet/require.lua:31: in function 'require'
./service/4_2_2_Main.lua:3: in local 'main'
./skynet/lualib/loader.lua:50: in main chunk

想求教下,出现问题的原因,以及解决办法。

@sniper00
Copy link
Contributor

用lua5.4重新编译下

@mishuawu
Copy link
Author

用lua5.4重新编译下

啊,谢谢,确实解决了www

@cloudwu cloudwu closed this as completed Oct 16, 2023
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

3 participants