This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Problems compiling 2.7.0 (sqlcipher)

Tags: None
(comma "," separated)
User avatar
JesusM
Registered Member
Posts
212
Karma
0
OS

Problems compiling 2.7.0 (sqlcipher)

Sat Feb 04, 2017 11:20 am
Hi,

I had not used sqlcipher until now, but since it is not an option any more, I have installed it and try to compile Skrooge 2.7.0, but:

Code: Select all
root@liet:/home/Bajado/Instalables/skrooge-2.7.0/build# sqlcipher --version
3.11.0 2016-02-15 17:29:24 3d862f207e3adc00f78066799ac5a8c282430a5f
root@liet:/home/Bajado/Instalables/skrooge-2.7.0/build#

Code: Select all
root@liet:/home/Bajado/Instalables/skrooge-2.7.0/build# cmake .. -DCMAKE_INSTALL_PREFIX=`kf5-config --prefix` -DQT_PLUGIN_INSTALL_DIR=`kf5-config --qt-plugins` -DCMAKE_BUILD_TYPE=release -DSKG_CIPHER=OFF -DSKG_BUILD_TEST=OFF -DSKG_DESIGNER=OFF
-- ..:: CMAKE ROOT ::..
-- Checking for module 'sqlcipher'
--   No package 'sqlcipher' found
CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:363 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:528 (_pkg_check_modules_internal)
  CMakeLists.txt:82 (PKG_CHECK_MODULES)


-- Configuring incomplete, errors occurred!
See also "/home/Bajado/Instalables/skrooge-2.7.0/build/CMakeFiles/CMakeOutput.log".
root@liet:/home/Bajado/Instalables/skrooge-2.7.0/build#


Where may be the problem?

Thanks!
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Hi,

You have to install libsqlcipher-dev first.
Regards.


Skrooge, a personal finances manager powered by KDE
Image - PayPal
User avatar
JesusM
Registered Member
Posts
212
Karma
0
OS
uhmmm ... most likely i should know, but I don´t ... where can I get libsqlcipher-dev?

I have google it but only find Ubunto packages and not sources.

Thanks
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Did you try to install sqlcipher-devel ?


Skrooge, a personal finances manager powered by KDE
Image - PayPal
User avatar
JesusM
Registered Member
Posts
212
Karma
0
OS
Yes.

I have downloaded and installed sqlcipher:

Code: Select all
git clone https://github.com/sqlcipher/sqlcipher.git
cd sqlcipher/
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
 make
make install
sqlcipher --version
>3.11.0 2016-02-15 17:29:24 3d862f207e3adc00f78066799ac5a8c282430a5f


I still have problems to compile Skrooge 2.7.0, and you told me I need to install libsqlcipher-dev too.

Ok, but I don´t know where to get it. I´m trying to find it but I only found some Ubuntu packages.

So, I don´t know what to do next.

EDIT:

I have installed the RPM sqlcipher-devel-3.3.1-4.fc24.x86_64.rpm (converted using rpm2tgz) and it is compiling now ... lets see if it works after that.

EDIT 2:

No luck:
Code: Select all
/usr/bin/skrooge: error while loading shared libraries: libsqlcipher.so.0: cannot open shared object file: No such file or directory

Of course, the file exists:
Code: Select all
jesusm@liet:~$ locate libsqlcipher.so
/home/Bajado/Instalables/sqlcipher/.libs/libsqlcipher.so.0
/home/Bajado/Instalables/sqlcipher/.libs/libsqlcipher.so.0.8.6
/home/Bajado/Instalables/sqlcipher/.libs/libsqlcipher.so
/usr/local/lib/libsqlcipher.so.0.8.6
/usr/local/lib/libsqlcipher.so
/usr/local/lib/libsqlcipher.so.0


Thanks
User avatar
JesusM
Registered Member
Posts
212
Karma
0
OS
ok, step by step.

Now Skrooge runs (it was a problem with my library path), but I get some errors:

Image
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Could you check that libskgsqlcipher.so is well installed in sqldrivers directory?
On my system: /usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers


Skrooge, a personal finances manager powered by KDE
Image - PayPal
User avatar
JesusM
Registered Member
Posts
212
Karma
0
OS
Aparentely yes:

Code: Select all
/usr/lib64/qt/plugins/sqldrivers
/usr/lib64/qt/plugins/sqldrivers/libqsqlite3.so
/usr/lib64/qt/plugins/sqldrivers/libqsqlite.so
/usr/lib64/qt/plugins/sqldrivers/libqsqlodbc.so
/usr/lib64/qt/plugins/sqldrivers/libqsqlmysql.so
/usr/lib64/qt5/plugins/sqldrivers
/usr/lib64/qt5/plugins/sqldrivers/libqsqlite3.so
/usr/lib64/qt5/plugins/sqldrivers/libqsqlite.so
/usr/lib64/qt5/plugins/sqldrivers/libqsqlodbc.so
/usr/lib64/qt5/plugins/sqldrivers/libqsqlmysql.so
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Apparently no! ;)
I didn't see libskgsqlcipher.so in your list.


Skrooge, a personal finances manager powered by KDE
Image - PayPal
User avatar
JesusM
Registered Member
Posts
212
Karma
0
OS
ups, you are right :<

And I think I know what happened. It was my fault but maybe you could make a little correction to your Makefile.

I never used sqlcipher and I always prepared the makefile using this command:
Code: Select all
cmake .. -DCMAKE_INSTALL_PREFIX=`kf5-config --prefix` -DQT_PLUGIN_INSTALL_DIR=`kf5-config --qt-plugins` -DCMAKE_BUILD_TYPE=release -DSKG_CIPHER=OFF -DSKG_BUILD_TEST=OFF -DSKG_DESIGNER=OFF

But since using sqlcipher is not an option anymore and now is mandatory, I installed (with some problems) both sqlcipher and sqlcipher-devel but still used the same command to prepare the makefile, and I didn´t get any error:
Code: Select all
cmake .. -DCMAKE_INSTALL_PREFIX=`kf5-config --prefix` -DQT_PLUGIN_INSTALL_DIR=`kf5-config --qt-plugins` -DCMAKE_BUILD_TYPE=release -DSKG_CIPHER=OFF -DSKG_BUILD_TEST=OFF -DSKG_DESIGNER=OFF

But it seems that the libskgsqlcipher.so wasn't generated. Then I changed the command to:
Code: Select all
cmake .. -DCMAKE_INSTALL_PREFIX=`kf5-config --prefix` -DQT_PLUGIN_INSTALL_DIR=`kf5-config --qt-plugins` -DCMAKE_BUILD_TYPE=release -DSKG_CIPHER=ON -DSKG_BUILD_TEST=OFF -DSKG_DESIGNER=OFF

And voilà, everything works fine.

So, yes, it is my fault, but I would suggest you toe remove the parameter -DSKG_CIPHER=O[FF|N] since it is not an option anymore.

Anyway, thank you very much for your help and patience.
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Thank you, I did the correction.


Skrooge, a personal finances manager powered by KDE
Image - PayPal


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]