5

why i just failed to build sqlite?

does it have something to do with readline or _tkinter, or something else?

pes/libffi/src/prep_cif.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/closures.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/dlmalloc.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/x86/ffi.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/x86/sysv.o -L/usr/local/lib -o build/lib.linux-i686-2.7/_ctypes.so

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _tkinter           bsddb185        
bz2                dbm                gdbm            
readline           sunaudiodev                        
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

Failed to build these modules:

_sqlite3

running build_scripts
creating build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Tools/scripts/pydoc -> build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Tools/scripts/idle -> build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Tools/scripts/2to3 -> build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Lib/smtpd.py -> build/scripts-2.7
changing mode of build/scripts-2.7/pydoc from 664 to 775
changing mode of build/scripts-2.7/idle from 664 to 775
changing mode of build/scripts-2.7/2to3 from 664 to 775
changing mode of build/scripts-2.7/smtpd.py from 664 to 775
/usr/bin/install -c -m 644 ./Tools/gdb/libpython.py python-gdb.py

more details:

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _tkinter           bsddb185
bz2                dbm                gdbm
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name
Failed to build these modules:
_sqlite3 

my system is centos 5.3

hugemeow
  • 7,777
  • 13
  • 50
  • 63

1 Answers1

10

There is a patch that can be found (and is discussed) at the following address: http://bugs.python.org/issue14572

I had the exact same problem as the original poster, and the patch resolved it.

To apply the patch, from terminal in your python 2.7.3 directory:

curl -sk https://gist.github.com/msabramo/2727063/raw/59ea097a1f4c6f114c32f7743308a061698b17fd/gistfile1.diff | patch -p1
Kijewski
  • 25,517
  • 12
  • 101
  • 143
pendulotum
  • 101
  • 4
  • 1
    It's 2016 and I still have to apply this patch. – JohnMudd May 26 '16 at 20:46
  • It's 2018 and the patch doesn't seem to help with Python 2.7.14. I now use export _PYTHON_HOST_PLATFORM=1 before running ./configure. This causes setup.py to think it’s a cross platform build and avoid actually importing the modules into python and avoids final test of modules. – JohnMudd Apr 13 '18 at 18:50