I am trying to compile Python 3.6 on Raspberry Pi Jessie following the instructions here and I am getting the following error:
running build_scripts
creating build/scripts-3.6
copying and adjusting /home/pi/Downloads/Python-3.6.12/Tools/scripts/pydoc3 -> build/scripts-3.6
copying and adjusting /home/pi/Downloads/Python-3.6.12/Tools/scripts/idle3 -> build/scripts-3.6
copying and adjusting /home/pi/Downloads/Python-3.6.12/Tools/scripts/2to3 -> build/scripts-3.6
copying and adjusting /home/pi/Downloads/Python-3.6.12/Tools/scripts/pyvenv -> build/scripts-3.6
changing mode of build/scripts-3.6/pydoc3 from 644 to 755
changing mode of build/scripts-3.6/idle3 from 644 to 755
changing mode of build/scripts-3.6/2to3 from 644 to 755
changing mode of build/scripts-3.6/pyvenv from 644 to 755
renaming build/scripts-3.6/pydoc3 to build/scripts-3.6/pydoc3.6
renaming build/scripts-3.6/idle3 to build/scripts-3.6/idle3.6
renaming build/scripts-3.6/2to3 to build/scripts-3.6/2to3-3.6
renaming build/scripts-3.6/pyvenv to build/scripts-3.6/pyvenv-3.6
Segmentation fault
Makefile:603: recipe for target 'sharedmods' failed
make[2]: *** [sharedmods] Error 139
make[2]: Leaving directory '/home/pi/Downloads/Python-3.6.12'
Makefile:496: recipe for target 'build_all_generate_profile' failed
make[1]: *** [build_all_generate_profile] Error 2
make[1]: Leaving directory '/home/pi/Downloads/Python-3.6.12'
Makefile:477: recipe for target 'profile-opt' failed
make: *** [profile-opt] Error 2
I am getting the same errors when trying to compile any 3.6.x or 3.8.x Python version.
Any idea what the problem could be?