Disclaimer: I am running Arch Linux ARM. However, as Manjaro is derived from Arch and the community here tends to be more active, I hope you will allow me to post my question.
Dear Manjaro ARM Community,
Im currently trying to install Wolfram Mathematica on my Raspberry Pi 4. All packages and the firmware on my device are up-to-date, and I am running the latest available 64bit RPI kernel:
$ uname -a
Linux alarm 5.15.45-2-rpi-ARCH #1 SMP PREEMPT Wed Jun 8 05:59:13 MDT 2022 aarch64 GNU/Linux
The problem lies in the fact that Mathematica is only available as an armhf binary; this no problem on Raspberry Pi OS, since it includes the necessary multilib libraries, but it is obviously a show stopper on arm64 Arch/Manjaro.
After some research, I decided on a Debian Bullseye armhf chroot as the easiest method to run Mathematica. I set up the environment following the steps below.
Step 1 (Bootstrap, according to this Pine64 forum thread; executed as root):
mkdir /debian-armhf
debootstrap --arch armhf bullseye /debian-armhf
for f in {proc,sys,dev}; do sudo mount --bind /${f} /debian-armhf/${f}; done
Step 2 (Chroot into Debian FS):
chroot /debian-armhf su -
Step 3 (Install wget, download the official Mathematica installer script, and run it):
apt install wget
wget https://wolfr.am/wolfram-engine-raspi-install
chmod +x wolfram-engine-raspi-install && ./wolfram-engine-raspi-install
Step 4 (Install two missing dependencies that are not pulled in automatically):
apt install libatomic1 libgl1
Step 5 (Final step; enable X server access from chroot):
On host system:
xhost +local:
In chroot:
export DISPLAY=:0
When I test the above chroot setup with xclock
(part of the x11-apps group in Debian), the program runs as expected. Running mathematica
however ends with “Illegal instruction (core dumped)”. Clearly there is something amiss with the binary, but I am not sure how to investigate this problem. Therefore, this is where I would kindly like to ask for your assistance.
And needless to say: if you need any additional information, just let me know!