classification
Title: sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4
Type: compile error Stage: resolved
Components: Extension Modules, Library (Lib) Versions: Python 3.4, Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: Joakim.Sernbrant, Marc.Abramowitz, benjamin.peterson, bharper, dmalcolm, georg.brandl, larry, lemburg, ned.deily, petri.lehtinen, python-dev, serhiy.storchaka
Priority: release blocker Keywords: patch

Created on 2013-04-27 18:46 by lemburg, last changed 2013-05-12 10:32 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
sqlite_int64.patch serhiy.storchaka, 2013-04-27 20:27 review
Messages (18)
msg187921 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2013-04-27 18:46
This is essentially the same issue as http://bugs.python.org/issue14572.

The following addition in Python 2.7.4 (compared to 2.7.3) reintroduced the same problem in a different place:

--- Python-2.7.3/Modules/_sqlite/util.h 2012-04-10 01:07:33.000000000 +0200
+++ Python-2.7.4/Modules/_sqlite//util.h        2013-04-06 16:02:36.000000000 +0200
@@ -33,6 +33,10 @@ int pysqlite_step(sqlite3_stmt* statemen
 /**
  * Checks the SQLite error code and sets the appropriate DB-API exception.
  * Returns the error code (0 means no error occurred).
  */
 int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st);
+
+PyObject * _pysqlite_long_from_int64(sqlite3_int64 value);
+sqlite3_int64 _pysqlite_long_as_int64(PyObject * value);
+
 #endif

The fix is the same as for the 2.7.3 issue: replace sqlite3_int64 with sqlite_int64
msg187924 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2013-04-27 18:50
Adding the same people to the nosy list as on issue #14572.
msg187930 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-04-27 20:07
The regression was introduced in issue17073.
msg187931 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-04-27 20:27
Here is a patch for 2.7. Please test. Should it be fixed on 3.x?
msg187939 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-04-27 21:44
The patch does solve the build problem for 2.7 on 10.4 (Tiger).  The same problem exists for 3.3 and default as well.  I see the Tiger buildbots aren't failing with this problem; I suspect that's because there is a newer version of libsqlite3 being supplied in /usr/local/{include,lib}, like the OS X installer builds do since the Apple-supplied version of libsqlite3 in 10.4 is the ancient 3.1.3.
msg187940 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2013-04-27 21:44
On 27.04.2013 22:27, Serhiy Storchaka wrote:
> 
> Serhiy Storchaka added the comment:
> 
> Here is a patch for 2.7. Please test. Should it be fixed on 3.x?

Thanks, Serhiy.

I can confirm that the patch fixes the problem with 2.7.4 on
Mac OS X (and probably other platforms with old sqlite libs as
well).

Python 3.3 is not affected by this. It uses a Python type
for storing the values.
msg187951 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-04-28 03:20
Marc-Andre, can you elaborate on why you think Python 3 is not affected? The changes for Issue17073 also added sqlite3_int64 to 3.2, 3.3, and default and, for me on 10.4, _sqlite3.so currently fails to build in all three.  (I don't think 3.2 is worth worrying about but if Georg does spin a brown bag 3.2.5 he could cherry pick it.)
msg187971 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2013-04-28 08:44
On 28.04.2013 05:20, Ned Deily wrote:
> 
> Ned Deily added the comment:
> 
> Marc-Andre, can you elaborate on why you think Python 3 is not affected? The changes for Issue17073 also added sqlite3_int64 to 3.2, 3.3, and default and, for me on 10.4, _sqlite3.so currently fails to build in all three.  (I don't think 3.2 is worth worrying about but if Georg does spin a brown bag 3.2.5 he could cherry pick it.)

Oh, I just did a grep on the Python 3.3.0 code base and couldn't
find any hits. Was the issue you mentioned applied to the 3.3.1 dot
release ?

If so, then those new mentions will have to be fixed as well,
of course.
msg187972 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-04-28 10:08
Patch for issue14572 was applied only to 2.7 and then I backported the bug back from 3.x.
msg187974 - (view) Author: Roundup Robot (python-dev) Date: 2013-04-28 11:17
New changeset 44fe1f5b07e3 by Serhiy Storchaka in branch '2.7':
Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
http://hg.python.org/cpython/rev/44fe1f5b07e3

New changeset b677f656c0bf by Serhiy Storchaka in branch '3.3':
Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
http://hg.python.org/cpython/rev/b677f656c0bf

New changeset 19015fc0c338 by Serhiy Storchaka in branch 'default':
Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
http://hg.python.org/cpython/rev/19015fc0c338
msg188012 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-04-28 18:52
Fix verified on OS X 10.4 for 2.7, 3.3, and default.
msg188076 - (view) Author: bharper (bharper) Date: 2013-04-29 17:04
This issue, like 14572, is also effecting Python 2.7.4 on CentOS 5.  I can confirm the patch fixes this issue on CentOS5.
msg188083 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2013-04-29 18:28
Thanks, Serhiy.
msg188175 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-04-30 18:59
I think this fix should be included in the next regression release.
msg188182 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-04-30 19:55
Georg, do you want a 3.2 patch for this as well?
msg188217 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2013-05-01 12:46
Would be nice, yes.
msg188992 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2013-05-12 09:14
Cherry-picked to 3.2 branch.
msg189000 - (view) Author: Roundup Robot (python-dev) Date: 2013-05-12 10:32
New changeset d5b5116bf953 by Serhiy Storchaka in branch '3.2':
Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
http://hg.python.org/cpython/rev/d5b5116bf953
History
Date User Action Args
2013-05-12 10:32:40python-devsetmessages: + msg189000
2013-05-12 09:14:39georg.brandlsetstatus: open -> closed

messages: + msg188992
2013-05-01 12:46:55georg.brandlsetmessages: + msg188217
2013-04-30 19:55:49ned.deilysetmessages: + msg188182
2013-04-30 18:59:07serhiy.storchakasetmessages: + msg188175
2013-04-30 18:56:00serhiy.storchakasetpriority: normal -> release blocker
status: closed -> open

nosy: + larry, benjamin.peterson
versions: + Python 3.2
2013-04-29 18:28:01lemburgsetmessages: + msg188083
2013-04-29 18:22:04serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2013-04-29 17:04:54bharpersetnosy: + bharper
messages: + msg188076
2013-04-28 18:52:28ned.deilysetmessages: + msg188012
2013-04-28 11:17:56python-devsetmessages: + msg187974
2013-04-28 10:08:20serhiy.storchakasetmessages: + msg187972
2013-04-28 10:03:44serhiy.storchakasetassignee: serhiy.storchaka
2013-04-28 08:44:21lemburgsetmessages: + msg187971
2013-04-28 03:20:53ned.deilysetnosy: + georg.brandl
messages: + msg187951
2013-04-27 21:44:25lemburgsetmessages: + msg187940
2013-04-27 21:44:18ned.deilysetstage: patch review
messages: + msg187939
versions: + Python 3.3, Python 3.4
2013-04-27 20:27:14serhiy.storchakasetfiles: + sqlite_int64.patch
keywords: + patch
messages: + msg187931
2013-04-27 20:13:19lemburgsettitle: sqlite modules doesn't build on 2.7.4 with Mac OS X 10.4 -> sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4
2013-04-27 20:07:15serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg187930
2013-04-27 18:50:25lemburgsetnosy: + ned.deily, dmalcolm, python-dev, petri.lehtinen, Marc.Abramowitz, Joakim.Sernbrant
type: compile error
messages: + msg187924
2013-04-27 18:46:05lemburgcreate