Latest Python 3.4 in the source repo is broken?

  • Thread starter Steven D'Aprano
  • Start date
S

Steven D'Aprano

Before I bother Python-Dev with this, can anyone else confirm that
building Python 3.4 from source using the latest version in the source
repository fails?

# Get the source code
hg clone http://hg.python.org/cpython

# Build Python (on Unix, sorry Windows and Mac people, you're on your own)
../configure --with-pydebug && make -j2



I get the following errors:

libpython3.4dm.a(pythonrun.o): In function `_Py_InitializeEx_Private':
/home/steve/python/cpython/Python/pythonrun.c:459: undefined reference to
`_PyTraceMalloc_Init'
libpython3.4dm.a(pythonrun.o): In function `Py_Finalize':
/home/steve/python/cpython/Python/pythonrun.c:648: undefined reference to
`_PyTraceMalloc_Fini'
collect2: ld returned 1 exit status
make: *** [Modules/_testembed] Error 1



Thanks in advance,
 
Z

Zachary Ware

Before I bother Python-Dev with this, can anyone else confirm that
building Python 3.4 from source using the latest version in the source
repository fails?

# Get the source code
hg clone http://hg.python.org/cpython

# Build Python (on Unix, sorry Windows and Mac people, you're on your own)
./configure --with-pydebug && make -j2



I get the following errors:

libpython3.4dm.a(pythonrun.o): In function `_Py_InitializeEx_Private':
/home/steve/python/cpython/Python/pythonrun.c:459: undefined reference to
`_PyTraceMalloc_Init'
libpython3.4dm.a(pythonrun.o): In function `Py_Finalize':
/home/steve/python/cpython/Python/pythonrun.c:648: undefined reference to
`_PyTraceMalloc_Fini'
collect2: ld returned 1 exit status
make: *** [Modules/_testembed] Error 1

The buildbots[1] don't seem to agree, and it builds fine for me on
Windows. In order of destructiveness, try these:

make
Without -j2, see if there's a race somewhere.
make distclean
Clear out nearly all generated files.
hg purge --all
Clear out everything that's not checked in (this
includes untracked and ignored files). You may
need to enable the purge extension,
`hg --config extensions.purge= purge --all`
And I would suggest checking the output of
`hg purge --all -p` before you do it to make sure
you're not obliterating anything you want to keep.
hg up null && hg purge --all && hg up default
Rebuild the repository from scratch (without a full clone).

[1] http://buildbot.python.org/all/waterfall?category=3.x.stable
 
J

Johannes Findeisen

Before I bother Python-Dev with this, can anyone else confirm that
building Python 3.4 from source using the latest version in the source
repository fails?

I can not confirm an error. I checked out the latest sources
and ./configure and make executed without any error using exactly your
parameters.

Thanks in advance,

You are welcome... ;)

Regards,
Johannes
 
C

Chris Angelico

Before I bother Python-Dev with this, can anyone else confirm that
building Python 3.4 from source using the latest version in the source
repository fails?

# Build Python (on Unix, sorry Windows and Mac people, you're on your own)
./configure --with-pydebug && make -j2
The buildbots[1] don't seem to agree, and it builds fine for me on
Windows. In order of destructiveness, try these:

[1] http://buildbot.python.org/all/waterfall?category=3.x.stable

Are there any buildbots that configure --with-pydebug? This could be a
debug-only issue.

That said, though, I just did a build without -j2 (on Linux - Debian
Wheezy amd64) and it worked fine. Doing another one with -j2 didn't
show up any errors either, but if it is a -j problem, then as Zachary
says, it could be a race.

What commit hash were you building from? It might have been broken and
then fixed shortly, and you got into that tiny window.

ChrisA
 
Z

Zachary Ware

Are there any buildbots that configure --with-pydebug? This could be a
debug-only issue.

Only all of them :). As far as I know, the only 'bot that does a
non-debug build is the "x86 Gentoo Non-Debug" bot.
That said, though, I just did a build without -j2 (on Linux - Debian
Wheezy amd64) and it worked fine. Doing another one with -j2 didn't
show up any errors either, but if it is a -j problem, then as Zachary
says, it could be a race.

What commit hash were you building from? It might have been broken and
then fixed shortly, and you got into that tiny window.

There was a brief issue this morning, but it was in typeobject.c, not
_testembed. See http://hg.python.org/cpython/rev/655d7a55c165
 
E

Ethan Furman

Before I bother Python-Dev with this, can anyone else confirm that
building Python 3.4 from source using the latest version in the source
repository fails?

This is the check-out I'm using:

ethan@media:~/source/python/cpython$ hg parent
----------------------------------------------------------------------------
rev: 88961:7d0a4f89c6ce
branch: default
tag: tip
user: Vinay Sajip <[email protected]>
date: 2014-02-04 16:42 +0000
desc: Closes #20509: Merged documentation update from 3.3.
----------------------------------------------------------------------------

These are the settings I always use to make sure I have no weird problems between check-outs:

ethan@media:~/source/python/cpython$ make distclean && ./configure --with-pydebug && make -j3
...
...
...
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_gdbm _lzma
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

running build_scripts
creating build/scripts-3.4
copying and adjusting /home/ethan/source/python/cpython/Tools/scripts/pydoc3 -> build/scripts-3.4
copying and adjusting /home/ethan/source/python/cpython/Tools/scripts/idle3 -> build/scripts-3.4
copying and adjusting /home/ethan/source/python/cpython/Tools/scripts/2to3 -> build/scripts-3.4
copying and adjusting /home/ethan/source/python/cpython/Tools/scripts/pyvenv -> build/scripts-3.4
changing mode of build/scripts-3.4/pydoc3 from 664 to 775
changing mode of build/scripts-3.4/idle3 from 664 to 775
changing mode of build/scripts-3.4/2to3 from 664 to 775
changing mode of build/scripts-3.4/pyvenv from 664 to 775
renaming build/scripts-3.4/pydoc3 to build/scripts-3.4/pydoc3.4
renaming build/scripts-3.4/idle3 to build/scripts-3.4/idle3.4
renaming build/scripts-3.4/2to3 to build/scripts-3.4/2to3-3.4
renaming build/scripts-3.4/pyvenv to build/scripts-3.4/pyvenv-3.4


Hope this helps.
 
C

Chris Angelico

Only all of them :). As far as I know, the only 'bot that does a
non-debug build is the "x86 Gentoo Non-Debug" bot.

LOL! Okay. Yeah, I think that settles that part of the question!

ChrisA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top