pythonraspberry-picompilationfreeze

Raspberry Pi 3b solid freezes whilst compiling new version of python


appreciate your reading!

As the title says model 3b (non plus) freezes during compilation at what always seems the same place during the make -j 4.

Few points:

  1. Stuck with the 3b for now, so please do not recommend upgrade as its not an option right now (though is probably wise!)

  2. Possibly down to cooling maybe, i will be getting a full size heat sink in the coming weeks. But again for now im limited.

So if potentially heat issue what are my BEST options? use less cores? or reduce the cpu hz? or both?

Im not using an SD card but a usb3 (not a cheapo) memory stick. Could this be an issue? (stole the original sd for another project!)

On a side note, is there any way (in easish steps) to compile the app on a windows machine then port across the executable and required files? Every time i look into installing toolchains etc for even just basic windows it gets messy. Either no full guide or tutorial, or the guides dont tell you what to do when things go wrong (couldnt even get a simple GTK install into VS2022 just error after error, tho the guides werent much help ,every one using different methods)

Any guidance would be helpful. rpi 3b os raspberry pi os Bullseye legacy 64bit. Done the usual apt-get update upgrade etc

Currently compiling again with just 2 cores to see but i dont hold any hope! Do not have any thing to paste of where it gets to yet, stupid i should of copied it, but if it hits the issue again now i will add the part it gets to.

This guide (substituting the versions for newer!) https://stackoverflow.com/a/64737929

Currently trying fewer cores


Solution

  • You could just do:

    sudo make
    

    which will make it compile with 1 core. It will just take longer, but it shouldn't be having an issue with power. Make sure your pi isn't busy with some other stuff in the background.

    The main issue is that raspbian libraries stop at python 3.7 or 3.5 I think, which is why you can't just apt-get a newer python version and have to build from source. If you are okay with those versions, you should just keep using them.