If I try configuring python3.6.2 with --enable-optimisations and this causes it to segfault gcc during make.
It seems to build OK with a plain ./configure and make.
The error recommends a full bug report - has anyone also had this?
-
- Posts: 59
- Joined: Mon Jul 29, 2013 4:37 pm
Re: Building Python3.6.2 with optimizations
It's very hard to provide help without seeing the actual error you are getting.
Entering crystall ball mode...
--enable-optimizations for python build enables lto and profiling, it also runs a set of lenghty and expensive tests, lto linking requires vast amounts of ram.
It's possible that gcc segfaults due to OOM (out of memory).
Run dmesg after crash - if you see OOM errors then my crystal ball still works.
Try increasing your swap{file,partition} to 4-8 GB.
Entering crystall ball mode...
--enable-optimizations for python build enables lto and profiling, it also runs a set of lenghty and expensive tests, lto linking requires vast amounts of ram.
It's possible that gcc segfaults due to OOM (out of memory).
Run dmesg after crash - if you see OOM errors then my crystal ball still works.
Try increasing your swap{file,partition} to 4-8 GB.
Re: Building Python3.6.2 with optimizations
It's a little while after the earlier posts, but in case it's useful to anyone trying something similar, I managed to successfully compile Python 3.6 (specifically 3.6.4)
My set up is a RPi 3 running Rasbian Jessie Lite
I did the following steps, based on the URL given but for 3.6.4 with the optimisations and LTO enabled (wasn't 100% sure that LTO did anything as I didn't spot any output referring to it, but it didn't seem to do any harm!).
https://liftcodeplay.com/2017/06/30/how ... pberry-pi/
Pre-requisites
Get source
Compile
Test version
My set up is a RPi 3 running Rasbian Jessie Lite
I did the following steps, based on the URL given but for 3.6.4 with the optimisations and LTO enabled (wasn't 100% sure that LTO did anything as I didn't spot any output referring to it, but it didn't seem to do any harm!).
https://liftcodeplay.com/2017/06/30/how ... pberry-pi/
Pre-requisites
Code: Select all
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
Code: Select all
cd /usr/src
sudo wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
sudo tar xzf Python-3.6.4.tgz
Code: Select all
cd Python-3.6.4
sudo -s
./configure --enable-optimizations --with-lto
make altinstall
exit
Code: Select all
python3.6 --version
pip3.6 --version
-
- Posts: 59
- Joined: Mon Jul 29, 2013 4:37 pm
Re: Building Python3.6.2 with optimizations
Ooh Thanks
Tom
Tom