new wxSQLite3 version settings

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 304
Joined: Wed Jan 20, 2010 1:15 pm

new wxSQLite3 version settings

Post by dkaip »

Hello.
I am using old wxSQLite3 library.
The files with sqlcipher was ...
<Unit filename="../include/wx/wxsqlite3.h" />
<Unit filename="../include/wx/wxsqlite3_version.h" />
<Unit filename="../include/wx/wxsqlite3def.h" />
<Unit filename="../include/wx/wxsqlite3dyn.h" />
<Unit filename="../include/wx/wxsqlite3opt.h" />
<Unit filename="minimal.cpp" />
<Unit filename="../sqlite3secure/src/sqlite3secure.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="../sqlite3secure/src/sqlite3secure.h" />
<Unit filename="../src/wxsqlite3.cpp" />
and as options ...
<Add option="-DTHREADSAFE=1" />
<Add option="-DSQLITE_MAX_ATTACHED=10" />
<Add option="-DSQLITE_SOUNDEX" />
<Add option="-DSQLITE_ENABLE_COLUMN_METADATA" />
<Add option="-DSQLITE_HAS_CODEC=1" />
<Add option="-DCODEC_TYPE=CODEC_TYPE_CHACHA20" />
<Add option="-DSQLITE_SECURE_DELETE" />
<Add option="-DSQLITE_ENABLE_FTS3" />
<Add option="-DSQLITE_ENABLE_FTS3_PARENTHESIS" />
<Add option="-DSQLITE_ENABLE_FTS4" />
<Add option="-DSQLITE_ENABLE_FTS5" />
<Add option="-DSQLITE_ENABLE_JSON1" />
<Add option="-DSQLITE_ENABLE_RTREE" />
<Add option="-DSQLITE_CORE" />
<Add option="-DSQLITE_ENABLE_EXTFUNC" />
<Add option="-DSQLITE_ENABLE_CSV" />
<Add option="-DSQLITE_ENABLE_SHA3" />
<Add option="-DSQLITE_ENABLE_CARRAY" />
<Add option="-DSQLITE_ENABLE_FILEIO" />
<Add option="-DSQLITE_ENABLE_SERIES" />
<Add option="-DSQLITE_TEMP_STORE=2" />
<Add option="-DSQLITE_USE_URI" />
<Add option="-DSQLITE_USER_AUTHENTICATION" />
<Add option="-DwxUSE_DYNAMIC_SQLITE3_LOAD=0" />
<Add option="-DWXSQLITE3_HAVE_METADATA=1" />
<Add option="-DWXSQLITE3_USER_AUTHENTICATION=1" />
<Add option="-DWXSQLITE3_HAVE_CODEC=1" />
<Add option="-DWXSQLITE3_HAVE_LOAD_EXTENSION=0" />
Question is, with new sqlcipher codes, is the same source files and dependencies?

Thank you
Jim.
utelle
Moderator
Moderator
Posts: 1080
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: new wxSQLite3 version settings

Post by utelle »

dkaip wrote: Thu Jun 02, 2022 12:27 pm I am using old wxSQLite3 library.
[...]
Question is, with new sqlcipher codes, is the same source files and dependencies?
The project wxSQLite3 is now based on the new implementation of the encryption extension, SQLite3 Multiple Ciphers. However, the new implementation is included as an amalgamated source file. Therefore the files that have to be compiled have slightly changed:

The files are now ...
<Unit filename="../include/wx/wxsqlite3.h" />
<Unit filename="../include/wx/wxsqlite3_version.h" />
<Unit filename="../include/wx/wxsqlite3def.h" />
<Unit filename="../include/wx/wxsqlite3opt.h" />
<Unit filename="../src/sqlite3mc_config.h" />
<Unit filename="../src/sqlite3mc_amalgamation.h" />
<Unit filename="minimal.cpp" />
<Option compilerVar="CC" />
</Unit>
<Unit filename="../src/sqlite3mc_amalgamation.c" />
<Unit filename="../src/wxsqlite3.cpp" />
and the options ...
<Add option="-DCODEC_TYPE=CODEC_TYPE_CHACHA20" />
<Add option="-DTHREADSAFE=1" />
<Add option="-DSQLITE_DQS=0" />
<Add option="-DSQLITE_MAX_ATTACHED=10" />
<Add option="-DSQLITE_SOUNDEX=1" />
<Add option="-DSQLITE_ENABLE_COLUMN_METADATA=1" />
<Add option="-DSQLITE_SECURE_DELETE=1" />
<Add option="-DSQLITE_ENABLE_DESERIALIZE=1" />
<Add option="-DSQLITE_ENABLE_FTS3=1" />
<Add option="-DSQLITE_ENABLE_FTS3_PARENTHESIS=1" />
<Add option="-DSQLITE_ENABLE_FTS4=1" />
<Add option="-DSQLITE_ENABLE_FTS5=1" />
<Add option="-DSQLITE_ENABLE_RTREE=1" />
<Add option="-DSQLITE_ENABLE_GEOPOLY=1" />
<Add option="-DSQLITE_CORE=1" />
<Add option="-DSQLITE_ENABLE_EXTFUNC=1" />
<Add option="-DSQLITE_ENABLE_MATH_FUNCTIONS=1" />
<Add option="-DSQLITE_ENABLE_CSV=1" />
<Add option="-DSQLITE_ENABLE_VSV=1" />
<Add option="-DSQLITE_ENABLE_SHA3=1" />
<Add option="-DSQLITE_ENABLE_CARRAY=1" />
<Add option="-DSQLITE_ENABLE_FILEIO=1" />
<Add option="-DSQLITE_ENABLE_SERIES=1" />
<Add option="-DSQLITE_ENABLE_UUID=1" />
<Add option="-DSQLITE_ENABLE_REGEXP=1" />
<Add option="-DSQLITE_TEMP_STORE=2" />
<Add option="-DSQLITE_USE_URI=1" />
<Add option="-DSQLITE_USER_AUTHENTICATION=1" />
You may want to adjust the options to your liking.
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 304
Joined: Wed Jan 20, 2010 1:15 pm

Re: new wxSQLite3 version settings

Post by dkaip »

But i don't see encryption files like sqlite3secure.c and sqlite3secure.h

Thank you
Jim.
utelle
Moderator
Moderator
Posts: 1080
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: new wxSQLite3 version settings

Post by utelle »

dkaip wrote: Fri Jun 03, 2022 7:49 pm But i don't see encryption files like sqlite3secure.c and sqlite3secure.h
As already said in my previous post the SQLite encryption extension is now managed in a separate project, SQLite3 Multiple Ciphers. wxSQLite3 uses the amalgamated sources of that project, which you find in the file sqlite3mc_amalgamation.c in the folder src.
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 304
Joined: Wed Jan 20, 2010 1:15 pm

Re: new wxSQLite3 version settings

Post by dkaip »

Ok, as i see the
<Unit filename="../include/wx/wxsqlite3dyn.h" />
<Unit filename="../sqlite3secure/src/sqlite3secure.c">
<Unit filename="../sqlite3secure/src/sqlite3secure.h" />
was removed and instead we have ...
<Unit filename="../src/sqlite3mc_config.h" />
<Unit filename="../src/sqlite3mc_amalgamation.h" />
<Unit filename="../src/sqlite3mc_amalgamation.c" />
Thank you
Jim.
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 304
Joined: Wed Jan 20, 2010 1:15 pm

Re: new wxSQLite3 version settings

Post by dkaip »

Hello again, i am taking an error.
Linux Mint 20.3, GCC compiller.
In file sqlite3mc_amalgamation.c, in function aesGenKeyDecrypt, inlining failed to call always inline _mm_aesimc_si128 in line 256213
/usr/lib/gcc/x86_64-linux-gnu/9/include/wmmintrin.h line 77
Thank you
Jim.
utelle
Moderator
Moderator
Posts: 1080
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: new wxSQLite3 version settings

Post by utelle »

dkaip wrote: Sun Jun 05, 2022 9:12 pm Hello again, i am taking an error.
Linux Mint 20.3, GCC compiller.
In file sqlite3mc_amalgamation.c, in function aesGenKeyDecrypt, inlining failed to call always inline _mm_aesimc_si128 in line 256213
/usr/lib/gcc/x86_64-linux-gnu/9/include/wmmintrin.h line 77
You need to add the compiler options -msse4.2 -maes, because AES hardware support was added in December 2020 to speed up AES encryption.
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 304
Joined: Wed Jan 20, 2010 1:15 pm

Re: new wxSQLite3 version settings

Post by dkaip »

I just try it.
It works fine.
Thank you
Jim.
Post Reply