Bug 1283705 - lua: LUA_CDIR is incorrect on AArch64
lua: LUA_CDIR is incorrect on AArch64
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lua (Show other bugs)
7.2
aarch64 Linux
medium Severity medium
: rc
: 7.3
Assigned To: Florian Festi
David Kutálek
: Patch
Depends On:
Blocks: 1277314 epel7aarch64
  Show dependency treegraph
 
Reported: 2015-11-19 11:07 EST by D. Marlin
Modified: 2016-11-04 04:36 EDT (History)
10 users (show)

See Also:
Fixed In Version: lua-5.1.4-15.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-04 04:36:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description D. Marlin 2015-11-19 11:07:10 EST
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.
Comment 1 D. Marlin 2015-11-19 11:08 EST
Created attachment 1096764 [details]
mock build log for AArch64
Comment 2 Yaakov Selkowitz 2015-11-25 16:55:33 EST
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 16:58 EST
Created attachment 1098990 [details]
Patch for rhel-7.3
Comment 6 John Feeney 2016-06-13 19:25:15 EDT
Is the patch provided sufficient?
Comment 7 Jon Masters 2016-08-30 03:37:27 EDT
Any news on 7.3?
Comment 14 Yaakov Selkowitz 2016-08-30 18:41:40 EDT
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}.
Comment 22 errata-xmlrpc 2016-11-04 04:36:49 EDT
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

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