[solved] can I run 32bit program on 64bit (aarch64) system?

Ask questions about Arch Linux ARM. Please search before making a new topic.

[solved] can I run 32bit program on 64bit (aarch64) system?

Postby mcarni » Wed Jan 18, 2023 4:50 pm

Guys,

I would like to be able to launch a 32bit program on my raspberrypi4 running aarch64.

I did some googling and
I think i understand that there is no multilib for arm, but i am not sure
I saw some suggestion to chroot into a 32bit system, but it seems quite complicated for just 1 package

I see I have good possibility to bork my syste, so I would like to ask if there is a "recommended" way of doing this.

can anyone provide some much appreciated feedback?

thanks a lot

m
Last edited by mcarni on Sat Jan 21, 2023 9:29 am, edited 1 time in total.
mcarni
 
Posts: 19
Joined: Fri Jul 23, 2021 9:54 am

Re: can I run 32bit program on 64bit (aarch64) system?

Postby moonman » Wed Jan 18, 2023 7:16 pm

You are correct there is no multilib. The easiest way is to use chroot/systemd-nspawn depending on your needs.

You can just download the generic armv7h image and extract it somewhere.

You can then use arch-chroot (from arch-install-scripts package) to chroot into that directory, alternatively you can use systemd-nspawn or arch-nspawn
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: can I run 32bit program on 64bit (aarch64) system?

Postby mcarni » Wed Jan 18, 2023 9:21 pm

thanks a lot @moonman

chroot is up and running, i need to experiment a bit more but i guess i should be able to solve my issue

thanks

M
mcarni
 
Posts: 19
Joined: Fri Jul 23, 2021 9:54 am

Re: can I run 32bit program on 64bit (aarch64) system?

Postby robg » Thu Jan 19, 2023 12:49 pm

I have tackled a similar question when installing Mathematica. Perhaps the corresponding thread might help.
robg
 
Posts: 194
Joined: Tue Jan 05, 2021 8:22 am

Re: can I run 32bit program on 64bit (aarch64) system?

Postby mcarni » Sat Jan 21, 2023 9:29 am

thanks @robg,

just to give a little feedback in case it might help others (then I will mark this as solved, i guess my issue are now related to the specific program that i want to run = steamlink)

i experimented a bit with chroot, arch-chroot and systemd-nspawn.
In the end among the 3, arch-chroot was helped me reach my goal with the least amount of effort.
chroot required a bit of setup (nothing too bad, the wiki is very helpful) while systemd-nspawn gave me issues with login, as mentioned on the wiki I had to remove a couple of files and every now and then i got a "free pointer()" issue and would not let me login.

for general maintenance or for general 32-bit use, I will stick to arch-chroot

anyway @robg suggestion seems the best for running one single program, so I played a bit also with it.
i linked the /armv7h libs as mentioned (i needed to link also /armv7h/opt/vc/lib) and I could run my 32-bit program on the aarch64 system.
I learned also a couple of thing about launching programs with specific libraries.
In my understanding I could have similar results if instead of linking libs i launch the program with $this->bbcode_second_pass_code('', 'LD_LIBRARY_PATH=/usr/lib7h:/armv7h/opt/vc/lib:$LD_LIBRARY_PATH /usr/bin/steamlink')

thanks for the support, I am still having issues with steamlink
$this->bbcode_second_pass_code('', 'qt.qpa.plugin: Could not load the Qt platform plugin "eglfs" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

/home/alarm/.local/share/SteamLink/steamlink.sh: line 199: 933 Aborted (core dumped) LD_PRELOAD=$QT_QPA_EGLFS_PRELOAD shell "$@"')

but I will post on the valve forum, seems the right place

thanks
M
mcarni
 
Posts: 19
Joined: Fri Jul 23, 2021 9:54 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 26 guests