Problem while building Python 3.6 from source.

Chris Angelico rosuav at gmail.com
Fri Jan 13 13:19:10 EST 2017


On Sat, Jan 14, 2017 at 5:00 AM, Michael S <michael.s011235 at gmail.com> wrote:
> Hello,
> I am new to this mailing-list and I really don't know whether this
> mail should belong to python-dev. Please tell me, if so.

Hi and welcome! This kind of thing is best on this list initially.

> Unfortunately, I have got the following problem: I wanted to build and
> install Python 3.6 from source but did not succeed.
> To clarify my situation, I got as an operating system Debian jessie
> 8.6 and I used the xz compressed source tarball from
> https://www.python.org/downloads/release/python-360/.
> Concerning the build dependencies: I just executed:
> $ sudo apt-get build-dep python3.4 (since 3.6 and 3.5 did not work).

That should be fine; the build dependencies of Python don't tend to
change frequently. Jessie shipped with Python 3.4 but nothing newer,
so there won't be packages for python3.5 or python3.6.

> Then I executed ./configure --enable-optimizations and make -j4 (I got 4 cores).
> The output of make ended like:
> 'make: *** [profile-opt] Error 2'.

That just means that something went wrong. You'd have to scroll up to
find the actual cause of the error.

> I had redirected the output and error of the configure and make commands via
> $ make -j4 &> /home/username/make_output.txt.
> Nevertheless I got an error to the console:
> '*** Error in ./python'" free(): invalid next size (normal):
> 0x00000000015bdf90 ***'.
> Due to these error messages (this one and the one at the end of make)
> I think the build was not successful.
>
> How to solve this problem?
>
> Of course I could send you the output and error files.

The first thing I'd do would be to try a non-optimized build. Set your
current build tree aside and re-extract into a new directory (that
way, when you go back to playing with optimized builds, you don't have
to redo the work), and run configure with no arguments. I'd also be
inclined to run make with no arguments; there've been issues with
parallel builds in enough projects that I've gotten into the habit of
"problem? do it the slow way". If that build also fails, scroll up a
bit and find where stuff failed.

Are you familiar with building programs from source? If not, the best
solution might be to post the entire log, but ideally, you should be
able to skim through the last part of the log and report the actual
problem that's cropping up.

ChrisA



More information about the Python-list mailing list