Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8026

Advanced users • Re: Running 32bit ELF executables on 64bit Pi OS

$
0
0
Pi5 defaults to booting kernel_2712.img (if present, in a 64bit distro) and this requires 16K page alignment for all user processes. You can add kernel=kernel8.img to /boot/firmware/config.txt to avoid this.
Thanks! Your comments are incredibly helpful.
I think you must have copied the ELF binary in from another system in order to have built it at all. I have had other execve() errors running the outputs on a different system than they were built, I think because they are tied to memory layout or library versions.

I would recommend installing gcc-12-arm-linux-gnueabihf on the Pi500 and using /usr/bin/arm-linux-gnueabihf-gcc-12 to build mc-so itself.
Yes. I installed that version of gcc from the "Preferences -> Add/Remove Software" pull-down in the upper left corner of the splash screen of the Pi 500, when the power is turned on. This is what I ended up with after that install:

Code:

zope@raspberrypi:~/tmp/Squint $ makearm-linux-gnueabihf-gcc-12 -g -Wall -Wno-misleading-indentation -Wno-incompatible-pointer-types -Wno-maybe-uninitialized -o mc mc.c -ldl
It compiles with no error, even after removing all those -W flags, which are strictly unnecessary.

I think the kernel version you mentioned at the top of your reply must be the key. I believe I've done everything "right" at this point to try to do the install/run on the generic Raspberry Pi 500 environment, and I'm beginning to believe it is impossible to run 32 bit shared object executables from that environment. Maybe @PhilE knows better, and will comment!

Statistics: Posted by HPCguy — Thu May 01, 2025 9:17 pm



Viewing all articles
Browse latest Browse all 8026

Trending Articles