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

Advanced users • Re: build 32 bit apps on 64 bit host or build ZFS on 32 bit host

$
0
0
Good morning and many thanks for the attention to my post. This is a brief post while I re-caffeinate before I get some yard work done before outside temperature gets unbearable for me. (I'm in the Midwest USA where we are experiencing a very warm late July.) I'll follow up with more detail.

Upshot: Can it be this easy? Commands to produce a (static) 32 bit binary on a 64 bit RpiOS install that runs on a 32 bit RpiOS and does not run on the 64 bit install..

Code:

 2014  sudo dpkg --add-architecture armhf 2016  sudo apt update 2018  apt search arm-linux-gnueabihf 2019  sudo apt install gcc-12-arm-linux-gnueabihf 2020  make CC=arm-linux-gnueabihf-gcc-12 2021  file hello 2022  ./hello 2023  ldd ./hello
using the Makefile

Code:

CC = gcchello: hello.o        $(CC) hello.o -o hellohello.o: hello.c        $(CC) -c hello.c -o hello.o
I need to add libraries and see what is needed to link dynamic libraries. I'll also link the post that clued me in on this.

Statistics: Posted by HankB — Sat Jun 28, 2025 1:45 pm



Viewing all articles
Browse latest Browse all 8037

Trending Articles