I needed to compile my own rpm with `--with-lua` support as my system 
(slackware) ships with rpm configured with the `--without-lua-support` flag. 
However, the Lua that my system provides (actually slackbuilds.org provides) is 
version 5.1.5, but the `--with-lua-support` flag requires at least version 5.2. 
Fortunately (I thought) my system also provides a package named `lua52` that 
installs Lua version 5.2.4. So I removed the old `lua` package and installed 
this package, but to my surprise when I went to compile rpm with the 
`--with-lua` support I got the same error as before:

```
checking for lua >= 5.2... no
configure: error: lua not present or too old (--without-lua to disable)
```

It turns out that the problem was that `pkg-config` only looks for a file named 
`lua.pc` in `$PKG_CONFIG_PATH`, but this `lua52` package only installs a file 
into `$PKG_CONFIG_PATH` named `lua52.pc` (and a symlink from this file named 
`lua5.2.pc`). I was able to solve this problem by symlinking the `lua52.pc` 
file to `lua.pc`. After creating this symlink I was able to build rpm with the 
`--with-lua` flag just fine.

[Here](https://slackbuilds.org/repository/15.0/development/lua52/?search=lua52) 
is a link to the `lua52` slackbuild.

I do not know if any other systems could be effected by this, but it would be 
nice if `.pc` files with names such as `lua52.pc` could be found automatically.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2407
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/2...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to