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.

Title: crashes if sqlite version contains 'beta'
Type: compile error Stage: resolved
Components: Build Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Andreas.Pelme, BreamoreBoy, blahblahwhat, eric.araujo, ghaering, petri.lehtinen, python-dev, tarek
Priority: low Keywords: easy, patch

Created on 2009-01-22 16:23 by blahblahwhat, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
issue5033.patch Andreas.Pelme, 2013-02-23 14:53 review
Messages (6)
msg80370 - (view) Author: blahblahwhat (blahblahwhat) Date: 2009-01-22 16:23
When I try to 'make' Python 2.6.1:

Traceback (most recent call last):
  File "./", line 1880, in <module>
  File "./", line 1875, in main
  File "/home/apps/Python-2.6.1/Lib/distutils/", line 152, in 
  File "/home/apps/Python-2.6.1/Lib/distutils/", line 975, in 
  File "/home/apps/Python-2.6.1/Lib/distutils/", line 995, in 
  File "/home/apps/Python-2.6.1/Lib/distutils/command/", line 
134, in run
  File "/home/apps/Python-2.6.1/Lib/distutils/", line 333, in 
  File "/home/apps/Python-2.6.1/Lib/distutils/", line 995, in 
  File "/home/apps/Python-2.6.1/Lib/distutils/command/", 
line 343, in run
  File "./", line 103, in build_extensions
    missing = self.detect_modules()
  File "./", line 915, in detect_modules
    for x in sqlite_version.split(".")])
ValueError: invalid literal for int() with base 10: '1beta'

This was solved by replacing

  m ='\s*.*#\s*.*define\s.*SQLITE_VERSION\W*"(.*)"', incf)


  m ='\s*.*#\s*.*define\s.*SQLITE_VERSION\W*"([\d\.]*)"', 

on line 911
msg116570 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-09-16 16:17
A one line fix is given in msg80370, can this be applied,should the issue be closed or what?
msg121413 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-11-18 02:02
The regex is still the same.  I’ll try changing the version string in sqlite and trigger the bug.
msg182748 - (view) Author: Andreas Pelme (Andreas.Pelme) * Date: 2013-02-23 14:53
This bug still exists in 2.7 and 3.4.

If SQLITE_VERSION in sqlite3.h (/usr/include/sqlite3.h on Mac OS) ends with beta, such as
#define SQLITE_VERSION        "3.7.12beta"

make will fail.

The regex changed suggested above fixes this. The attached patch contains that fix and makes the build work.
msg182756 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-02-23 16:28
New changeset 8b177aea9ddd by Petri Lehtinen in branch '2.7':
Issue #5033: Fix building of the sqlite3 extension module

New changeset 73d5dd480558 by Petri Lehtinen in branch '3.2':
Issue #5033: Fix building of the sqlite3 extension module

New changeset c613eb716c8e by Petri Lehtinen in branch '3.3':
Issue #5033: Fix building of the sqlite3 extension module

New changeset 19b3aaf79e45 by Petri Lehtinen in branch 'default':
Issue #5033: Fix building of the sqlite3 extension module
msg182757 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2013-02-23 16:29
Applied, thanks!
Date User Action Args
2022-04-11 14:56:44adminsetgithub: 49283
2013-02-23 16:29:20petri.lehtinensetstatus: open -> closed

nosy: + petri.lehtinen
messages: + msg182757

resolution: fixed
stage: patch review -> resolved
2013-02-23 16:28:34python-devsetnosy: + python-dev
messages: + msg182756
2013-02-23 14:53:29Andreas.Pelmesetfiles: + issue5033.patch

nosy: + Andreas.Pelme
messages: + msg182748

keywords: + patch
2013-02-23 12:59:56pitrousetstage: needs patch -> patch review
2013-02-23 06:53:08ezio.melottisetkeywords: + easy
stage: needs patch
versions: + Python 3.3, Python 3.4, - Python 3.1
2010-11-18 02:02:28eric.araujosetnosy: + tarek, eric.araujo
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
messages: + msg121413

assignee: ghaering ->
2010-09-16 16:17:19BreamoreBoysetnosy: + BreamoreBoy
messages: + msg116570
2009-03-20 11:20:27ghaeringsetpriority: low
assignee: ghaering

nosy: + ghaering
2009-01-22 16:23:25blahblahwhatcreate