I'm trying to install Ruby version 2.7.x or 3.0.x using rvm on a Pi 4. The make process fails compiling the file coroutine/arm64/Context.S
assembling coroutine/arm64/Context.S
coroutine/arm64/Context.S: Assembler messages:
coroutine/arm64/Context.S:25: Error: shift expression expected -- `sub sp,sp,0xb0'
coroutine/arm64/Context.S:28: Error: bad instruction `stp d8,d9,[sp,0x00]'
coroutine/arm64/Context.S:29: Error: bad instruction `stp d10,d11,[sp,0x10]'
coroutine/arm64/Context.S:30: Error: bad instruction `stp d12,d13,[sp,0x20]'
coroutine/arm64/Context.S:31: Error: bad instruction `stp d14,d15,[sp,0x30]'
coroutine/arm64/Context.S:32: Error: bad instruction `stp x19,x20,[sp,0x40]'
coroutine/arm64/Context.S:33: Error: bad instruction `stp x21,x22,[sp,0x50]'
coroutine/arm64/Context.S:34: Error: bad instruction `stp x23,x24,[sp,0x60]'
coroutine/arm64/Context.S:35: Error: bad instruction `stp x25,x26,[sp,0x70]'
coroutine/arm64/Context.S:36: Error: bad instruction `stp x27,x28,[sp,0x80]'
coroutine/arm64/Context.S:37: Error: bad instruction `stp x29,x30,[sp,0x90]'
coroutine/arm64/Context.S:40: Error: ARM register expected -- `str x30,[sp,0xa0]'
coroutine/arm64/Context.S:43: Error: ARM register expected -- `mov x2,sp'
coroutine/arm64/Context.S:44: Error: ARM register expected -- `str x2,[x0,0]'
coroutine/arm64/Context.S:47: Error: ARM register expected -- `ldr x3,[x1,0]'
coroutine/arm64/Context.S:48: Error: immediate expression requires a # prefix -- `mov sp,x3'
coroutine/arm64/Context.S:51: Error: bad instruction `ldp d8,d9,[sp,0x00]'
coroutine/arm64/Context.S:52: Error: bad instruction `ldp d10,d11,[sp,0x10]'
coroutine/arm64/Context.S:53: Error: bad instruction `ldp d12,d13,[sp,0x20]'
coroutine/arm64/Context.S:54: Error: bad instruction `ldp d14,d15,[sp,0x30]'
coroutine/arm64/Context.S:55: Error: bad instruction `ldp x19,x20,[sp,0x40]'
coroutine/arm64/Context.S:56: Error: bad instruction `ldp x21,x22,[sp,0x50]'
coroutine/arm64/Context.S:57: Error: bad instruction `ldp x23,x24,[sp,0x60]'
coroutine/arm64/Context.S:58: Error: bad instruction `ldp x25,x26,[sp,0x70]'
coroutine/arm64/Context.S:59: Error: bad instruction `ldp x27,x28,[sp,0x80]'
coroutine/arm64/Context.S:60: Error: bad instruction `ldp x29,x30,[sp,0x90]'
coroutine/arm64/Context.S:63: Error: ARM register expected -- `ldr x4,[sp,0xa0]'
coroutine/arm64/Context.S:66: Error: shift expression expected -- `add sp,sp,0xb0'
coroutine/arm64/Context.S:69: Error: bad instruction `ret x4'
make: *** [Makefile:430: coroutine/arm64/Context.o] Error 1
It looks almost like there is the wrong architecture defined. I tried to compile Ruby from the github repo but ran into the same problem.
output from some system commands
root@callisto:~# file $(which bash)
/usr/bin/bash: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=3e5e2847bbc51da2ab313bc53d4bdcff0faf2462, stripped
root@callisto:~# uname -a
Linux callisto 5.10.52-v8+ #1441 SMP PREEMPT Tue Aug 3 18:14:03 BST 2021 aarch64 GNU/Linux
root@callisto:~# lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Any ideas what I could do? Given that I can't find anything it might be a local problem and I'll have to reinstall the OS.
file (which bash)
. (If you are using stock Raspbian/RpiOS, it is 32-bit, and running it on a Pi 4 does not change this.)