Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 18.04 (bionic) build doesn't detect LuaJIT 2.1, can't find LuaJit even with all required dev. packages installed #7306

Closed
juozaspo opened this issue May 8, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@juozaspo
Copy link
Contributor

commented May 8, 2018

Issue type
  • Build issue
Minetest version

Commit: 4ccd18d

OS / Hardware

Operating system: Ubuntu Linux 18.04 (bionic) 64 bits
CPU: Intel Pentium(R) Dual-Core CPU E6300 @ 2.80GHz

Summary

Running cmake (3.10.2) on latest git build, LuaJIT 2.1 cannot be found even if it's dev. files are installed.

-- Could NOT find LuaJit (missing: LUA_INCLUDE_DIR) 
-- LuaJIT not found, using bundled Lua.

Installed lua packages:

liblua5.2-0 5.2.4-1.1build1
liblua5.2-dev 5.2.4-1.1build1
liblua5.3-0 5.3.3-1
liblua5.3-dev 5.3.3-1
libluajit-5.1-2 2.1.0~beta3+dfsg-5.1
libluajit-5.1-common 2.1.0~beta3+dfsg-5.1
libluajit-5.1-dev 2.1.0~beta3+dfsg-5.1
lua5.2 5.2.4-1.1build1
lua5.3 5.3.3-1
luajit 2.1.0~beta3+dfsg-5.1

Ubuntu 18.04 libluajit-5.1-dev package contains /usr/include/luajit-2.1 directory, where FindLuaJIT.cmake in cmake/Modules folder expects path containing include/luajit-2.0 referencing older version of LuaJIT (2.0), not available in ubuntu repositories since version 18.04.

juozas@xubuntu:~/minetest_dev/cmake/Modules$ dpkg -L libluajit-5.1-dev 
/.
/usr
/usr/include
/usr/include/luajit-2.1
/usr/include/luajit-2.1/lauxlib.h
/usr/include/luajit-2.1/lua.h
/usr/include/luajit-2.1/lua.hpp
/usr/include/luajit-2.1/luaconf.h
/usr/include/luajit-2.1/luajit.h
/usr/include/luajit-2.1/lualib.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libluajit-5.1.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/luajit.pc
/usr/share
/usr/share/doc
/usr/share/doc/libluajit-5.1-dev
/usr/share/doc/libluajit-5.1-dev/copyright
/usr/lib/x86_64-linux-gnu/libluajit-5.1.so
/usr/share/doc/libluajit-5.1-dev/changelog.Debian.gz
# from FindLuaJIT.cmake 
FIND_PATH(LUA_INCLUDE_DIR luajit.h
	HINTS
	$ENV{LUA_DIR}
	PATH_SUFFIXES include/luajit-2.0 include/luajit-5_1-2.0 include
	PATHS
	~/Library/Frameworks
	/Library/Frameworks
	/sw # Fink
	/opt/local # DarwinPorts
	/opt/csw # Blastwave
	/opt
)
Steps to reproduce
  1. Install or upgrade ubuntu to version 18.04 (bionic)
  2. Install required dependencies including libluajit-5.1-dev, with latest version 2.1.0~beta3+dfsg-5.1
  3. Try to run cmake before building minetest, find out Luajit is not detected.

@juozaspo juozaspo changed the title Ubuntu 18.04 (bionic) build doesn't support LuaJIT 2.1, can't find it even with it's dev. packages installed Ubuntu 18.04 (bionic) build doesn't detect LuaJIT 2.1, can't find it even with it's dev. packages installed May 8, 2018

@juozaspo juozaspo changed the title Ubuntu 18.04 (bionic) build doesn't detect LuaJIT 2.1, can't find it even with it's dev. packages installed Ubuntu 18.04 (bionic) build doesn't detect LuaJIT 2.1, can't find LuaJit even with all required dev. packages installed May 8, 2018

@rubenwardy

This comment has been minimized.

Copy link
Member

commented May 8, 2018

I can confirm this issue, a workaround is to specify the include dir with -DLUA_INCLUDE_DIR=/path/to/lib/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.