classification
Title: sha module broken
Type: compile error Stage: resolved
Components: Versions: Python 3.4, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, haypo, ned.deily, python-dev, ronaldoussoren
Priority: normal Keywords: 3.3regression

Created on 2013-01-03 06:56 by ronaldoussoren, last changed 2013-01-03 08:43 by ronaldoussoren. This issue is now closed.

Messages (5)
msg178916 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2013-01-03 06:56
On OSX 10.8 with the following configure line and a fresh checkout (as of 10 minutes ago):

'../configure'  '--enable-framework' '--enable-universalsdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk' '--with-universal-archs=intel' '--with-framework-name=Python' 'MACOSX_DEPLOYMENT_TARGET=10.8' 'CC=clang' 'CXX=clang++'

The build fails because _PyUnicode_CheckConsistency cannot be found when trying to load (amongst others) _sha1. According to the unicodeobject.h that function is only available in debug builds, while it gets used unconditionally in sha1module.c

I haven't run a bisect yet to find why the build fails now, the call to _PyUnicode_CheckConsistency was added in April and the build failure is (much) more recent.
msg178919 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-01-03 07:43
FWIW, a build of current top-of-branch 3.3 using the same configure command and in a subdirectory (../configure) seemed to work fine on 10.8.2 with Xcode 4.5.2.  And I've not seen the issue with other recent builds of default.
msg178921 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-01-03 07:54
The problem can only occur when you compile a non-pydebug build with the -DDEBUG flag instead the -DNDEBUG flag. With -DNDEBUG the assert() call doesn't do anything and the function call is removed by the preprocessor.

I'll fix it later.
msg178925 - (view) Author: Roundup Robot (python-dev) Date: 2013-01-03 08:23
New changeset 944e86223d1f by Christian Heimes in branch '3.3':
Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in
http://hg.python.org/cpython/rev/944e86223d1f

New changeset 4b42d7f288c5 by Christian Heimes in branch 'default':
Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in
http://hg.python.org/cpython/rev/4b42d7f288c5
msg178926 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2013-01-03 08:43
That's quick, thank :-).
History
Date User Action Args
2013-01-03 08:43:06ronaldoussorensetmessages: + msg178926
2013-01-03 08:23:43christian.heimessetstatus: open -> closed
assignee: christian.heimes ->
resolution: fixed
stage: needs patch -> resolved
2013-01-03 08:23:03python-devsetnosy: + python-dev
messages: + msg178925
2013-01-03 07:54:32christian.heimessetassignee: christian.heimes

messages: + msg178921
nosy: + christian.heimes
2013-01-03 07:43:15ned.deilysetnosy: + ned.deily
messages: + msg178919
2013-01-03 07:17:25pitrousetnosy: + haypo

versions: + Python 3.4
2013-01-03 06:56:50ronaldoussorencreate