lua-cjson icon indicating copy to clipboard operation
lua-cjson copied to clipboard

dlopen failed: cannot locate symbol "floor" referenced by ...

Open dauuricus opened this issue 4 years ago • 2 comments

lua-cjson 2.1.0-1

using termux pkg luarocks on armv7a android

u0_a185@localhost ~/luatest> lua -e "require 'cjson'"
lua: error loading module 'cjson' from file
 '/data/data/com.termux/files/usr/lib/lua/5.3/cjson.so':
    dlopen failed: cannot locate symbol "floor" referenced by "/data/data/com.termux/files/usr/lib/lua/5.3/cjson.so"...                                                           stack traceback:
[C]: in ?
[C]: in function 'require'
(command line):1: in main chunk
[C]: in ?

dauuricus avatar Sep 06 '21 16:09 dauuricus

I alse meeted, and how to fix it ? thanks!

jwzl avatar Sep 16 '21 05:09 jwzl

Adding -lm to the linking step solves the problem:

gcc -shared -lm -o cjson.so lua_cjson.o strbuf.o fpconv.o

dosimple avatar Dec 08 '22 13:12 dosimple