When am trying to compile python3.7.1 on centos 5 got the error,
Failed to build these modules:
_sqlite3
On further checking on the compile log and found the below lines,
building '_sqlite3' extension
creating build/temp.linux-x86_64-3.7/usr/local/src/Python-3.7.1/Modules/_sqlite
/usr/bin/gcc44 -pthread -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -DMODULE_NAME="sqlite3" -IModules/_sqlite -I/usr/include -I./Include -I. -I/usr/local/include -I/usr/local/src/Python-3.7.1/Include -I/usr/local/src/Python-3.7.1 -c /usr/local/src/Python-3.7.1/Modules/_sqlite/cache.c -o build/temp.linux-x86_64-3.7/usr/local/src/Python-3.7.1/Modules/_sqlite/cache.o
/usr/bin/gcc44 -pthread -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -DMODULE_NAME="sqlite3" -IModules/_sqlite -I/usr/include -I./Include -I. -I/usr/local/include -I/usr/local/src/Python-3.7.1/Include -I/usr/local/src/Python-3.7.1 -c /usr/local/src/Python-3.7.1/Modules/_sqlite/connection.c -o build/temp.linux-x86_64-3.7/usr/local/src/Python-3.7.1/Modules/_sqlite/connection.o
/usr/local/src/Python-3.7.1/Modules/_sqlite/connection.c: In function ‘_pysqlite_connection_begin’:
/usr/local/src/Python-3.7.1/Modules/_sqlite/connection.c:387: error: implicit declaration of function ‘sqlite3_prepare_v2’
Am using /usr/bin/gcc44 along with sqlite-devel package is installed. I would like to know if any other faced such issue while compiling python from source and if any solution available for this compile issue.
The issue was sqlite version was very old. I had to compile the latest sqlite3 and then compile the python3.7 which went fine.