Python 3.6 on Centos 6

thinkwell thinkwelldesigns at gmail.com
Fri Dec 23 17:25:16 EST 2016


I'm trying to build Python 3.6 on Centos 6, and am successful in doing so, except for the sqlite3 library. I started with a brand new install of Centos 6 and installed devtoolset-2 to build with a newer compiler. But whether with default compiler or 4.82, I get the following errors when building the sqlite3 module. sqlite & sqlite-devel are installed.

[code]
building '_sqlite3' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="sqlite3" -IModules/_sqlite -I/usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Include -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/cache.c -o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/cache.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="sqlite3" -IModules/_sqlite -I/usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Include -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/connection.c -o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/connection.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="sqlite3" -IModules/_sqlite -I/usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Include -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/cursor.c -o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/cursor.o
/tmp/Python-3.6.0/Modules/_sqlite/cursor.c: In function ‘_pysqlite_query_execute’:
/tmp/Python-3.6.0/Modules/_sqlite/cursor.c:517:5: warning: implicit declaration of function ‘sqlite3_stmt_readonly’ [-Wimplicit-function-declaration]
     if (self->connection->begin_statement && !sqlite3_stmt_readonly(self->statement->st) && !self->statement->is_ddl) {
     ^
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="sqlite3" -IModules/_sqlite -I/usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Include -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/microprotocols.c -o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/microprotocols.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="sqlite3" -IModules/_sqlite -I/usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Include -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/module.c -o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/module.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="sqlite3" -IModules/_sqlite -I/usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Include -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/prepare_protocol.c -o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/prepare_protocol.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="sqlite3" -IModules/_sqlite -I/usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Include -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/row.c -o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/row.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="sqlite3" -IModules/_sqlite -I/usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Include -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/statement.c -o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/statement.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="sqlite3" -IModules/_sqlite -I/usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Include -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/util.c -o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/util.o
gcc -pthread -shared -Wl,--rpath=/usr/lib build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/cache.o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/connection.o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/cursor.o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/microprotocols.o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/module.o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/prepare_protocol.o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/row.o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/statement.o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modules/_sqlite/util.o -L. -L/usr/local/lib -lsqlite3 -lpython3.6m -o build/lib.linux-x86_64-3.6/_sqlite3.cpython-36m-x86_64-linux-gnu.so
warning: building with the bundled copy of libffi is deprecated on this platform.  It will not be distributed with Python 3.7
*** WARNING: renaming "_sqlite3" since importing it failed: build/lib.linux-x86_64-3.6/_sqlite3.cpython-36m-x86_64-linux-gnu.so: undefined symbol: sqlite3_stmt_readonly
[/code]

Any help for me in getting python 3.6 built on Centos 6?


More information about the Python-list mailing list