Bug 1283705 - lua: LUA_CDIR is incorrect on AArch64
Summary: lua: LUA_CDIR is incorrect on AArch64
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lua
Version: 7.2
Hardware: aarch64
OS: Linux
Target Milestone: rc
: 7.3
Assignee: Florian Festi
QA Contact: David Kutálek
Depends On:
Blocks: epel7aarch64 1277314
TreeView+ depends on / blocked
Reported: 2015-11-19 16:07 UTC by D. Marlin
Modified: 2016-11-04 08:36 UTC (History)
10 users (show)

Fixed In Version: lua-5.1.4-15.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-11-04 08:36:49 UTC
Target Upstream Version:

Attachments (Terms of Use)
mock build log for AArch64 (5.31 KB, text/plain)
2015-11-19 16:08 UTC, D. Marlin
no flags Details
Patch for rhel-7.3 (2.10 KB, patch)
2015-11-25 21:58 UTC, Yaakov Selkowitz
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2568 normal SHIPPED_LIVE lua bug fix update 2016-11-03 14:23:26 UTC

Description D. Marlin 2015-11-19 16:07:10 UTC
Description of problem:

The lua-bitop package fails to build on AArch64.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.  Perform a mock build of the package on an AArch64 builder

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.

Comment 1 D. Marlin 2015-11-19 16:08:35 UTC
Created attachment 1096764 [details]
mock build log for AArch64

Comment 2 Yaakov Selkowitz 2015-11-25 21:55:33 UTC
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.

Comment 3 Yaakov Selkowitz 2015-11-25 21:58:33 UTC
Created attachment 1098990 [details]
Patch for rhel-7.3

Comment 6 John Feeney 2016-06-13 23:25:15 UTC
Is the patch provided sufficient?

Comment 7 Jon Masters 2016-08-30 07:37:27 UTC
Any news on 7.3?

Comment 14 Yaakov Selkowitz 2016-08-30 22:41:40 UTC
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)'


$ lua -e 'print(package.cpath)'

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}.

Comment 22 errata-xmlrpc 2016-11-04 08:36:49 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.