qt5-sqlcipher icon indicating copy to clipboard operation
qt5-sqlcipher copied to clipboard

qsqlcipher uses sqlite instead of sqlcipher

Open tux-mind opened this issue 10 years ago • 1 comments

first of all: thanks for aswering me on the PR and spending your time for this software :blush:

I followed your instruction and made the following steps:

  • apt-get install libsqlcipher
  • git clone https://.../qt5-sqlcipher
  • cd qt5-sqlcipher
  • wget "http://code.qt.io/cgit/qt/qtbase.git/plain/src/sql/drivers/sqlite/qsql_sqlite_p.h?h=v5.2.1" -O qt-private/qsql_sqlite_p.h
  • wget "http://code.qt.io/cgit/qt/qtbase.git/plain/src/sql/drivers/sqlite/qsql_sqlite.cpp?h=v5.2.1" -O qt-private/qsql_sqlite.cpp
  • mkdir build; cd build
  • cmake ..
  • make

tests will fail.

whe I run ldd against libqsqlcipher.so i see that it has been linked with sqlite, not sqlcipher.

compiling it in verbose mode I saw that the linker it's executed with -lsqlite. running again the linker with -lsqlcipher will solve the problem and make tests to pass.

I hope that this will help you :blush:

CMake output:

-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- checking for module 'sqlcipher'
--   found sqlcipher, version 2.2.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nino/Documenti/qt5-sqlcipher/build

tux-mind avatar Jan 18 '16 18:01 tux-mind

This is caused by a broken pkg-config file for libsqlcipher-dev in Ubuntu 14.04. If you run pkg-config --cflags --libs sqlcipher you'll see that the library name is wrong. You could try reporting this to the package maintainer or you could build the latest sqlcipher from https://github.com/sqlcipher/sqlcipher.

sijk avatar Jan 19 '16 06:01 sijk