#916 In configure, use PREFIX to look for LUA_INCDIR and LUA_LIBDIR even when --ostype=linux is passed
Reporter
Link Mauve
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Status-New
Type-Defect
Priority-Medium
Link Mauve
on
What steps will reproduce the problem?
1. Run `./configure --prefix=/usr --ostype=linux`
What is the expected output? What do you see instead?
I’d expect lua.h to be found in $PREFIX/include/lua.h, that is /usr/include/lua.h here.
Instead I get:
Checking Lua includes... lua.h not found (looked in /usr/local/include, /usr/local/include/lua/5.3, /usr/local/include/lua5.3)
What version of the product are you using? On what operating system?
Trunk 8146:5c91fb62338e, on ALARM.
Please provide any additional information below.
LuaRocks’ configure script does the right thing, see https://github.com/luarocks/luarocks/blob/master/configure#L328
The issue is in how Prosody’s tries to guess which operating system it is running on, and does that badly, see https://hg.prosody.im/trunk/file/5c91fb62338e/configure#l187
Zash
on
I don't believe the 'linux' ostype preset has ever worked on anything I've ever tried.
The --ostype flag should usually be put first on the command line to avoid this kind of problem. It should be considered an alias that gets expanded into some set of other flags.
Link Mauve
on
Maybe you should make it error then? Or remove the --ostype altogether, since pkg-config should work fine in every case?
Zash
on
pkg-config support (#720) is not ready for use yet. Maybe it's even better to just write a configure script alternative that uses only pkg-config, to be used as future replacement, maybe.
What steps will reproduce the problem? 1. Run `./configure --prefix=/usr --ostype=linux` What is the expected output? What do you see instead? I’d expect lua.h to be found in $PREFIX/include/lua.h, that is /usr/include/lua.h here. Instead I get: Checking Lua includes... lua.h not found (looked in /usr/local/include, /usr/local/include/lua/5.3, /usr/local/include/lua5.3) What version of the product are you using? On what operating system? Trunk 8146:5c91fb62338e, on ALARM. Please provide any additional information below. LuaRocks’ configure script does the right thing, see https://github.com/luarocks/luarocks/blob/master/configure#L328 The issue is in how Prosody’s tries to guess which operating system it is running on, and does that badly, see https://hg.prosody.im/trunk/file/5c91fb62338e/configure#l187
I don't believe the 'linux' ostype preset has ever worked on anything I've ever tried. The --ostype flag should usually be put first on the command line to avoid this kind of problem. It should be considered an alias that gets expanded into some set of other flags.
Maybe you should make it error then? Or remove the --ostype altogether, since pkg-config should work fine in every case?
pkg-config support (#720) is not ready for use yet. Maybe it's even better to just write a configure script alternative that uses only pkg-config, to be used as future replacement, maybe.