Red Hat Bugzilla – Bug 1283705
lua: LUA_CDIR is incorrect on AArch64
Last modified: 2016-11-04 04:36:49 EDT
Description of problem: The lua-bitop package fails to build on AArch64. Version-Release number of selected component (if applicable): lua-bitop-1.0.2-3.el7 How reproducible: consistently Steps to Reproduce: 1. Perform a mock build of the package on an AArch64 builder 2. 3. Actual results: build fails. Expected results: build succeeds. Additional info: It appears that the library is not successfully installed in the correct path: + make install DESTDIR=/builddir/build/BUILDROOT/lua-bitop-1.0.2-3.el7.aarch64 PREFIX=/usr LUALIB=/usr/lib64/lua/5.1 file=/builddir/build/BUILDROOT/lua-bitop-1.0.2-3.el7.aarch64`lua installpath.lua bit`; \ mkdir -p `dirname $file`; \ install -p bit.so $file : Processing files: lua-bitop-1.0.2-3.el7.aarch64 error: File not found by glob: /builddir/build/BUILDROOT/lua-bitop-1.0.2-3.el7.aarch64/usr/lib64/lua/5.1/* The complete build log is attached. Since epel7 has not been built for AArch64 (yet), a mock look-aside repo is needed for some dependencies. I already have a builder configured for this, if that would be helpful.
Created attachment 1096764 [details] mock build log for AArch64
The issue here is actually with LUA_CDIR incorrectly being /usr/lib instead of /usr/lib64, so this needs to be fixed in lua. Reassigning, with patch forthcoming.
Created attachment 1098990 [details] Patch for rhel-7.3
Is the patch provided sufficient?
Any news on 7.3?
For Docs: Lua's package.cpath, which is the search path for binary extensions, was incorrect for the AArch64 architecture, causing either binary extensions to be installed into a nonstandard directory, or for extensions installed into the standard location not to be found. A patch has been applied to use the correct directory on AArch64. For QA: package.cpath should be compared with "%{_libdir}/" (note the trailing slash), e.g.: Incorrect on aarch64 (and other 64-bit arches): $ lua -e 'print(package.cpath)' ./?.so;/usr/lib/lua/5.1/?.so;/usr/lib/lua/5.1/loadall.so Correct: $ lua -e 'print(package.cpath)' ./?.so;/usr/lib64/lua/5.1/?.so;/usr/lib64/lua/5.1/loadall.so Another test would be to mock rebuild the EPEL lua-bitop package, as the install script uses package.cpath and the spec's %files uses %{_libdir}.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2568.html