Lua project builds failed on linux(deepin)

lua project builds failed on linux(deepin),can someone help me ?

Scanning dependencies of target HelloLua
[100%] Building CXX object CMakeFiles/HelloLua.dir/runtime-src/proj.linux/main.cpp.o
[100%] Building CXX object CMakeFiles/HelloLua.dir/runtime-src/Classes/AppDelegate.cpp.o
[100%] Linking CXX executable bin/HelloLua
lib/libluacocos2d.a(loslib.c.o):in function ‘os_tmpname’:
/home/x/workspace/testlua/frameworks/cocos2d-x/external/lua/lua/loslib.c:60: warning:the use of tmpnam' is dangerous, better usemkstemp’
CMakeFiles/HelloLua.dir/runtime-src/Classes/AppDelegate.cpp.o:in function ‘AppDelegate::applicationDidFinishLaunching()’:
/home/x/workspace/testlua/frameworks/runtime-src/Classes/AppDelegate.cpp:63:对‘lua_module_register(lua_State*)’Undefined references
collect2: error: ld returned 1 exit status
CMakeFiles/HelloLua.dir/build.make:143: recipe for target ‘bin/HelloLua’ failed
make[2]: *** [bin/HelloLua] Error 1
CMakeFiles/Makefile2:74: recipe for target ‘CMakeFiles/HelloLua.dir/all’ failed
make[1]: *** [CMakeFiles/HelloLua.dir/all] Error 2
Makefile:83: recipe for target ‘all’ failed
make: *** [all] Error 2
Execute command error, return value:2。

cpp and js project all build passing , cocos2d-x-v3.10

It fails on ubuntu too