PINE64
Manjaro multilib or 32 bit ARM binaries? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Manjaro multilib or 32 bit ARM binaries? (/showthread.php?tid=10842)



Manjaro multilib or 32 bit ARM binaries? - dieselnutjob - 07-25-2020

Is there a way to get multilib working on Manjaro?
I tried the mrfixit Debian build on an SD card and that runs 32 bit ARM binary compiled for Raspbian straight out of the box.
Would it possible to do the same wit Manjaro?

I would like to be able to compile and run Raspbian binaries on my Pinebook Pro using Manjaro.


RE: Manjaro multilib or 32 bit ARM binaries? - slyecho - 07-26-2020

It's possible to install 32-bit Debian with debootstrap into a directory and then log into it with chroot. Also possible with systemd-nspawn. Also, with Docker.

Chroot is probably the easiest to understand, and is useful to learn when you need to recover an unbootable system.

Code:
sudo mkdir /debian-armhf
sudo debootstrap --arch armhf testing /debian-armhf

This will download Debian/testing into a directory, I don't know which Debian version Raspbian is based on, so you can change that, probably to better match the library versions.

Then you need to mount some directories, you only need to do this every time you reboot:

Code:
for f in {proc,sys,dev}; do sudo mount --bind /${f} /debian-armhf/${f}; done

This will mount some needed directories into the chroot, I've written it in a single line so it's easier to find in history with CTRL-R.

By this point you are ready to log into your Debian:

Code:
sudo chroot /debian-armhf su -

You can add your own user, too, with adduser username. Then the login would be with su - username.


RE: Manjaro multilib or 32 bit ARM binaries? - dieselnutjob - 07-26-2020

thank you, your instructions work very well
I install fpc into debian chroot and I can compile and run a helloworld.pas 32 bit program.

The only missing thing was (if you are as stupid as me) was how to install debootstrap in the first place. It's in the manjaro software installer just like any other manjaro program.

The last thing that I haven't solved, how do I get a 32 bit program in the debian chroot to talk to the X11 server running in the main manjaro OS ?

thanks again, DNJ


RE: Manjaro multilib or 32 bit ARM binaries? - dieselnutjob - 07-27-2020

answer to X11 here
https://forum.manjaro.org/t/get-x11-to-listen-on-localhost-tcp-port/155460

now I'm struggling a bit with group permissions
I have a USB serial adapter in usb socket which appears as /dev/ttyUSB0
My understanding is that in Manjaro I have to add myself to the uucp group to use it, whilst in Debian it has to be the dialout group
So I did both.
From inside the Debian chroot I am still getting a permissions error on accessing /dev/ttyUSB0 though.

From the Manjaro terminal
[philip@pinebookpro debian-armhf]$ ls -al /dev/ttyUSB0
crw-rw---- 1 root uucp 188, 0 Jul 27 20:57 /dev/ttyUSB0

From the Debian chroot terminal
philip@pinebookpro:~$ ls -al /dev/ttyUSB0
crw-rw---- 1 root 987 188, 0 Jul 27 19:57 /dev/ttyUSB0


RE: Manjaro multilib or 32 bit ARM binaries? - dieselnutjob - 07-27-2020

I got it working
I set the GID of the uucp group in the Debian chroot to the same number as the uucp group GID in Manjaro and then programs that want to access /dev/ttyUSB0 start working

[Image: Screenshot_20200727_221145.png]