Description of problem: On AArch64 architecture Lua stores all plugins in /usr/lib64/ directory. But when plugins are requested by Lua script they can not be loaded and things fail (for example build of 'awesome' package). Version-Release number of selected component (if applicable): 5.1.4-12.fc19 How reproducible: Always. Steps to Reproduce: 1. Install "lua-penlight" package 2. Run "lua" 3. type: require "pl.path" Actual results: [builder@model-1 rpmbuild]$ lua Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio > > require "pl.path" /usr/share/lua/5.1/pl/path.lua:30: pl.path requires LuaFileSystem stack traceback: [C]: in function 'error' /usr/share/lua/5.1/pl/path.lua:30: in main chunk [C]: in function 'require' stdin:1: in main chunk [C]: ? Expected results: Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio > require "pl.path" > Additional info: Why it fails? I used strace on lua: [builder@model-1]$ grep lfs /tmp/log openat(AT_FDCWD, "./lfs.lua", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/lua/5.1/lfs.lua", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/lua/5.1/lfs/init.lua", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/lua/5.1/lfs.lua", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/lua/5.1/lfs/init.lua", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "./lfs.so", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/lua/5.1/lfs.so", O_RDONLY) = -1 ENOENT (No such file or directory) the lfs.so file is in filesystem but in other place: [builder@model-1 rpmbuild]$ find / -name lfs.so 2>/dev/null /usr/lib64/lua/5.1/lfs.so
Ah, I think this should fix it: diff --git a/lua-5.1.4-autotoolize.patch b/lua-5.1.4-autotoolize.patch index afcb3fb..8b57bb1 100644 --- a/lua-5.1.4-autotoolize.patch +++ b/lua-5.1.4-autotoolize.patch @@ -41813,7 +41813,7 @@ diff -urN lua-5.1.4/src/luaconf.h.template.in lua-5.1.4-autotoolize/src/luaconf. +/** autotools-patch **/ +#define LUA_LDIR "%lua_datadir%/lua/5.1/" +#if defined __alpha__ || defined __ia64__ || defined __powerpc64__ || \ -+ defined __s390x__ || defined __sparc64__ || defined __x86_64__ ++ defined __s390x__ || defined __sparc64__ || defined __x86_64__ || defined __aarch64__ +#define LUA_CDIR "/usr/lib64/lua/5.1/" +#else +#define LUA_CDIR "/usr/lib/lua/5.1/"
Mark: yes, that is proper fix - doing test build now. Lua 5.2.2 (rawhide) does not need that patch as they use @libdir like it should be done.
Did a build and my test works as expected now.
Created attachment 796746 [details] updated spec file
Created attachment 796747 [details] fix for AArch64 architecture
Created attachment 796748 [details] Changeset with spec and patch
rawhide upgraded to 5.2.2 so no issue