• 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!

[ubuntu 18.04] problem compiling at this distribution, this wasn't happening with win 10

Then tell CMake how to find them manually?

In your build folder, this command should show you everything you can tell CMake.
cmake ./../ -LA
You can even filter that to get just the stuff about lua!
cmake ./../ -LA | grep -i lua

For example, here is my output for that exact command in my TFS 1.3 folder:
Bash:
# [ ~/src/otserver_forgotten/build ]
$ cmake ./../ -LA | grep -i lua
LUA_INCLUDE_DIR:PATH=/usr/include/luajit-2.0
LUA_LIBRARIES:STRING=/usr/lib/libluajit-5.1.so;/usr/lib/libm.so
LUA_LIBRARY:FILEPATH=/usr/lib/libluajit-5.1.so
LUA_MATH_LIBRARY:FILEPATH=/usr/lib/libm.so
USE_LUAJIT:BOOL=ON


Here are two things you could have found in seconds on Google and should be all you need to complete this puzzle:
# How to find installed libraries and headers -> Near the very top in a Google is StackOverflow
# And you watched me used find and grep extensively when I helped you over remote.
# One would hope you'd have played with them more after seeing how powerful they are.
find /usr/include/ /usr/lib/ | grep -i "luajit"
Bash:
$ find /usr/include/ /usr/lib/ | grep -i "luajit"
/usr/include/luajit-2.0
/usr/include/luajit-2.0/lauxlib.h
/usr/include/luajit-2.0/lua.h
/usr/include/luajit-2.0/lua.hpp
/usr/include/luajit-2.0/luaconf.h
/usr/include/luajit-2.0/luajit.h
/usr/include/luajit-2.0/lualib.h
/usr/lib/pkgconfig/luajit.pc
/usr/lib/libluajit-5.1.so
/usr/lib/libluajit-5.1.so.2
/usr/lib/libluajit-5.1.so.2.0.5

# How to specify a CMake option -> Near the very top in a Google is StackOverfow
cmake -DLUA_INCLUDE_DIR:PATH=/usr/include/luajit-2.0 ./../
cmake -D
LUA_LIBRARY:FILEPATH=/usr/lib/libluajit-5.1.so ./../
 
Lua:
rata@la-rata:~/otclient/build$ cmake ./../ -LA | grep -i lua
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find LuaJIT (missing: LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  src/framework/cmake/FindLuaJIT.cmake:16 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/framework/CMakeLists.txt:209 (find_package)
  CMakeLists.txt:12 (include)


LUAJIT:BOOL=ON
LUAJIT_INCLUDE_DIR:PATH=LUAJIT_INCLUDE_DIR-NOTFOUND
LUAJIT_LIBRARY:FILEPATH=LUAJIT_LIBRARY-NOTFOUND
LUA_INCLUDE_DIR:PATH=LUA_INCLUDE_DIR-NOTFOUND
LUA_LIBRARY:FILEPATH=LUA_LIBRARY-NOTFOUND
rata@la-rata:~/otclient/build$

Code:
rata@la-rata:~/otclient/build$ find /usr/include/ /usr/lib/ | grep -i "luajit"
/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2.1.0
/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2


make -DLUA_INCLUDE_DIR:PATH=/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2.1.0./../
cmake -DLUA_LIBRARY:FILEPATH=
/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2 ./../


Code:
rata@la-rata:~/otclient/build$ cmake -DLUA_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2 ./../
-- Link to static libraries: OFF
-- Build type: Release
-- Build commit: devel
-- Build revision: 0
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find LuaJIT (missing: LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  src/framework/cmake/FindLuaJIT.cmake:16 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/framework/CMakeLists.txt:209 (find_package)
  CMakeLists.txt:12 (include)


-- Configuring incomplete, errors occurred!
See also "/home/rata/otclient/build/CMakeFiles/CMakeOutput.log".
See also "/home/rata/otclient/build/CMakeFiles/CMakeError.log".
rata@la-rata:~/otclient/build$
Post automatically merged:

Lua:
rata@la-rata:~/otclient/build$ cmake ./../ -LA | grep -i lua
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find LuaJIT (missing: LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  src/framework/cmake/FindLuaJIT.cmake:16 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/framework/CMakeLists.txt:209 (find_package)
  CMakeLists.txt:12 (include)


LUAJIT:BOOL=ON
LUAJIT_INCLUDE_DIR:PATH=LUAJIT_INCLUDE_DIR-NOTFOUND
LUAJIT_LIBRARY:FILEPATH=LUAJIT_LIBRARY-NOTFOUND
LUA_INCLUDE_DIR:PATH=LUA_INCLUDE_DIR-NOTFOUND
LUA_LIBRARY:FILEPATH=LUA_LIBRARY-NOTFOUND
rata@la-rata:~/otclient/build$

Code:
rata@la-rata:~/otclient/build$ find /usr/include/ /usr/lib/ | grep -i "luajit"
/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2.1.0
/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2


make -DLUA_INCLUDE_DIR:PATH=/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2.1.0./../
cmake -DLUA_LIBRARY:FILEPATH=
/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2 ./../


Code:
rata@la-rata:~/otclient/build$ cmake -DLUA_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2 ./../
-- Link to static libraries: OFF
-- Build type: Release
-- Build commit: devel
-- Build revision: 0
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find LuaJIT (missing: LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  src/framework/cmake/FindLuaJIT.cmake:16 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/framework/CMakeLists.txt:209 (find_package)
  CMakeLists.txt:12 (include)


-- Configuring incomplete, errors occurred!
See also "/home/rata/otclient/build/CMakeFiles/CMakeOutput.log".
See also "/home/rata/otclient/build/CMakeFiles/CMakeError.log".
rata@la-rata:~/otclient/build$
i need to add them manually into src / framework/ cmakelist

i added it manually in this way but isn't working either
Code:
#find lua
if(LUAJIT)
    find_package(LuaJIT REQUIRED)
    set(LUA_INCLUDE_DIR ${PATH=/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2.1.0./../})
    set(LUA_LIBRARY ${FILEPATH=/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2 ./../})
    if(APPLE)
      set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -pagezero_size 10000 -image_base 100000000")
    endif()
Lua:
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find LuaJIT (missing: LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  src/framework/cmake/FindLuaJIT.cmake:16 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/framework/CMakeLists.txt:209 (find_package)
  CMakeLists.txt:12 (include)


-- Configuring incomplete, errors occurred!
See also "/home/rata/otclient/CMakeFiles/CMakeOutput.log".
See also "/home/rata/otclient/CMakeFiles/CMakeError.log".
@Lessaire
 
Last edited:
Code:
rata@la-rata:~/otclient/build$ find /usr/include/ /usr/lib/ | grep -i "luajit"
/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2.1.0
/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2

This anwsers your question. You do not have the luajit headers installed. Where is the results for /usr/include?

🤷‍♂️ I know they were installed on your machine before. If you did something stupid that would make all that time I spent helping you a waste, you kind of deserve this. Maybe the online resources for your OS can help with your development problem. Maybe it will become obvious what you need to do next!
 
This anwsers your question. You do not have the luajit headers installed. Where is the results for /usr/include?

🤷‍♂️ I know they were installed on your machine before. If you did something stupid that would make all that time I spent helping you a waste, you kind of deserve this. Maybe the online resources for your OS can help with your development problem. Maybe it will become obvious what you need to do next!
i manually configured this into src /framework/cmakelist.txt but it's not working
Lua:
#find lua
if(LUAJIT)
    find_package(LuaJIT REQUIRED)
    set(LUA_INCLUDE_DIR ${PATH=/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2.1.0./../})
    set(LUA_LIBRARY ${FILEPATH=/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2 ./../})
    if(APPLE)
      set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -pagezero_size 10000 -image_base 100000000")
    endif()


output
Code:
Lua:
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find LuaJIT (missing: LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  src/framework/cmake/FindLuaJIT.cmake:16 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/framework/CMakeLists.txt:209 (find_package)
  CMakeLists.txt:12 (include)


-- Configuring incomplete, errors occurred!
See also "/home/rata/otclient/CMakeFiles/CMakeOutput.log".
See also "/home/rata/otclient/CMakeFiles/CMakeError.log".
 
Look at this post again. I even used pretty crayons to make in clear certain things are different than the other.

While you are supposed to follow along and do the commands your self, which is great that you actually did, if your output was significantly different that means 🛑 because there is a problem. And everything you need to fix that problem is in the post after it.
 

Similar threads

Back
Top