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
../rpmio/rpmlua.h:5:10: fatal error: lauxlib.h: No such file or directory #888
Comments
Where's lauxlib.h on the system? My crystal ball seems broken today. rpm simply expects lua includes to be in the compilers include path, so either it's not present at all, or it's not in the path, that's all there is to it. If it's not on the path you need to tell rpm about it. You're talking about a modified source so I can't tell you how to fix it, but the standard way to pass additional include paths would be appending CPPFLAGS="-I/some/path" to the configure line. |
pkg-config --cflags-only-I lua5.3
-I/usr/include/lua5.3
ls -l /usr/include/lua5.3
total 60
-rw-r--r-- 1 root root 8432 Nov 23 2015 lauxlib.h
-rw-r--r-- 1 root root 14833 May 30 2016 lua.h
-rw-r--r-- 1 root root 191 Dec 23 2004 lua.hpp
-rw-r--r-- 1 root root 21503 Apr 8 2019 luaconf.h
-rw-r--r-- 1 root root 1173 Feb 6 2014 lualib.h As I have said, I have replaced |
I used the following patch to fix the build:
|
(That's also what |
Oh, right... I didn't remember we use pkg-config to find Lua in the first place, I thought the initial comment was about changing configure to do so, but it's only about changing the "target". And yes in that case it's rpm's responsibility to pass LUA_CFLAGS around. On that note, one shouldn't have to edit configure.ac to do anything normal, the ---with-lua test should support passing in a custom name as an argument (eg --with-lua=lua5.3). A PR from somebody who can actually test it would be welcome, I can't easily test such things (which is why the problem exists in the first place) |
@mlschroe, thanks. But the fix doesn't work. I don't mean that the patch cannot be applied, I have applied it manually. I mean I still get the same error.
|
Oh, now I see the problem: commit 62bd622 added the lauxlib.h include to the rpmlua.h header which used to be independent of lua headers, and thus gets included from places where LUA_CFLAGS are not enabled. Will fix. |
rpmlua.h was originally written in a way that allows it to be included regardless of whether Lua is actually enabled in rpm or not, or where Lua headers are, specifically to isolate the rest of rpm from these details. That was changed in commit 62bd622 when <lauxlib.h> started getting included in rpmlua.h, which leaks to places like librpmbuild which do not directly use Lua. The way Lua typedef's the luaL_Reg struct to itself defies my C fu for for handling this in some nicer typesafe way, fix this all by just using a void pointer instead, this is just an internal API where buyer can be expected to beware. Fixes rpm-software-management#888
Should be fixed by #893 (doesn't help with the pkgconfig module name though) |
Thanks, it really fixes this. |
Excellent. Thanks for testing and confirming. |
rpmlua.h was originally written in a way that allows it to be included regardless of whether Lua is actually enabled in rpm or not, or where Lua headers are, specifically to isolate the rest of rpm from these details. That was changed in commit 62bd622 when <lauxlib.h> started getting included in rpmlua.h, which leaks to places like librpmbuild which do not directly use Lua. The way Lua typedef's the luaL_Reg struct to itself defies my C fu for for handling this in some nicer typesafe way, fix this all by just using a void pointer instead, this is just an internal API where buyer can be expected to beware. Fixes #888
Oh, and thanks for reporting too. |
rpmlua.h was originally written in a way that allows it to be included regardless of whether Lua is actually enabled in rpm or not, or where Lua headers are, specifically to isolate the rest of rpm from these details. That was changed in commit 62bd622 when <lauxlib.h> started getting included in rpmlua.h, which leaks to places like librpmbuild which do not directly use Lua. The way Lua typedef's the luaL_Reg struct to itself defies my C fu for for handling this in some nicer typesafe way, fix this all by just using a void pointer instead, this is just an internal API where buyer can be expected to beware. Fixes rpm-software-management#888 (cherry picked from commit facee2c)
rpmlua.h was originally written in a way that allows it to be included regardless of whether Lua is actually enabled in rpm or not, or where Lua headers are, specifically to isolate the rest of rpm from these details. That was changed in commit 62bd622 when <lauxlib.h> started getting included in rpmlua.h, which leaks to places like librpmbuild which do not directly use Lua. The way Lua typedef's the luaL_Reg struct to itself defies my C fu for for handling this in some nicer typesafe way, fix this all by just using a void pointer instead, this is just an internal API where buyer can be expected to beware. Fixes #888 (cherry picked from commit facee2c)
The distro is Ubuntu eoan, liblua5.3-dev is installed,
configure.ac
was modified to find it using pkg-config. The configure flags are:--with-lua
.The text was updated successfully, but these errors were encountered: