Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#37311 - [lua] Missing pkg-config info for lua5.2 (and lua)

Attached to Project: Arch Linux
Opened by Jimmy Christensen (DusteD) - Saturday, 12 October 2013, 16:56 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Saturday, 19 October 2013, 11:53 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
$ pkg-config --libs lua5.1
-llua5.1 -lm
$ pkg-config --cflags lua5.1
-I/usr/include/lua5.1

But:
$ pkg-config --libs lua5.2
Package lua5.2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua5.2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua5.2' found

$ pkg-config --cflags lua5.2
Package lua5.2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua5.2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua5.2' found

Additional info:
* package version(s)
extra/lua 5.2.2-1




Steps to reproduce:
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Saturday, 19 October 2013, 11:53 GMT
Reason for closing:  Won't fix
Comment by Eric Belanger (Snowman) - Saturday, 12 October 2013, 17:49 GMT
For lua5.2, you need to only use lua:
$ pkg-config --libs lua
-llua -lm

Comment by Jimmy Christensen (DusteD) - Saturday, 12 October 2013, 17:57 GMT
It makes it difficult to write portable Makefiles, since pkg-config --libs lua returns "package not found" on other distributions
Comment by Doug Newgard (Scimmia) - Sunday, 13 October 2013, 04:44 GMT
upstream does not provide pkg-config files, so it's up to the distro to add them if they want them. How they add them is up to the distro, so you can't count on anything, you need to use conditionals to search for the right one.

I believe Fedora/RH do it the same as Arch and using "lua" should be correct. Debian and it's derivatives are different.
Comment by Jimmy Christensen (DusteD) - Sunday, 13 October 2013, 09:52 GMT
I acknowledge that the approach by arch is correct, but it is not logical to have explicit versions for all, but the current, verison.
Comment by Jimmy Christensen (DusteD) - Sunday, 13 October 2013, 09:59 GMT
A symlink /usr/lib/pkgconfig/lua5.2.pc -> /usr/lib/pkgconfig/lua.pc would automatically be overwritten when 5.2 is no longer the current version, since that would then install a distinct file like 5.1 and earlier versions did when they were replaced.
Comment by Jimmy Christensen (DusteD) - Monday, 14 October 2013, 10:17 GMT
I'd like to add another perspective to this which was pointed out by a fellow Arch user:
'It makes no sense that one can request pkg-config info on version 5.1 but not 5.2 when they are both installed'

I reckon that the fix to this is trivial (have lua package install a symlink to it's pkgfile with the name of its current version; lua5.2.pc) and without implications (since older lua versions will install their own pkg-config file, overriding the symlink, meaning that when 5.2 is replaced by a new version, a package 5.2 will be created, which will (if it behaves like 5.1) install a pkg-config file named lua5.2.pc thus overriding the symlink).
Comment by Jimmy Christensen (DusteD) - Monday, 14 October 2013, 13:08 GMT
[Duplicate comment deleted]
Comment by Jan de Groot (JGC) - Friday, 18 October 2013, 09:02 GMT
The only reason why we have a lua5.1 package is because some software in our repositories still needs it. In the end it will just disappear. Probably there will never be any lua5.2 package.

All changes done to lua5.1 to make it parallel installable with lua is done by Archlinux and is not vanilla in any way. We should not apply this to 5.2.

Loading...