mpx / lua-cjson

Lua CJSON is a fast JSON encoding/parsing module for Lua

Home Page:https://kyne.au/~mark/software/lua-cjson.php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

dauuricus opened this issue · 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 ?
commented

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

Adding -lm to the linking step solves the problem:

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