Problem compiling SQLcipher!


#1

Hi,
i am trying to compile SQLCipher in Ubuntu, but i got this errore when i run the make command:

./.libs/libsqlcipher.so: undefined reference to `OPENSSL_init_crypto'
./.libs/libsqlcipher.so: undefined reference to `HMAC_CTX_new'
./.libs/libsqlcipher.so: undefined reference to `HMAC_CTX_free'
collect2: error: ld returned 1 exit status
Makefile:611: set di istruzioni per l'obiettivo "sqlcipher" non riuscito
make: *** [sqlcipher] Errore 1

I tried to instal openssl-dev but it still not work…

Then i tried with this:

./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="/usr/lib/x86_64-linux-gnu/libcrypto.a"

But i got this other error when i run the make command:

*** Warning: Linking the shared library libsqlcipher.la against the
*** static library /usr/lib/x86_64-linux-gnu/libcrypto.a is not portable!
libtool: link: gcc -shared  -fPIC -DPIC  .libs/sqlite3.o   /usr/lib/x86_64-linux-gnu/libcrypto.a -ldl -lcrypto -lpthread    -Wl,-soname -Wl,libsqlcipher.so.0 -o .libs/libsqlcipher.so.0.8.6
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libcrypto.a(obj_dat.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib/x86_64-linux-gnu/libcrypto.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:600: set di istruzioni per l'obiettivo "libsqlcipher.la" non riuscito
make: *** [libsqlcipher.la] Errore 1

How can i solve this?
Thanks


#2

Hi @ducarpit

What version of OpenSSL libraries do you have installed on your Ubuntu machine?


#4
openssl:
  Installato: 1.0.2g-1ubuntu4.8
  Candidato:  1.0.2g-1ubuntu4.8
  Tabella versione:
 *** 1.0.2g-1ubuntu4.8 500
        500 http://it.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.0.2g-1ubuntu4.6 500
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     1.0.2g-1ubuntu4 500
        500 http://it.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

#5

Hi @ducarpit,

It looks like it is attempting to build with both a shared library, and a static library. Would you mind making a small adjustment to your configure step:

./configure --with-crypto-lib=none \
                --disable-tcl \
                --disable-shared \ 
                --enable-static=yes \ 
                --enable-tempstore=yes \
                CFLAGS="-DSQLITE_HAS_CODEC \
                        -DSQLCIPHER_CRYPTO_OPENSSL" \
                LDFLAGS="/usr/lib/x86_64-linux-gnu/libcrypto.a"

Then run the following:

make clean
make

If that doesn’t address the relocation warning, you may need to build OpenSSL from source using the -fPIC flag.


#6

Hi, with the command you suggest i have new errors:

    ./.libs/libsqlcipher.a(sqlite3.o): In function `HMAC_CTX_new':
    sqlite3.c:(.text+0x49ee): undefined reference to `CRYPTO_malloc'
    sqlite3.c:(.text+0x4a05): undefined reference to `HMAC_CTX_init'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `HMAC_CTX_free':
    sqlite3.c:(.text+0x4a2a): undefined reference to `HMAC_CTX_cleanup'
    sqlite3.c:(.text+0x4a36): undefined reference to `CRYPTO_free'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_add_random':
    sqlite3.c:(.text+0x4a70): undefined reference to `RAND_add'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_activate':
    sqlite3.c:(.text+0x4aba): undefined reference to `EVP_get_cipherbyname'
    sqlite3.c:(.text+0x4ae2): undefined reference to `OPENSSL_add_all_algorithms_noconf'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_deactivate':
    sqlite3.c:(.text+0x4b6d): undefined reference to `EVP_cleanup'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_random':
    sqlite3.c:(.text+0x4c08): undefined reference to `RAND_bytes'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_hmac':
    sqlite3.c:(.text+0x4c78): undefined reference to `EVP_sha1'
    sqlite3.c:(.text+0x4c94): undefined reference to `HMAC_Init_ex'
    sqlite3.c:(.text+0x4cad): undefined reference to `HMAC_Update'
    sqlite3.c:(.text+0x4cc6): undefined reference to `HMAC_Update'
    sqlite3.c:(.text+0x4cdd): undefined reference to `HMAC_Final'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_kdf':
    sqlite3.c:(.text+0x4d4a): undefined reference to `PKCS5_PBKDF2_HMAC_SHA1'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_cipher':
    sqlite3.c:(.text+0x4d8f): undefined reference to `EVP_CIPHER_CTX_new'
    sqlite3.c:(.text+0x4dcd): undefined reference to `EVP_CipherInit_ex'
    sqlite3.c:(.text+0x4dde): undefined reference to `EVP_CIPHER_CTX_set_padding'
    sqlite3.c:(.text+0x4e08): undefined reference to `EVP_CipherInit_ex'
    sqlite3.c:(.text+0x4e24): undefined reference to `EVP_CipherUpdate'
    sqlite3.c:(.text+0x4e4a): undefined reference to `EVP_CipherFinal_ex'
    sqlite3.c:(.text+0x4e5c): undefined reference to `EVP_CIPHER_CTX_free'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_set_cipher':
    sqlite3.c:(.text+0x4e9b): undefined reference to `EVP_get_cipherbyname'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_get_cipher':
    sqlite3.c:(.text+0x4ed9): undefined reference to `EVP_CIPHER_nid'
    sqlite3.c:(.text+0x4ee0): undefined reference to `OBJ_nid2sn'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_get_key_sz':
    sqlite3.c:(.text+0x4efd): undefined reference to `EVP_CIPHER_key_length'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_get_iv_sz':
    sqlite3.c:(.text+0x4f1a): undefined reference to `EVP_CIPHER_iv_length'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_get_block_sz':
    sqlite3.c:(.text+0x4f37): undefined reference to `EVP_CIPHER_block_size'
    ./.libs/libsqlcipher.a(sqlite3.o): In function `sqlcipher_openssl_get_hmac_sz':
    sqlite3.c:(.text+0x4f4a): undefined reference to `EVP_sha1'
    sqlite3.c:(.text+0x4f52): undefined reference to `EVP_MD_size'
    collect2: error: ld returned 1 exit status
    Makefile:611: set di istruzioni per l'obiettivo "sqlcipher" non riuscito
    make: *** [sqlcipher] Errore 1

Thanks a lot


#7

Hi,
i try in other PC and now with dynamic link i have this output. I think it’s correct:

tclsh8.6 /home/christian/Scrivania/sqlcipher2/sqlcipher/tool/mksqlite3h.tcl /home/christian/Scrivania/sqlcipher2/sqlcipher >sqlite3.h
gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -o mkkeywordhash /home/christian/Scrivania/sqlcipher2/sqlcipher/tool/mkkeywordhash.c
./mkkeywordhash >keywordhash.h
gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -o lemon /home/christian/Scrivania/sqlcipher2/sqlcipher/tool/lemon.c
cp /home/christian/Scrivania/sqlcipher2/sqlcipher/tool/lempar.c .
cp /home/christian/Scrivania/sqlcipher2/sqlcipher/src/parse.y .
rm -f parse.h
./lemon parse.y
mv parse.h parse.h.temp
tclsh8.6 /home/christian/Scrivania/sqlcipher2/sqlcipher/tool/addopcodes.tcl parse.h.temp >parse.h
cat parse.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vdbe.c | tclsh8.6 /home/christian/Scrivania/sqlcipher2/sqlcipher/tool/mkopcodeh.tcl >opcodes.h
tclsh8.6 /home/christian/Scrivania/sqlcipher2/sqlcipher/tool/mkopcodec.tcl opcodes.h >opcodes.c
cp /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts5/fts5parse.y .
rm -f fts5parse.h
./lemon fts5parse.y
tclsh8.6 /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts5/tool/mkfts5c.tcl
cp /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts5/fts5.h .
rm -rf tsrc
mkdir tsrc
cp -f /home/christian/Scrivania/sqlcipher2/sqlcipher/src/crypto.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/sqlcipher.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/crypto.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/crypto_impl.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/crypto_libtomcrypt.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/crypto_openssl.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/crypto_cc.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/alter.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/analyze.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/attach.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/auth.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/backup.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/bitvec.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/btmutex.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/btree.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/btree.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/btreeInt.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/build.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/callback.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/complete.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/ctime.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/date.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/dbstat.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/delete.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/expr.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/fault.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/fkey.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/func.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/global.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/hash.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/hash.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/hwtime.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/insert.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/legacy.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/loadext.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/main.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/malloc.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/mem0.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/mem1.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/mem2.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/mem3.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/mem5.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/memjournal.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/msvc.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/mutex.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/mutex.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/mutex_noop.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/mutex_unix.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/mutex_w32.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/notify.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/os.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/os.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/os_common.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/os_setup.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/os_unix.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/os_win.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/os_win.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/pager.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/pager.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/parse.y /home/christian/Scrivania/sqlcipher2/sqlcipher/src/pcache.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/pcache.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/pcache1.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/pragma.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/pragma.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/prepare.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/printf.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/random.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/resolve.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/rowset.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/select.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/status.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/shell.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/sqlite.h.in /home/christian/Scrivania/sqlcipher2/sqlcipher/src/sqlite3ext.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/sqliteInt.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/sqliteLimit.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/table.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/tclsqlite.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/threads.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/tokenize.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/treeview.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/trigger.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/utf.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/update.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/util.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vacuum.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vdbe.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vdbe.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vdbeapi.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vdbeaux.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vdbeblob.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vdbemem.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vdbesort.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vdbetrace.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vdbeInt.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vtab.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/vxworks.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/wal.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/wal.h /home/christian/Scrivania/sqlcipher2/sqlcipher/src/walker.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/where.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/wherecode.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/whereexpr.c /home/christian/Scrivania/sqlcipher2/sqlcipher/src/whereInt.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts1/fts1.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts1/fts1.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts1/fts1_hash.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts1/fts1_hash.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts1/fts1_porter.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts1/fts1_tokenizer.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts1/fts1_tokenizer1.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts2/fts2.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts2/fts2.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts2/fts2_hash.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts2/fts2_hash.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts2/fts2_icu.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts2/fts2_porter.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts2/fts2_tokenizer.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts2/fts2_tokenizer.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts2/fts2_tokenizer1.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3Int.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_aux.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_expr.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_hash.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_hash.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_icu.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_porter.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_snippet.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_tokenizer.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_tokenizer.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_tokenizer1.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_tokenize_vtab.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_unicode.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_unicode2.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3/fts3_write.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/icu/sqliteicu.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/icu/icu.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/rtree/rtree.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/rtree/rtree.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/session/sqlite3session.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/session/sqlite3session.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/rbu/sqlite3rbu.h /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/rbu/sqlite3rbu.c /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/misc/json1.c keywordhash.h opcodes.c opcodes.h parse.c parse.h config.h sqlite3.h tsrc
rm tsrc/sqlite.h.in tsrc/parse.y
tclsh8.6 /home/christian/Scrivania/sqlcipher2/sqlcipher/tool/vdbe-compress.tcl <tsrc/vdbe.c >vdbe.new
mv vdbe.new tsrc/vdbe.c
cp fts5.c fts5.h tsrc
touch .target_source
tclsh8.6 /home/christian/Scrivania/sqlcipher2/sqlcipher/tool/mksqlite3c.tcl
cp tsrc/shell.c tsrc/sqlite3ext.h .
cp /home/christian/Scrivania/sqlcipher2/sqlcipher/ext/session/sqlite3session.h .
./libtool --mode=compile --tag=CC gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 -I. -I/home/christian/Scrivania/sqlcipher2/sqlcipher/src -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/rtree -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/icu -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3 -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/async -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/session -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_TEMP_STORE=2 -c sqlite3.c
libtool: compile: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 -I. -I/home/christian/Scrivania/sqlcipher2/sqlcipher/src -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/rtree -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/icu -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3 -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/async -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/session -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_TEMP_STORE=2 -c sqlite3.c -fPIC -DPIC -o .libs/sqlite3.o
libtool: compile: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 -I. -I/home/christian/Scrivania/sqlcipher2/sqlcipher/src -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/rtree -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/icu -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3 -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/async -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/session -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_TEMP_STORE=2 -c sqlite3.c -o sqlite3.o >/dev/null 2>&1
./libtool --mode=link gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 -I. -I/home/christian/Scrivania/sqlcipher2/sqlcipher/src -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/rtree -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/icu -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3 -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/async -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/session -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -lcrypto -no-undefined -o libsqlcipher.la sqlite3.lo -ldl -lcrypto -lpthread
-rpath “/usr/local/lib” -version-info "8:6:8"
libtool: link: gcc -shared -fPIC -DPIC .libs/sqlite3.o -ldl -lcrypto -lpthread -Wl,-soname -Wl,libsqlcipher.so.0 -o .libs/libsqlcipher.so.0.8.6
libtool: link: (cd “.libs” && rm -f “libsqlcipher.so.0” && ln -s “libsqlcipher.so.0.8.6” “libsqlcipher.so.0”)
libtool: link: (cd “.libs” && rm -f “libsqlcipher.so” && ln -s “libsqlcipher.so.0.8.6” “libsqlcipher.so”)
libtool: link: ar cru .libs/libsqlcipher.a sqlite3.o
libtool: link: ranlib .libs/libsqlcipher.a
libtool: link: ( cd “.libs” && rm -f “libsqlcipher.la” && ln -s “…/libsqlcipher.la” “libsqlcipher.la” )
./libtool --mode=link gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 -I. -I/home/christian/Scrivania/sqlcipher2/sqlcipher/src -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/rtree -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/icu -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3 -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/async -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/session -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -lcrypto -DHAVE_READLINE=0 -DHAVE_EDITLINE=0 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-o sqlcipher /home/christian/Scrivania/sqlcipher2/sqlcipher/src/shell.c libsqlcipher.la
-ldl -lcrypto -lpthread -rpath "/usr/local/lib"
libtool: link: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 -I. -I/home/christian/Scrivania/sqlcipher2/sqlcipher/src -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/rtree -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/icu -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/fts3 -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/async -I/home/christian/Scrivania/sqlcipher2/sqlcipher/ext/session -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -DHAVE_READLINE=0 -DHAVE_EDITLINE=0 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -o .libs/sqlcipher /home/christian/Scrivania/sqlcipher2/sqlcipher/src/shell.c ./.libs/libsqlcipher.so -ldl -lcrypto -lpthread -Wl,-rpath -Wl,/usr/local/lib


#8

Hi @ducarpit

Is everything working for you?


#9

I don’t know exactly…i think it’s OK because there aren’t any error messages during compiling.
I have another question: can use this library (if it’s OK) in a Java Desktop application? Because i only see .c and .h files. In Java the libraries are .jar files. Maybe i have to do other operations after compiling to obtain a jar library?
Thanks a lot


#10

Hello @ducarpit

You are welcome to use SQLCipher within a Java application (along with complying with the licensing terms, however you will be responsible for packaging the library and client library for your platform and deployment requirements. If your organization would prefer a turnkey solution for your Java desktop application, please feel free to reach out to us at support@zetetic.net to discuss enterprise licensing.