Is there a means of compiling applications on 64bit RaspbianOS to run on 32bit Raspbian? I'm trying to compile Google Test on a 32bit Pi at the moment and I'm not getting very far. So I'm guessing an 8Gb 64bit machine would compile it sometime before the end of the universe.

  • Are you running out of memory during compile? Otherwise, just increasing the memory (but otherwise the same hardware) won't change much, I suppose. Using a linux-based PC (or VM) would probably help more. Depends on how the build is configured for that particular application, but it is generally possible to cross-compile from X86/X64 to Arm.
    – PMF
    Sep 24, 2020 at 14:22
  • It brings the Pi to an absolute grinding halt. So I suspect a memory issue. I've just compiled on my Pi4 with no problem.
    – Nick
    Sep 24, 2020 at 14:26
  • Then I guess you need to check with the docs of that application whether they support cross-compilling.
    – PMF
    Sep 24, 2020 at 14:47
  • You'll need an appropriate cross-compiler...which also means all the 32-bit libs you need to link. Might be easier if you booted a 32-bit OS on the Pi 4 and did it that way, since the issue is almost certainly not 32-bit vs. 64 bit, it's an 8gb Pi 4 vs. whatever the other one is. Just take the card out of the one and put it in the other.
    – goldilocks
    Sep 24, 2020 at 14:47
  • Note: A 8GB Pi4 will only show <4GB ram in 32bit mode. On the other hand all pointers are half the size so the memory required for gcc is noticeable less. If it compiles 64bit code with 8GB then it probably will manage 32bit code with 4GB too. Sep 27, 2020 at 15:12


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.