Okay,
I kinda asked this question already, but noticed that i might have not been as clear as i could have been, and might have made some errors myself.
I have also noticed many people having the same or similar problems with sqlite3 in python. So i thought i would ask this as clearly as i could, so it could possibly help others with the same issues aswell.
What does python need to find when compiling, so the module is enabled and working?
(In detail, i mean exact files, not just “sqlite dev-files”)?
And if it needs a library, it propably needs to be compiled with the right architecture?
The source code of cpython’s sqlite module calls various sqlite3 functions and uses sqlite3 structures (similar to class definitions in Python).
Upon compiling the source code (to the
pythonbinary), the C compiler needs the definitions of those functions (for example so that it can abort if the parameter count doesn’t match). For that reason, Python’s sqlite module includes the sqlite3 header filesqlite3.hthat contain information about the parameters of thesqlite3_*functions (but not their implementations). (More information about header files on Wikipedia)Also, when linking the python binary, the linker needs to get information about the actual binary representation of the used sqlite3 methods and other objects. This information is in the files that reside in
/usr/liband end in.so,.la, or.a. They must be compiled for the target architecture (i.e. the architecture of the binary you’re trying to create) – most of the time, that’s the architecture of the current system.