[Slackbuilds-users] Cannot build lua, many other scripts on arm and arm64

Brent Earl brent at exitstatusone.com
Tue Mar 16 14:35:08 UTC 2021


I noticed an issue with the lua SlackBuild that is actually wide spread on
SBo.  As an example, lua will not build without adding to the script.

Build failure:

gcc -DLUA_USE_LINUX   -c -o ldblib.o ldblib.c
gcc -DLUA_USE_LINUX   -c -o liolib.o liolib.c
In file included from /usr/include/bits/errno.h:26,
                 from /usr/include/errno.h:28,
                 from lauxlib.c:9:
/usr/include/linux/errno.h:1:10: fatal error: asm/errno.h: No such file or
directory
    1 | #include <asm/errno.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [<builtin>: lauxlib.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/include/bits/errno.h:26,
                 from /usr/include/errno.h:28,
                 from liolib.c:8:
/usr/include/linux/errno.h:1:10: fatal error: asm/errno.h: No such file or
directory
    1 | #include <asm/errno.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [<builtin>: liolib.o] Error 1
make[2]: Leaving directory '/tmp/SBo/lua-5.1.5/src'
make[1]: *** [Makefile:99: linux] Error 2
make[1]: Leaving directory '/tmp/SBo/lua-5.1.5/src'
make: *** [Makefile:56: linux] Error 2


Changing the following in the SlackBuild fixes it for ARM and ARM64:

--- lua.SlackBuild.orig 2021-03-15 22:24:45.560902023 -0600
+++ lua.SlackBuild      2021-03-16 08:20:55.529113247 -0600
@@ -38,6 +38,15 @@
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+  SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+  LIBDIRSUFFIX=""
+elif [ "$ARCH" = "aarch64" ]; then
+  SLKCFLAGS="-O2 -fPIC"
+  LIBDIRSUFFIX="64"
+else
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX=""
fi

set -e


This brought on a larger concern I have about SBo as a whole.  Will ARM and
soon ARM64 continue to be unsupported by SBo?  Both are official ports of
Slackware and should have at least some basic support.  More and more
systems will use these architectures due to the increased hardware
performance.  ARM is not an isolated issue anymore and it stunts the ports
if SBo is too difficult to use on the platforms.

Best Regards,
Brent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20210316/4e479ac7/attachment.htm>


More information about the SlackBuilds-users mailing list