[英]why am i getting errors while installing pysqlite2.5.3
Am trying build pysqlite 2.5.3 package on SLSE 9, and am getting all sorts of compilation errors ie我正在尝试在 SLSE 9 上构建 pysqlite 2.5.3 package,并且遇到各种编译错误,即
...
src/module.c:290: error: initializer element is not constant
src/module.c:290: error: (near initialization for `_int_constants[27].constant_value')
src/module.c:290: error: initializer element is not constant
src/module.c:290: error: (near initialization for `_int_constants[27]')
src/module.c:291: error: `SQLITE_ATTACH' undeclared here (not in a function)
src/module.c:291: error: initializer element is not constant
src/module.c:291: error: (near initialization for `_int_constants[28].constant_value')
src/module.c:291: error: initializer element is not constant
src/module.c:291: error: (near initialization for `_int_constants[28]')
src/module.c:292: error: `SQLITE_DETACH' undeclared here (not in a function)
src/module.c:292: error: initializer element is not constant
src/module.c:292: error: (near initialization for `_int_constants[29].constant_value')
src/module.c:292: error: initializer element is not constant
src/module.c:292: error: (near initialization for `_int_constants[29]')
src/module.c:300: error: initializer element is not constant
src/module.c:300: error: (near initialization for `_int_constants[30]')
src/module.c: In function `init_sqlite':
src/module.c:419: warning: implicit declaration of function `sqlite3_libversion'
src/module.c:419: warning: passing arg 1 of `PyString_FromString' makes pointer from integer without a cast
error: command 'gcc' failed with exit status 1
the things fails事情失败了
this is my setup.cfg file:这是我的 setup.cfg 文件:
[build_ext]
#define=
#include_dirs=/usr/local/include
#library_dirs=/usr/local/lib
libraries=sqlite3
define=
SQLlite is running... when i do sqlite3, i get the command interface. SQLlite 正在运行...当我执行 sqlite3 时,我得到了命令界面。
What am i missing out?我错过了什么?
Gath加思
Do you have the sqlite development headers installed?您是否安装了 sqlite 开发接头?
error: SQLITE_DETACH' undeclared here错误:此处未声明 SQLITE_DETACH'
Looks like you need sqlite3-dev (or whatever your distro named it, perhaps sqlite3-devel?)看起来你需要 sqlite3-dev (或者你的发行版命名它,也许是 sqlite3-devel?)
Edit:编辑:
After a good natured soul cleaned up your error trace a bit more, I'm quite sure you are missing the sqlite3 development headers.在一个善良的灵魂清理了你的错误跟踪之后,我很确定你错过了 sqlite3 开发头文件。 You have the library, just not the headers:你有图书馆,只是没有标题:
src/module.c:419: warning: implicit declaration of function `sqlite3_libversion' src/module.c:419:警告:隐式声明 function `sqlite3_libversion'
If there is no header, there is no prototype.如果没有 header,就没有原型。 If there is no prototype, you'll see a warning complaining about an implicit declaration (if the compiler is set to issue sensible warnings).如果没有原型,你会看到一个抱怨隐式声明的警告(如果编译器设置为发出合理的警告)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.