On 3/3/26 23:16, Ross Burton wrote:
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know 
the content is safe.

Hi,

On 27 Feb 2026, at 07:08, Changqing Li via 
lists.openembedded.org<[email protected]> wrote:
Refer [1], PLATS linux-readline is moved, and readline is changed to
load dynamically, keep readline as PACKAGECONFIG to allow user to remove
readline dependency.
As is traditional with people using dlopen(), this is now broken…

Lua defaults to dlopen() support being enabled (LUA_USE_DLOPEN is defined on linux) 
and the readline library is set to libreadline.so<http://libreadline.so/>.

So the PACKAGECONFIG is not doing the right thing anymore: having readline in 
the sysroot doesn’t change the build, and has no impact on the runtime packages.

The obvious answer is to change the PACKAGECONFIG to “,,,readline” so that there’s still 
an option that has the effect of enabling readline in lua, but that also won’t work as the 
on-disk file isn’t called libreadline.so<http://libreadline.so/> unless you install 
the -dev package…. This means we should also set LUA_READLINELIB to 
"libreadline.so.8”.

Bonus points for adding readline as a build dependency and looking up what the 
libreadline.so<http://libreadline.so/> symlink resolves to, but I don’t expect 
the readline soname to change in the near future so this can be considered overkill.

Hi, Ross

Thanks for pointing out this.  How about we just install -dev packages? so that we don't need a local patch to set LUA_READLINELIB to "libreadline.so.8”. And

in this way, we are align with lua upstream expected (if readline-dev installed, readline is used, otherwise, not use readline)

Here is the diff based on V3:

 PACKAGECONFIG ??= "readline"
-PACKAGECONFIG[readline] = ",,readline"
+PACKAGECONFIG[readline] = ",,,readline-dev"

 TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
 EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}' 'AR=ar rcD' 'RANLIB=ranlib -D'"
@@ -64,3 +64,5 @@ BBCLASSEXTEND = "native nativesdk"

 inherit multilib_script
 MULTILIB_SCRIPTS = "${PN}-dev:${includedir}/luaconf.h"
+
+INSANE_SKIP:${PN} += "dev-deps"

With V3 patch:

root@qemux86-64:~# lua -i -W
Lua 5.5.0  Copyright (C) 1994-2025 Lua.org, PUC-Rio
Lua warning: library 'libreadline.so' not found
>

With the V4 patch:

root@qemux86-64:/usr/lib# lua -i -W
Lua 5.5.0  Copyright (C) 1994-2025 Lua.org, PUC-Rio
>

if you think this is ok,  I will send a V4 like this.

Regards

Changqing


Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#232350): 
https://lists.openembedded.org/g/openembedded-core/message/232350
Mute This Topic: https://lists.openembedded.org/mt/118026825/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to