1

I compiled Python3.8.2 from scratch on Ubuntu 18.04.1.

Here's what I did:

tar xvzf Python3.8.2.tar.xz
cd Python3.8.2
./configure --enable-optimizations --with-lto
make -j8
sudo make altinstall

This is the same as I've done for other Python versions. When I open up a terminal, I get the following segfault anytime I want to assign memory:

herman@X1-Extreme ⏎  python3
Python 3.8.2 (default, Mar  2 2020, 12:53:45) 
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> test = ''
free(): invalid pointer
Aborted (core dumped)

I'm wondering if this is related to --enable-optimizations but I thought that runs the test suite as part of the process...

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Zoidberg
  • 425
  • 3
  • 10
  • 1
    I followed your steps above (bar the `sudo make altinstall`) but don't get the problem when I run `./python` from the working dir ... could it be picking up wrong libs from somewhere despite the `altinstall`? – tink Mar 03 '20 at 01:24
  • I ran `sudo make install` in the directory and it's good now – Zoidberg Mar 03 '20 at 14:32

1 Answers1

0

After reading this post I just ran sudo make install and it's fixed now

Zoidberg
  • 425
  • 3
  • 10