Results 1 to 7 of 7

Thread: Building QSQLITE driver with AES-256

  1. #1
    Join Date
    Mar 2010
    Posts
    29
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Building QSQLITE driver with AES-256

    Hi, I'm trying to build QSQLITE driver with AES-256 encryption support
    (Qt 4.7, Ubuntu 10.10, sqlcipher v.1.1.8 / v.1.1.7).
    I followed instructions by Lykurg step by step, but in "Building SQLCipher" when I execute make, the result is a long list of sqlite3.c:#:errors I reported in output.log.
    I double checked each previous step. Any idea what went wrong?
    Thank you.
    Attached Files Attached Files
    Last edited by guiQt; 17th October 2010 at 23:48.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,688
    Thanks
    13
    Thanked 1,598 Times in 1,526 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Building QSQLITE driver with AES-256

    It looks like the build instructions for SQLCipher have changed slightly. Try either:
    Qt Code:
    1. # Static link to OpenSSL
    2. ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="/path/to/libcrypto.a"
    3. make
    4. OR
    5. # Dynamic link to OpenSSL
    6. ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
    7. make
    To copy to clipboard, switch view to plain text mode 
    You might need to add the --prefix path also. Both from http://sqlcipher.net/documentation

  3. The following user says thank you to ChrisW67 for this useful post:

    guiQt (18th October 2010)

  4. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Building QSQLITE driver with AES-256

    I'll have a look on that later on this day. Do you compile static, because I only have tested dynamic linking...

  5. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,688
    Thanks
    13
    Thanked 1,598 Times in 1,526 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Building QSQLITE driver with AES-256

    Those two options are from the SQLCipher site for linking the OpenSSL library only. I wouldn't think this has any effect on the dynamic/static state of Qt itself. I am likely to use dynamic linking exclusively when I get around to using this in anger.

  6. #5
    Join Date
    Mar 2010
    Posts
    29
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Building QSQLITE driver with AES-256

    Dynamic linking worked for me!
    Thanks.

  7. #6
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Building QSQLITE driver with AES-256

    Hm, the mentioned flags are set in the wiki description. Only I didn't use --enable-tempstore=yes, but I doubt this affect the building of sqlite. As a closer look on the posted error log, it seems that also SQLITE_HAS_CODEC wasn't set. Are you sure you have altered the pro file? But anyway I try it on my sandbox...

  8. #7
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,688
    Thanks
    13
    Thanked 1,598 Times in 1,526 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Building QSQLITE driver with AES-256

    The SQLITE_HAS_CODEC define is present in the PRO file in the wiki but that is used for compiling the Qt half of the driver which is linked to the already built SQLCipher library. The problem here is building the SQLCipher library, which is not Qt related.

    The options are not present in the section titled Building SQLCipher. On my Gentoo machine it would not compile and link without:
    Qt Code:
    1. ./configure --prefix=/usr/local CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QSQlite driver
    By praveen_g in forum Newbie
    Replies: 6
    Last Post: 18th November 2009, 09:58
  2. QSQLITE driver is driving me nuts!
    By topquarck in forum Qt Programming
    Replies: 3
    Last Post: 30th May 2009, 10:29
  3. QSQLITE driver issue
    By b1 in forum Qt Programming
    Replies: 6
    Last Post: 17th May 2009, 10:18
  4. Replies: 1
    Last Post: 7th July 2008, 21:13
  5. Building new SQL driver
    By Pragya in forum Installation and Deployment
    Replies: 1
    Last Post: 27th June 2007, 09:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.