Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592052 - dev-lang/lua-5.2.3-r1 creates unusable pkgconfig file
Summary: dev-lang/lua-5.2.3-r1 creates unusable pkgconfig file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
: 602476 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-08-24 21:39 UTC by Nick Owens
Modified: 2019-03-25 05:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Owens 2016-08-24 21:39:21 UTC
pkg-config --libs lua5.2 will produce '-llua', but should be '-llua5.2'
pkg-config --cflags will produce '-I/usr/include', but should be '-I/usr/include/lua5.2'

$ equery -C f =dev-lang/lua-5.2.3-r1
/usr
/usr/bin
/usr/bin/lua5.2
/usr/bin/luac5.2
/usr/include
/usr/include/lua5.2
/usr/include/lua5.2/lauxlib.h
/usr/include/lua5.2/lua.h
/usr/include/lua5.2/lua.hpp
/usr/include/lua5.2/luaconf.h
/usr/include/lua5.2/lualib.h
/usr/include/x86_64-pc-linux-gnu
/usr/include/x86_64-pc-linux-gnu/lua5.2
/usr/include/x86_64-pc-linux-gnu/lua5.2/luaconf.h
/usr/lib
/usr/lib/debug
/usr/lib/debug/usr
/usr/lib/debug/usr/bin
/usr/lib/debug/usr/bin/lua5.2.debug
/usr/lib/debug/usr/bin/luac5.2.debug
/usr/lib/debug/usr/lib64
/usr/lib/debug/usr/lib64/liblua5.2.so.0.0.0.debug
/usr/lib64
/usr/lib64/liblua5.2.a
/usr/lib64/liblua5.2.la
/usr/lib64/liblua5.2.so
/usr/lib64/liblua5.2.so.0
/usr/lib64/liblua5.2.so.0.0.0
/usr/lib64/pkgconfig
/usr/lib64/pkgconfig/lua5.2.pc
/usr/share
/usr/share/doc
/usr/share/doc/lua-5.2.3-r1
/usr/share/doc/lua-5.2.3-r1/README.bz2
/usr/share/doc/lua-5.2.3-r1/html
/usr/share/doc/lua-5.2.3-r1/html/contents.html
/usr/share/doc/lua-5.2.3-r1/html/logo.gif
/usr/share/doc/lua-5.2.3-r1/html/lua.css
/usr/share/doc/lua-5.2.3-r1/html/manual.css
/usr/share/doc/lua-5.2.3-r1/html/manual.html
/usr/share/doc/lua-5.2.3-r1/html/osi-certified-72x60.png
/usr/share/doc/lua-5.2.3-r1/html/readme.html
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/lua5.2.1.bz2
/usr/share/man/man1/luac5.2.1.bz2
Comment 1 Martin Väth 2018-05-11 05:21:32 UTC
The same holds for the current lua:5.1 and lua:5.3 ebuilds.

My suggestion would be to fix this first (and perhaps not install the static archives, see below).

Then it is a rather easy for packages to depend on the "correct" slot and force using it, independent of what is chosen by "eselect lus".

This could first happen through USE="lua-slotted" (i.e. without that USE-flag, they depend on lua:0, but otherwise on the correct lua version and force using it by forcing to use the correct lua.pc file); of course, this USE-flag would need to be masked as long as slotted lua is masked.

When all packages have been converted, the way is finally free to unmask slotted lua. Then eventually the USE="lua-slotted" can be forced (or the disabled case removed from the ebuilds).

BTW, when the *.pc files are fixed, it is not necessary to install the static libraries (due to the fixed PC files, the correct lua version is linked dynamically).

I am aware that this is discouraged by upstream due to a theoretically slightly slower execution on i686 due to -fPIC in the dynamic archives. However:

1. The speed argument is practically invalid on x86_64.
2. Profile 7.0 uses -fPIE anyway which has the same speed impact on all architectures as -fPIC.
3. Using static archives contradicts gentoo policy and is always a security issue.

I emphasize once more that due to the correct *.pc files - if the ebuilds possibly patch the packages to actually use them if necessary - the dynamic linking is correct and independent of USE=lua-slotted.

That's why I consider it highly important to fix this bug for all lua slots (even if you should decide against removal of static archives).
Comment 2 Larry the Git Cow gentoo-dev 2019-03-25 05:13:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8b34e68bfeb0eb58cec6d7e0f274987c253c2a0

commit d8b34e68bfeb0eb58cec6d7e0f274987c253c2a0
Author:     Robin H. Johnson <robbat2@gentoo.org>
AuthorDate: 2019-03-25 05:03:33 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2019-03-25 05:13:45 +0000

    dev-lang/lua: fix pkgconfig for lua 5.2 & lua 5.3
    
    Slotted Lua uses distinct names for libraries and the include path.
    This variant is explicitly compatible with Debian's layout as seen at
    [1].
    
    [1] https://packages.debian.org/stretch/amd64/liblua5.3-dev/filelist
    
    Fixes: https://bugs.gentoo.org/592052
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 dev-lang/lua/lua-5.2.4-r1.ebuild | 192 +++++++++++++++++++++++++++++++++++++++
 dev-lang/lua/lua-5.3.5-r1.ebuild | 192 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 384 insertions(+)
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2019-03-25 05:14:46 UTC
*** Bug 602476 has been marked as a duplicate of this bug. ***