[Rspamd-Users] rspamd src-build fails to locate/use local luajit2 install ?

PGNet Dev pgnet.dev at gmail.com
Sun May 10 17:41:37 UTC 2020


as prereq to rspamd build

I've lua 5.1 devel pkg installed from distro

	rpm -ql lua51-devel
		/etc/alternatives/liblua.so
		/etc/alternatives/lua.pc
		/usr/include/lua5.1
		/usr/include/lua5.1/lauxlib.h
		/usr/include/lua5.1/lua.h
		/usr/include/lua5.1/lua.hpp
		/usr/include/lua5.1/luaconf.h
		/usr/include/lua5.1/lualib.h
		/usr/lib64/liblua.so
		/usr/lib64/liblua5.1.a
		/usr/lib64/liblua5.1.so
		/usr/lib64/pkgconfig/lua.pc
		/usr/lib64/pkgconfig/lua5.1.pc

Instead of distro-pkg'd luajit, I have a local build.  The bin's in my $PATH

	which luajit
		/usr/local/luajit2/bin/luajit
	luajit -v
		LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2020 Mike Pall. http://luajit.org/

& pkg-config finds lib/headers correctly,

	pkg-config --libs --cflags luajit
		-I/usr/local/luajit2/include/luajit-2.1 -L/usr/local/luajit2/lib64 -lluajit-5.1

But, config'ing rspamd

	cmake -DENABLE_LUAJIT=ON ...

returns,

	...
	-- Configuring for Linux
	-- Check for luajit 5.1
!!	-- Fallback from luajit to plain lua
	-- Check for lua 5.1
	-- Found lua 5.1 in lib:/usr/lib64/liblua.so, headers:/usr/include/lua5.1
	...

*missing* the pkgconfig-locatable luajit, falling back to 'plain lua'

and build

	make
	make install

returns links only to 'plain lua'

	ldd /usr/local/rspamd/lib64/*.so | grep lua
		liblua5.1.so.5 => /usr/lib64/liblua5.1.so.5 (0x00007f68a4052000)
		liblua5.1.so.5 => /usr/lib64/liblua5.1.so.5 (0x00007f54081de000)

what's the correct, necessary config to enable/find the installed lua*JIT*?



More information about the Users mailing list