I still get errors even after deleting -Werror from the CMakeLists.txt file.
sudo nano CMakeLists.txt
sudo dpkg -L libluajit-5.1-dev
/usr/include/luajit-2.1/
/usr/lib/x86_64-linux-gnu/
otpch.h
you have to delete the line of weapons.cpp in cmake list in src as CMakeLists.txt.
sudo apt-get install -y liblua5.2-dev
/usr/include/lua5.2
sudo apt install liblua5.2-dev
sudo apt install libluajit-5.1-dev
{standard input}: Assembler messages:
{standard input}:24024: Warning: end of file not at end of a line; newline inserted
{standard input}:24475: Error: no such instruction: `mo'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [CMakeFiles/tfs.dir/build.make:166: CMakeFiles/tfs.dir/src/behaviourdatabase.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:179: CMakeFiles/tfs.dir/all] Error 2
make: *** [Makefile:103: all] Error 2
/usr/bin/ld: CMakeFiles/tfs.dir/src/combat.cpp.o: in function `ValueCallback::getMinMaxValues(Player*, CombatDamage&, bool) const':
combat.cpp
.text+0x51d1): undefined reference to `lua_pcallk'
/usr/bin/ld: CMakeFiles/tfs.dir/src/combat.cpp.o: in function `TargetCallback:
nTargetCombat(Creature*, Creature*) const':
combat.cpp
.text+0x560d): undefined reference to `lua_pcallk'
/usr/bin/ld: CMakeFiles/tfs.dir/src/configmanager.cpp.o: in function `ConfigManager::load()':
configmanager.cpp
.text+0xd2): undefined reference to `lua_pcallk'
/usr/bin/ld: CMakeFiles/tfs.dir/src/configmanager.cpp.o: in function `ConfigManager::getGlobalString[abi:cxx11](lua_State*, char const*, char const*)':
configmanager.cpp
.text+0xf09): undefined reference to `lua_getglobal'
/usr/bin/ld: configmanager.cpp
.text+0xf68): undefined reference to `lua_rawlen'
/usr/bin/ld: CMakeFiles/tfs.dir/src/configmanager.cpp.o: in function `ConfigManager::getGlobalNumber(lua_State*, char const*, int)':
configmanager.cpp
.text+0x1086): undefined reference to `lua_getglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/configmanager.cpp.o: in function `ConfigManager::getGlobalBoolean(lua_State*, char const*, bool)':
configmanager.cpp
.text+0x1114): undefined reference to `lua_getglobal'
/usr/bin/ld: configmanager.cpp
.text+0x1167): undefined reference to `lua_rawlen'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface:
rotectedCall(lua_State*, int, int)':
luascript.cpp
.text+0x11a2): undefined reference to `lua_pcallk'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::getEvent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
luascript.cpp
.text+0x1425): undefined reference to `lua_getglobal'
/usr/bin/ld: luascript.cpp
.text+0x14d8): undefined reference to `lua_setglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::getMetaEvent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
luascript.cpp
.text+0x1673): undefined reference to `lua_getglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::getStackTrace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
luascript.cpp
.text+0x1ab6): undefined reference to `lua_getglobal'
/usr/bin/ld: luascript.cpp
.text+0x1bb2): undefined reference to `lua_callk'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::registerFunctions()':
luascript.cpp
.text+0x4743): undefined reference to `lua_setglobal'
/usr/bin/ld: luascript.cpp
.text+0x477c): undefined reference to `lua_setglobal'
/usr/bin/ld: luascript.cpp
.text+0x47b5): undefined reference to `lua_setglobal'
/usr/bin/ld: luascript.cpp
.text+0x47ee): undefined reference to `lua_setglobal'
/usr/bin/ld: luascript.cpp
.text+0x4827): undefined reference to `lua_setglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o:luascript.cpp
.text+0x4860): more undefined references to `lua_setglobal' follow
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::registerClass(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int (
)(lua_State))':
luascript.cpp
.text+0x45ded): undefined reference to `lua_getglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::registerTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
luascript.cpp
.text+0x46202): undefined reference to `lua_setglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::registerMethod(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int (
)(lua_State))':
luascript.cpp
.text+0x46244): undefined reference to `lua_getglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::registerGlobalMethod(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int (
)(lua_State))':
luascript.cpp
.text+0x4638a): undefined reference to `lua_setglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::registerVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double)':
luascript.cpp
.text+0x463cd): undefined reference to `lua_getglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::registerGlobalVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double)':
luascript.cpp
.text+0x46464): undefined reference to `lua_setglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::registerGlobalBoolean(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
luascript.cpp
.text+0x464b9): undefined reference to `lua_setglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::luaIsInArray(lua_State*)':
luascript.cpp
.text+0x4a74e): undefined reference to `lua_compare'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::luaAddEvent(lua_State*)':
luascript.cpp
.text+0x4aeeb): undefined reference to `lua_getglobal'
/usr/bin/ld: luascript.cpp
.text+0x4af1e): undefined reference to `lua_getglobal'
/usr/bin/ld: luascript.cpp
.text+0x4af8e): undefined reference to `lua_callk'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/tfs.dir/build.make:1179: tfs] Error 1
make[1]: *** [CMakeFiles/Makefile2:179: CMakeFiles/tfs.dir/all] Error 2
make: *** [Makefile:103: all] Error 2