Open Xtigyro opened 6 years ago
1) Downloaded the latest SQLite - ver. 3.21 (sqlite-autoconf-3210000.tar.gz). 2) Compiled and installed it.
[root@localhost sqlitebck]# sqlite3 -version 3.21.0 2017-10-24 18:55:49 1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de48827
3) Make sure to link its libraries in your session and also to make available its INCLUDE files ('.h' files) - then recompiled 'sqlitebck' ver. 1.3.
either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following:
It works now.
[root@localhost sqlitebck-1.3]# python Python 2.7.13 (default, Apr 12 2017, 06:56:55) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import sqlitebck
I believe we need to find a way of using version 1.3 with an older SQLite installed - that is to say, without the need of upgrading the SQLite on the machine.
Also - the above solution works only on RHEL/CentOS ver. 7 or above.
So it appears the problem is related to the other older instances of SQLite - I've created a new virtual machine with CentOS 6.9 and compiled and installed manually only SQLite 3.21. Then compiled 'sqlitebck' ver. 1.3 - it now works - but I'm wondering how I can fix this on the other machines I have where I cannot start from scratch.
What files/dependencies does 'sqlitebck' expect? Because even after compiling and installing SQLite 3.21 using the defaults on the other (old) machines - the error is still the same (even though I've added most of the paths of the new SQLite 3.21 in the LD_LIBRARY_PATH).
And is there a way to include statically the files of SQLite 3.21 so only 'sqlitebck' can see them as the default ones on the system?
For example, I've compiled 'pysqlite' ver. 2.8.3 with built-in files of SQLite 3.21 using:
python setup.py build_static
Is there a way to achieve the same thing with 'sqlitebck'?
sqlitebck
expects ABI compability with python's sqlite
module, because of included for simplicity files. It probably requires some decent version of SQLlite as well and that is expected to be provided by the system.
If the problem is that system provides old version of SQLite and you would like to use your own build, right now I can only suggest updating setup.py
file with extra instructions. From what I understand, you would like to use non standard (not provided by the system) version of SQLite.
I can try to help you with the changes and make sure they work for systems with updated version of sqlite, but I am not sure how can I assist you with solving your particular problem.
Hi Piotr - yes, it appears exactly this - after updating 'pysqlite' to ver. 2.8.3 (compiled with a static built-in of SQLite 3.21)... 'sqlitebck' stopped working. Trying to update it leads to the narrative/adventures above.
Generally - I use RHEL/CentOS 6.9 or 7.3 (most of the machines run on 6.9 'Santiago'). In order to upgrade SQLite to 3.21 in Python 2.7 (that comes with RedHat Software Compilations) - I did this - https://hadzhiev.com/2017/11/01/upgrade-sqlite-in-python/ (my blog).
I think that if we can do some changes to 'setup.py' - will be very nice. I would love to learn more complex Python stuff. You can find me on Skype (miroslav.hadzhiev) if you would like to discuss this in details using a chat.
Thank you and good night!
Miro
And line 38 is:
import sqlitebck
It does NOT even come to the point in my Python script where it actually tries to make an online backup of the DB - which is:
I've compiled it on a RHEL 6.9 - no errors:
The install process also is fine:
And I've used for several months ver. 1.2.1 - but now after upgrading to SQLite 3.21 - it says that it cannot find an SQLite database:
EDIT_1: Tried in interactive mode:
Using the latest 'pip' leads to the same result:
EDIT_2: So it appears the problem is related to the other older instances of SQLite - I've created a new virtual machine with CentOS 6.9 and compiled and installed manually only SQLite 3.21. Then compiled 'sqlitebck' ver. 1.3 - it now works - but I'm wondering how I can fix this on the other machines I have where I cannot start from scratch.
What files/dependencies does 'sqlitebck' expect? Because even after compiling and installing SQLite 3.21 using the defaults on the other (old) machines - the error is still the same (even though I've added most of the paths of the new SQLite 3.21 in the LD_LIBRARY_PATH).
And is there a way to include statically the files of SQLite 3.21 so only 'sqlitebck' can see them as the default ones on the system?
For example, I've compiled 'pysqlite' ver. 2.8.3 with built-in files of SQLite 3.21 using: python setup.py build_static
Is there a way to achieve the same thing with 'sqlitebck'?