• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Need Help with Nostalrius Server Linking

CoolBuys1290

Member
Joined
Aug 23, 2018
Messages
80
Reaction score
8
Getting these errors while trying to link Nostalrius Linux server:

Bash:
/usr/bin/ld: CMakeFiles/tfs.dir/src/combat.cpp.o: in function `ValueCallback::getMinMaxValues(Player*, CombatDamage&, bool) const':

combat.cpp:(.text+0x5165): undefined reference to `lua_pcallk'

/usr/bin/ld: CMakeFiles/tfs.dir/src/combat.cpp.o: in function `TargetCallback::eek:nTargetCombat(Creature*, Creature*) const':

combat.cpp:(.text+0x55a5): 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+0xf0b): undefined reference to `lua_getglobal'

/usr/bin/ld: configmanager.cpp:(.text+0xf6a): 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+0x1088): 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+0x1116): undefined reference to `lua_getglobal'

/usr/bin/ld: configmanager.cpp:(.text+0x1169): undefined reference to `lua_rawlen'

/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::protectedCall(lua_State*, int, int)':

luascript.cpp:(.text+0x11a6): 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+0x142b): undefined reference to `lua_getglobal'

/usr/bin/ld: luascript.cpp:(.text+0x14de): 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+0x1679): 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+0x1ac0): undefined reference to `lua_getglobal'

/usr/bin/ld: luascript.cpp:(.text+0x1bbc): undefined reference to `lua_callk'

/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::registerFunctions()':

luascript.cpp:(.text+0x4721): undefined reference to `lua_setglobal'

/usr/bin/ld: luascript.cpp:(.text+0x475a): undefined reference to `lua_setglobal'

/usr/bin/ld: luascript.cpp:(.text+0x4793): undefined reference to `lua_setglobal'

/usr/bin/ld: luascript.cpp:(.text+0x47cc): undefined reference to `lua_setglobal'

/usr/bin/ld: luascript.cpp:(.text+0x4805): undefined reference to `lua_setglobal'

/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o:luascript.cpp:(.text+0x483e): 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+0x45dcf): 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+0x461b6): 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+0x461f8): 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+0x4633e): 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+0x46381): 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+0x46418): 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+0x4646d): undefined reference to `lua_setglobal'

/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::luaIsInArray(lua_State*)':

luascript.cpp:(.text+0x4a5a4): undefined reference to `lua_compare'

/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::luaAddEvent(lua_State*)':

luascript.cpp:(.text+0x4ad41): undefined reference to `lua_getglobal'

/usr/bin/ld: luascript.cpp:(.text+0x4ad74): undefined reference to `lua_getglobal'

/usr/bin/ld: luascript.cpp:(.text+0x4ade4): undefined reference to `lua_callk'

collect2: error: ld returned 1 exit status

make[2]: *** [CMakeFiles/tfs.dir/build.make:1161: tfs] Error 1

make[1]: *** [CMakeFiles/Makefile2:160: CMakeFiles/tfs.dir/all] Error 2

make: *** [Makefile:84: all] Error 2

I installed all the libraries. I know I have to edit FindLuaJIT.cmake but I don't know what to do specifically.
Please help.
 
Code:
find_path(LUA_INCLUDE_DIR luajit.h
  HINTS
    ENV LUA_DIR
  PATH_SUFFIXES include/luajit-2.0 include
  PATHS
  ~/Library/Frameworks
  /Library/Frameworks
  /sw # Fink
  /opt/local # DarwinPorts
  /opt/csw # Blastwave
  /opt
)

find_library(LUA_LIBRARY
  NAMES luajit-5.1
  HINTS
    ENV LUA_DIR
  PATH_SUFFIXES lib
  PATHS
  ~/Library/Frameworks
  /Library/Frameworks
  /sw
  /opt/local
  /opt/csw
  /opt
)

if(LUA_LIBRARY)
  # include the math library for Unix
  if(UNIX AND NOT APPLE)
    find_library(LUA_MATH_LIBRARY m)
    set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
  # For Windows and Mac, don't need to explicitly include the math library
  else()
    set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
  endif()
endif()

if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")
  file(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" luajit_version_str REGEX "^#define[ \t]+LUAJIT_VERSION[ \t]+\"LuaJIT .+\"")

  string(REGEX REPLACE "^#define[ \t]+LUAJIT_VERSION[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUAJIT_VERSION_STRING "${luajit_version_str}")
  unset(luajit_version_str)
endif()

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT
                                  REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
                                  VERSION_VAR LUAJIT_VERSION_STRING)

mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)

What should I change in FindLuaJIT.cmake?
 
Last edited:
Still getting the same errors:

Bash:
[  1%] Linking CXX executable tfs
/usr/bin/ld: CMakeFiles/tfs.dir/src/combat.cpp.o: in function `ValueCallback::getMinMaxValues(Player*, CombatDamage&, bool) const':
combat.cpp:(.text+0x5165): undefined reference to `lua_pcallk'
/usr/bin/ld: CMakeFiles/tfs.dir/src/combat.cpp.o: in function `TargetCallback::onTargetCombat(Creature*, Creature*) const':
combat.cpp:(.text+0x55a5): 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+0xf0b): undefined reference to `lua_getglobal'
/usr/bin/ld: configmanager.cpp:(.text+0xf6a): 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+0x1088): 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+0x1116): undefined reference to `lua_getglobal'
/usr/bin/ld: configmanager.cpp:(.text+0x1169): undefined reference to `lua_rawlen'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::protectedCall(lua_State*, int, int)':
luascript.cpp:(.text+0x11a6): 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+0x142b): undefined reference to `lua_getglobal'
/usr/bin/ld: luascript.cpp:(.text+0x14de): 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+0x1679): 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+0x1ac0): undefined reference to `lua_getglobal'
/usr/bin/ld: luascript.cpp:(.text+0x1bbc): undefined reference to `lua_callk'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::registerFunctions()':
luascript.cpp:(.text+0x4721): undefined reference to `lua_setglobal'
/usr/bin/ld: luascript.cpp:(.text+0x475a): undefined reference to `lua_setglobal'
/usr/bin/ld: luascript.cpp:(.text+0x4793): undefined reference to `lua_setglobal'
/usr/bin/ld: luascript.cpp:(.text+0x47cc): undefined reference to `lua_setglobal'
/usr/bin/ld: luascript.cpp:(.text+0x4805): undefined reference to `lua_setglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o:luascript.cpp:(.text+0x483e): 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+0x45dcf): 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+0x461b6): 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+0x461f8): 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+0x4633e): 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+0x46381): 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+0x46418): 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+0x4646d): undefined reference to `lua_setglobal'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::luaIsInArray(lua_State*)':
luascript.cpp:(.text+0x4a5a4): undefined reference to `lua_compare'
/usr/bin/ld: CMakeFiles/tfs.dir/src/luascript.cpp.o: in function `LuaScriptInterface::luaAddEvent(lua_State*)':
luascript.cpp:(.text+0x4ad41): undefined reference to `lua_getglobal'
/usr/bin/ld: luascript.cpp:(.text+0x4ad74): undefined reference to `lua_getglobal'
/usr/bin/ld: luascript.cpp:(.text+0x4ade4): undefined reference to `lua_callk'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/tfs.dir/build.make:1161: tfs] Error 1
make[1]: *** [CMakeFiles/Makefile2:160: CMakeFiles/tfs.dir/all] Error 2
make: *** [Makefile:84: all] Error 2


Please help.

Thanks.
 
Back
Top