f



Python 3.6 on Centos 6

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 Cento=
s 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 -Wal=
l -Wstrict-prototypes -fPIC -DMODULE_NAME=3D"sqlite3" -IModules/_sqlite -I/=
usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Includ=
e -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 -Wal=
l -Wstrict-prototypes -fPIC -DMODULE_NAME=3D"sqlite3" -IModules/_sqlite -I/=
usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Includ=
e -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 -Wal=
l -Wstrict-prototypes -fPIC -DMODULE_NAME=3D"sqlite3" -IModules/_sqlite -I/=
usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Includ=
e -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/cursor.c -o buil=
d/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 =E2=80=98_pysqlite_=
query_execute=E2=80=99:
/tmp/Python-3.6.0/Modules/_sqlite/cursor.c:517:5: warning: implicit declara=
tion of function =E2=80=98sqlite3_stmt_readonly=E2=80=99 [-Wimplicit-functi=
on-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 -Wal=
l -Wstrict-prototypes -fPIC -DMODULE_NAME=3D"sqlite3" -IModules/_sqlite -I/=
usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Includ=
e -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/microproto=
cols.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wal=
l -Wstrict-prototypes -fPIC -DMODULE_NAME=3D"sqlite3" -IModules/_sqlite -I/=
usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Includ=
e -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/module.c -o buil=
d/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 -Wal=
l -Wstrict-prototypes -fPIC -DMODULE_NAME=3D"sqlite3" -IModules/_sqlite -I/=
usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Includ=
e -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 -Wal=
l -Wstrict-prototypes -fPIC -DMODULE_NAME=3D"sqlite3" -IModules/_sqlite -I/=
usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Includ=
e -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/row.c -o build/t=
emp.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 -Wal=
l -Wstrict-prototypes -fPIC -DMODULE_NAME=3D"sqlite3" -IModules/_sqlite -I/=
usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Includ=
e -I/tmp/Python-3.6.0 -c /tmp/Python-3.6.0/Modules/_sqlite/statement.c -o b=
uild/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 -Wal=
l -Wstrict-prototypes -fPIC -DMODULE_NAME=3D"sqlite3" -IModules/_sqlite -I/=
usr/include -I./Include -I. -I/usr/local/include -I/tmp/Python-3.6.0/Includ=
e -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=3D/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/Pytho=
n-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/Mod=
ules/_sqlite/statement.o build/temp.linux-x86_64-3.6/tmp/Python-3.6.0/Modul=
es/_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 pla=
tform.  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: sql=
ite3_stmt_readonly
[/code]

Any help for me in getting python 3.6 built on Centos 6?
0
thinkwell
12/23/2016 10:25:16 PM
comp.lang.python 77058 articles. 5 followers. Post Follow

2 Replies
381 Views

Similar Articles

[PageSpeed] 4

thinkwell <thinkwelldesigns@gmail.com> writes:

> 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=3D"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=3D"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=3D"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 =E2=80=98_pysqlit=
e_query_execute=E2=80=99:
> /tmp/Python-3.6.0/Modules/_sqlite/cursor.c:517:5: warning: implicit decla=
ration of function =E2=80=98sqlite3_stmt_readonly=E2=80=99 [-Wimplicit-func=
tion-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=3D"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/microprotoco=
ls.o
> gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3
> -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=3D"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=3D"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_prot=
ocol.o
> gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3
> -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=3D"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=3D"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=3D"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=3D/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/microprotoco=
ls.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_prot=
ocol.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 p=
latform.  It will not be distributed with Python 3.7
> *** WARNING: renaming "_sqlite3" since importing it failed: build/lib.lin=
ux-x86_64-3.6/_sqlite3.cpython-36m-x86_64-linux-gnu.so: undefined symbol: s=
qlite3_stmt_readonly
> [/code]
>
> Any help for me in getting python 3.6 built on Centos 6?

What version of the sqlite3 libraries do you have?  See
https://github.com/ghaering/pysqlite/issues/85 for example.

--
regards,
kushal
0
Kushal
12/24/2016 12:29:29 PM
> What version of the sqlite3 libraries do you have?  See
> https://github.com/ghaering/pysqlite/issues/85 for example.
> 
> --
> regards,
> kushal

I was using the system default for Centos 6 which is 3.6.20. I loaded a parallel version and now got 3.6 to build. Thanks!
0
thinkwell
12/24/2016 7:47:22 PM
Reply: