Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 755557 - dev-lang/lua:5.4[readline]: doesn't link to libreadline; readline functionality is missing
Summary: dev-lang/lua:5.4[readline]: doesn't link to libreadline; readline functionali...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-19 16:16 UTC by i.Dark_Templar
Modified: 2020-12-29 20:24 UTC (History)
1 user (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 i.Dark_Templar 2020-11-19 16:16:41 UTC
$summary

libreadline is not linked to, and readline functionality in lua interpreter is missing

Reproducible: Always

Steps to Reproduce:
1. unmask dev-lang/lua and app-eselect/eselect-lua
2. USE="readline" emerge dev-lang/lua:5.4
Actual Results:  
$ lddtree $(which lua5.4)
lua5.4 => /usr/bin/lua5.4 (interpreter => /lib64/ld-linux-x86-64.so.2)
    liblua5.4.so.0 => /usr/lib64/liblua5.4.so.0
        libm.so.6 => /lib64/libm.so.6
            ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
        libdl.so.2 => /lib64/libdl.so.2
    libc.so.6 => /lib64/libc.so.6

lua5.4 is not linked to libreadline

Expected Results:  
$ lddtree /usr/bin/lua5.4
lua5.4 => /usr/bin/lua5.4 (interpreter => /lib64/ld-linux-x86-64.so.2)
    liblua5.4.so.0 => /usr/lib64/liblua5.4.so.0
        libm.so.6 => /lib64/libm.so.6
            ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
        libdl.so.2 => /lib64/libdl.so.2
    libreadline.so.8 => /lib64/libreadline.so.8
        libtinfow.so.6 => /lib64/libtinfow.so.6
    libc.so.6 => /lib64/libc.so.6

lua5.4 linked to libreadline

Adding "-DLUA_USE_READLINE" to myCFLAGS should fix this issue.

Issue doesn't reproduce with earlier versions, like dev-lang/lua:5.3.
Comment 1 Larry the Git Cow gentoo-dev 2020-11-30 16:10:38 UTC
The bug has been closed via the following commit(s):

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

commit 8c496e85d925ce7351ff7cbb5366e7870a0bba64
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2020-11-30 16:06:53 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2020-11-30 16:10:07 +0000

    dev-lang/lua: 5.4.1-r1 bump to pick up libreadline
    
    Closes: https://bugs.gentoo.org/755557
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 dev-lang/lua/lua-5.4.1-r1.ebuild | 197 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 197 insertions(+)
Comment 2 i.Dark_Templar 2020-11-30 18:45:18 UTC
Fragment from linked commit:

	local myCFLAGS=""
	use deprecated && myCFLAGS="-DLUA_COMPAT_5_3"
	use readline && myCFLAGS="-DLUA_USE_READLINE"

	case "${CHOST}" in
		*-mingw*) : ;;
		*) myCFLAGS+=" -DLUA_USE_LINUX" ;;
	esac

If lua[deprecated,readline] is emerged, wouldn't "-DLUA_COMPAT_5_3" be lost?

I'd suggest following change:

        local myCFLAGS=""
-       use deprecated && myCFLAGS="-DLUA_COMPAT_5_3"
-       use readline && myCFLAGS="-DLUA_USE_READLINE"
+       use deprecated && myCFLAGS+=" -DLUA_COMPAT_5_3"
+       use readline && myCFLAGS+=" -DLUA_USE_READLINE"
Comment 3 i.Dark_Templar 2020-12-14 21:09:59 UTC
Reopening since issue with 'deprecated' USE-flag I reported in previous comment is not fixed yet and there seems to be no reaction. If 'readline' USE-flag is enabled, cflags added by 'deprecated' USE-flag are lost.
Comment 4 Larry the Git Cow gentoo-dev 2020-12-29 20:24:26 UTC
The bug has been closed via the following commit(s):

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

commit 09d28b07895b698e36a979997af546b7ba1a5470
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2020-12-29 20:22:20 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2020-12-29 20:24:20 +0000

    dev-lang/lua: 5.4.2-r1 bump
    
    Closes: https://bugs.gentoo.org/755557
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 dev-lang/lua/lua-5.4.2-r1.ebuild | 197 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 197 insertions(+)