fcitx / fcitx5-lua

25 stars 7 forks source link

Could not find Lua 5.4 correctly. #4

Closed arenekosreal closed 4 years ago

arenekosreal commented 4 years ago

When trying to compile this on Linux From Scratch with Lua version 5.4.0, cmake can't find it correctly even all files located in /usr/include. Terminal output listed below:

CMake Error at /usr/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find Lua (missing: LUA_INCLUDE_DIR) (Required is at least version
  "5.3")
Call Stack (most recent call first):
  /usr/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.17/Modules/FindLua.cmake:232 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:12 (find_package)

-- Configuring incomplete, errors occurred!
See also "/sources/fcitx5-lua/CMakeFiles/CMakeOutput.log".

and I think I have had Lua include files installed correctly:

root [ /sources/fcitx5-lua ]# ls -l /usr/include/lua*
-rw-r--r-- 1 root root 21262  7月 27 19:05 /usr/include/luaconf.h
-rw-r--r-- 1 root root 15765  7月 27 19:05 /usr/include/lua.h
-rw-r--r-- 1 root root   191  7月 27 19:05 /usr/include/lua.hpp
-rw-r--r-- 1 root root  1183  7月 27 19:05 /usr/include/lualib.h
wengxt commented 4 years ago

I have no problem on arch. I guess you may need to delete your old build/?

Also, FindLua.cmake is provided by cmake. If it does have bug (I doubt it. It should be some configuration problem on your side), it should be reported to cmake.

felixonmars commented 4 years ago

@zhanghua000 You need cmake 3.18 for this, or update your own installation accordingly: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4959