Hardcoded i686 architecture breaks x86_64 builds
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
luarocks (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
...and because luarocks hardcodes an x86_64 workaround for lua.org upstream's non-pic brain damage ("it works on i386!"), the luarocks workaround is undone by luarocks.deb lying to it about the architecture.
The exact bug is present in Debian, except inverted: the architecture is hardcoded to x86_64. I forget, is that "grave"? Should I file there too?
$ luarocks build lpack
[...]
gcc -O2 -I/usr/
gcc -shared -o pack.so -L/usr/local/lib lpack.o
/usr/bin/ld: lpack.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
lpack.o: could not read symbols: Bad value
$ grep fPIC /usr/share/
if proc == "x86_64" and not defaults.
defaults.
$ grep UNAME_M /usr/share/
LUAROCKS_
$ uname -m
x86_64
$ grep -A 10 proper /usr/share/
-- A proper installation of LuaRocks will hardcode the system
-- and proc values with config.
-- so that this detection does not run every time. When it is
-- performed, we use the Unix way to identify the system,
-- even on Windows (assuming UnxUtils or Cygwin).
system = config.
proc = config.
if proc:match(
proc = "x86"
elseif proc:match("amd64") or proc:match(
proc = "x86_64"
$ # So if we simply remove the i686 line from config.lua, luarocks will get the architecture right. Feel free to set it in /etc in postinst instead....
$ # apply attached patch directly to /usr/share/
$ luarocks build lpack
Archive: /tmp/luarocks_
inflating: lpack-20070629-
extracting: lpack.tar.gz
Do not use 'module' as a build type. Use 'builtin' instead.
gcc -O2 -fPIC -I/usr/
gcc -shared -o pack.so -L/usr/local/lib lpack.o
$ # Installation works as well.
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: luarocks 2.0.2-1
ProcVersionSign
Uname: Linux 3.0.0-15-generic x86_64
NonfreeKernelMo
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Sat Jan 28 16:00:09 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitec
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: luarocks
UpgradeStatus: No upgrade log present (probably fresh install)
The attachment "Let luarocks discover the architecture dynamically, since this is an all-arch package." of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.
[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]