I am running Xubuntu 12.04 64bit. I have no trouble compiling sqlite3 and wxSQLite3 without encryption.
I have read numerous forums on the correct way to compile sqlite3 using the AES128 codec from wxSQLite3. A few refer to success, but the instructions are dead links. I have listed below what I have gleaned so far, but without success.
- 1 Download sqlite3-3.7.9 and saved to directory sqlite3-3.7.9
2 Download wxSQLite3-3.0.3 and saved to directory wxsqlite3-3.0.3
3 Created a directory sqlite3-3.7.9/src/codec
4 Copied the contents of wxsqlite3-3.0.3/sqlite3/secure/src/* to sqlite3-3.7.9/src/codec
5 Added new objects to Makefile.in
Code: Select all
...
vdbetrace.lo wal.lo walker.lo where.lo utf.lo vtab.lo \
codec.lo codecext.lo rijndael.lo
...
SRC = \
$(TOP)/src/alter.c \
$(TOP)/src/codec/codec.cpp \
$(TOP)/src/codec/codecext.cpp \
$(TOP)/src/codec/rijndael.cpp \
$(TOP)/src/analyze.c \
...
alter.lo: $(TOP)/src/alter.c $(HDR)
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/alter.c
codec.lo: $(TOP)/src/codec/codec.cpp $(HDR)
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/codec/codec.cpp
codecext.lo: $(TOP)/src/codec/codecext.cpp $(HDR)
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/codec/codecext.cpp
rijndael.lo: $(TOP)/src/codec/rijndael.cpp $(HDR)
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/codec/rijndael.cpp
analyze.lo: $(TOP)/src/analyze.c $(HDR)
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/analyze.c
...
- 6 Compiled sqlite with special contants defined
Code: Select all
CFLAGS="-DSQLITE_HAS_CODEC -DCODEC_TYPE=CODEC_TYPE_AES128 -DSQLITE_CORE -DTHREADSAFE=1 -DSQLITE_SECURE_DELETE -DSQLITE_SOUNDEX -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --disable-shared --enable-static --disable-tcl --enable-threadsafe --enable-releasemode --disable-amalgamation && make
Code: Select all
In file included from ./src/codec/codec.c:40:0:
./src/codec/codec.h:65:3: error: unknown type name 'Btree'
./src/codec/codec.h:66:24: error: 'SQLITE_MAX_PAGE_SIZE' undeclared here (not in a function)
./src/codec/codec.h:87:34: error: unknown type name 'Btree'
./src/codec/codec.h:92:1: error: unknown type name 'Btree'
./src/codec/codec.c: In function 'CodecInit':
./src/codec/codec.c:497:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
./src/codec/codec.c: At top level:
./src/codec/codec.c:526:29: error: unknown type name 'Btree'
./src/codec/codec.c:549:1: error: unknown type name 'Btree'