[Buildroot] [PATCH 1/6] package/luvi: don't use LUAJIT_VERSION for the luajit installation path

Romain Naour romain.naour at gmail.com
Fri Nov 12 18:50:19 UTC 2021


Yann,

Le 12/11/2021 à 14:07, Yann E. MORIN a écrit :
> Romain, All,
> 
> I again hot "send" too fast; see a complement below...
> 
> On 2021-11-12 12:00 +0100, Romain Naour spake thusly:
>> Luajit package has been recently updated to the latest commit in the
>> master branch [1]. Since then LUAJIT_VERSION doesn't contain the luajit
>> version anymore but a commit hash:
>>
>> LUAJIT_VERSION = 05f1984e1a862e4b3d3c3b370c773492e2edf84a
>>
>> Use pkg-config --variable=version luajit in luvi package to set
>> LUA_PATH correctly.
>>
>> Fixes:
>> luajit: unknown luaJIT command or jit.* modules not installed
>>
>> https://gitlab.com/buildroot.org/buildroot/-/jobs/1710552605
>>
>> [1] 9450b53c8e06f1b5a75840b82c0f4663a5d75c45
>>
>> Signed-off-by: Romain Naour <romain.naour at gmail.com>
>> Cc: Jörg Krause <joerg.krause at embedded.rocks>
>> Tested-by: Jörg Krause <joerg.krause at embedded.rocks>
>> Acked-by: Francois Perrad <francois.perrad at gadz.org>
>> ---
>> The TestLuvi doesn't work yet due to missing rng support on Qemu armv7 target
>> used to run the test. luvi -v is stuck due to getrandom().
>> ---
>>  package/luvi/luvi.mk | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/package/luvi/luvi.mk b/package/luvi/luvi.mk
>> index 386daafc31..ef5777cac8 100644
>> --- a/package/luvi/luvi.mk
>> +++ b/package/luvi/luvi.mk
>> @@ -9,7 +9,7 @@ LUVI_SOURCE = luvi-src-v$(LUVI_VERSION).tar.gz
>>  LUVI_SITE = https://github.com/luvit/luvi/releases/download/v$(LUVI_VERSION)
>>  LUVI_LICENSE = Apache-2.0
>>  LUVI_LICENSE_FILES = LICENSE.txt
>> -LUVI_DEPENDENCIES = libuv luajit luv host-luajit
>> +LUVI_DEPENDENCIES = libuv luajit luv host-luajit host-pkgconf
>>  
>>  # Dispatch all architectures of LuaJIT
>>  ifeq ($(BR2_i386),y)
>> @@ -30,12 +30,16 @@ else
>>  LUVI_TARGET_ARCH = $(BR2_ARCH)
>>  endif
>>  
>> +# LUAJIT_VERSION and the luajit installation path may not use the
>> +# same value. Use the value from luajit.pc file.
>> +LUVI_LUAJIT_VERSION = $(shell $(PKG_CONFIG_HOST_BINARY) --variable=version luajit)
> 
> Shouldn't that variable be set in luajit.mk, and that all packages that
> need it use it?
> 
> Indeed the luajit version strgin is semantically the responsibility of
> luajit, so it should be set in there.

I'm not sure, because we need LUVI_LUAJIT_VERSION here because the luvi build
system is not able to retrieve the luajit version from pkg-config.

I'm not aware of any other package that provide two versions.
Something like ?

LUAJIT_VERSION = 05f1984e1a862e4b3d3c3b370c773492e2edf84a

LUAJIT_REAL_VERSION = 2.1.0-beta3

Best regards,
Romain


> 
> Regards,
> Yann E. MORIN.
> 
>>  # Bundled lua bindings have to be linked statically into the luvi executable
>>  LUVI_CONF_OPTS = \
>>  	-DBUILD_SHARED_LIBS=OFF \
>>  	-DWithSharedLibluv=ON \
>>  	-DTARGET_ARCH=$(LUVI_TARGET_ARCH) \
>> -	-DLUA_PATH=$(HOST_DIR)/share/luajit-$(LUAJIT_VERSION)/?.lua
>> +	-DLUA_PATH=$(HOST_DIR)/share/luajit-$(LUVI_LUAJIT_VERSION)/?.lua
>>  
>>  # Add "rex" module (PCRE via bundled lrexlib)
>>  ifeq ($(BR2_PACKAGE_PCRE),y)
>> -- 
>> 2.31.1
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot at buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 



More information about the buildroot mailing list