This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon, eric.araujo
Date 2012-10-28.02:32:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1351391539.96.0.993483572486.issue16342@psf.upfronthosting.co.za>
In-reply-to
Content
Discovered on OS X 10.8 with clang 3.1, I'm having build failures for _json, _md5, _sha1, _sha256, _sha3, and _sha512 because _PyUnicode_CheckConsistency() is only defined when defined(Py_DEBUG) && !defined(Py_LIMITED_API) even though it is only used in assert() calls (like the one below). If you read the comment in Include/Python.h where assert.h is included it explicitly says that:

/* CAUTION:  Build setups should ensure that NDEBUG is defined on the
 * compiler command line when building Python in release mode; else
 * assert() calls won't be removed.
 */

Based on the output below that is not currently happening in setup.py. Not sure if that is a failure of setup.py or distutils of not specifying the flag.



building '_json' extension
/Users/bcannon/Developer/bin/clang -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes -Wno-unused-value -Wno-empty-body -Qunused-arguments -Wno-unused-value -Wno-empty-body -Qunused-arguments -I./Include -I. -I/Users/bcannon/Developer/include -I/Users/bcannon/Developer/Cellar/readline/6.2.2/include -I/Users/bcannon/Developer/repo/cpython/py3.3/Include -I/Users/bcannon/Developer/repo/cpython/py3.3 -c /Users/bcannon/Developer/repo/cpython/py3.3/Modules/_json.c -o build/temp.macosx-10.8-x86_64-3.3/Users/bcannon/Developer/repo/cpython/py3.3/Modules/_json.o
/Users/bcannon/Developer/repo/cpython/py3.3/Modules/_json.c:249:12: warning: implicit declaration of function
      '_PyUnicode_CheckConsistency' is invalid in C99 [-Wimplicit-function-declaration]
    assert(_PyUnicode_CheckConsistency(rval, 1));
           ^
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
1 warning generated.
/Users/bcannon/Developer/bin/clang -bundle -undefined dynamic_lookup -L /Users/bcannon/Developer/lib -L/Users/bcannon/Developer/Cellar/readline/6.2.2/lib -L /Users/bcannon/Developer/lib -L/Users/bcannon/Developer/Cellar/readline/6.2.2/lib -L /Users/bcannon/Developer/lib -L/Users/bcannon/Developer/Cellar/readline/6.2.2/lib -Wno-unused-value -Wno-empty-body -Qunused-arguments -I /Users/bcannon/Developer/include -I/Users/bcannon/Developer/Cellar/readline/6.2.2/include build/temp.macosx-10.8-x86_64-3.3/Users/bcannon/Developer/repo/cpython/py3.3/Modules/_json.o -L/Users/bcannon/Developer/lib -L/Users/bcannon/Developer/Cellar/readline/6.2.2/lib -o build/lib.macosx-10.8-x86_64-3.3/_json.so
*** WARNING: renaming "_json" since importing it failed: dlopen(build/lib.macosx-10.8-x86_64-3.3/_json.so, 2): Symbol not found: __PyUnicode_CheckConsistency
  Referenced from: build/lib.macosx-10.8-x86_64-3.3/_json.so
  Expected in: flat namespace
 in build/lib.macosx-10.8-x86_64-3.3/_json.so
History
Date User Action Args
2012-10-28 02:32:20brett.cannonsetrecipients: + brett.cannon, eric.araujo
2012-10-28 02:32:19brett.cannonsetmessageid: <1351391539.96.0.993483572486.issue16342@psf.upfronthosting.co.za>
2012-10-28 02:32:19brett.cannonlinkissue16342 messages
2012-10-28 02:32:18brett.cannoncreate