Error while trying to build Sqlcipher on Windows 7 64 bit.

1,952 views
Skip to first unread message

Rohit Valsakumar

unread,
Aug 22, 2013, 2:41:25 PM8/22/13
to sqlc...@googlegroups.com
I am trying to build Sqlcipher on a windows 7 64 bit but the configure stepping is erroring out. I have already built the openssl libraries and I am using the following command to configure sqlcipher but I am getting an error saying check for library crypto fails:

$ ./configure --disable-tcl --disable-amalgamation CFLAGS="-DSQLITE_HAS_CODEC -I/c/openssl-vc-32/in
clude/" LDFLAGS="-leay32 -L/c/openssl-vc-32/bin/"
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... gcc
checking whether the C compiler works... yes
           :
           :
checking for malloc_usable_size... no
checking for tclsh8.5... no
checking for tclsh... tclsh
configure: Version set to 3.7
configure: Release set to 3.7.17
configure: Version number set to 3007017
checking whether to support threadsafe operation... yes
checking for library containing pthread_create... none required
checking for crypto library to use... openssl
checking for HMAC_Init_ex in -lcrypto... no
configure: error: Library crypto not found. Install openssl!"



Attaching config.log with this topic.

Any help is appreciated.
config.log

Nick Parker

unread,
Aug 22, 2013, 3:20:57 PM8/22/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hi Rohit,

Based on the output of your configure, I wonder if you are providing the
wrong path to libeay32.lib. Specifically, I would expect it to be
within a lib sub directory of openssl-vc-32, not bin. If that is the
case, could you change your -L flag and see if it works?
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "SQLCipher Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sqlcipher+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

--
Nick Parker

signature.asc

Rohit Valsakumar

unread,
Aug 22, 2013, 4:14:57 PM8/22/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hi Nick,

Thanks for the prompt reply. The lib folder does contain the stub libs for the libeay32.dll. Still no luck, after the change you suggested, this is what I am getting:

$ ./configure --disable-tcl --disable-amalgamation CFLAGS="-DSQLITE_HAS_CODEC -I/c/openssl-vc-32/in
clude/" LDFLAGS="-leay32 -L/c/openssl-vc-32/lib/"
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/c/sqlcipher/sqlcipher':
configure: error: C compiler cannot create executables
See `config.log' for more details



Also attaching the config.log as a file.

-Rohit
config.log

Nick Parker

unread,
Aug 23, 2013, 10:27:34 AM8/23/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hi Rohit,

Could you try changing your LDFLAGS to say -llibeay32 instead?
> > an email to sqlcipher+...@googlegroups.com <javascript:>.
> > For more options, visit https://groups.google.com/groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
> --
> Nick Parker
signature.asc

Rohit Valsakumar

unread,
Aug 23, 2013, 12:11:10 PM8/23/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hi Nick,

No luck I am getting the same error. I took a look into the config.log and tried to backtrace the issue by going through configure.ac and configure. In the config.log I saw that configure is failing because it could not find -lcrypto

configure:10687: gcc -o conftest.exe -DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2 -I/c/openssl-vc-32/include/ -DSQLCIPHER_CRYPTO_OPENSSL  -L/c/openssl-vc-32/bin/ -llibeay32 conftest.c -lcrypto  -lpthread  >&5
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: cannot find -lcrypto


In the configure script I found a check for crypto libraries:

##########
# Which crypto library do we use
#

# Check whether --with-crypto-lib was given.
if test "${with_crypto_lib+set}" = set; then :
  withval=$with_crypto_lib; crypto_lib=$withval
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypto library to use" >&5
$as_echo_n "checking for crypto library to use... " >&6; }
if test "$crypto_lib" = "none"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
$as_echo "none" >&6; }
else
  if test "$crypto_lib" = "commoncrypto"; then
    CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
    BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: commoncrypto" >&5
$as_echo "commoncrypto" >&6; }
  else
    if test "$crypto_lib" = "libtomcrypt"; then
      CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
      BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: libtomcrypt" >&5
$as_echo "libtomcrypt" >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for register_cipher in -ltomcrypt" >&5
$as_echo_n "checking for register_cipher in -ltomcrypt... " >&6; }
if ${ac_cv_lib_tomcrypt_register_cipher+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ltomcrypt  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext


which is being generated from the following block in configure.ac:

##########
# Which crypto library do we use
#
AC_ARG_WITH([crypto-lib],
AC_HELP_STRING([--with-crypto-lib],[Specify which crypto library to use]),
crypto_lib=$withval)
AC_MSG_CHECKING([for crypto library to use])
if test "$crypto_lib" = "none"; then
  AC_MSG_RESULT([none])
else
  if test "$crypto_lib" = "commoncrypto"; then
    CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
    BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
      AC_MSG_RESULT([commoncrypto])
  else
    if test "$crypto_lib" = "libtomcrypt"; then
      CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
      BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
      AC_MSG_RESULT([libtomcrypt])
      AC_CHECK_LIB([tomcrypt], [register_cipher], ,
                   AC_MSG_ERROR([Library crypto not found. Install libtomcrypt!"]))
    else
        CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
        BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
          AC_MSG_RESULT([openssl])
        AC_CHECK_LIB([crypto], [HMAC_Init_ex], ,
                     AC_MSG_ERROR([Library crypto not found. Install openssl!"]))
    fi
  fi
fi


What I am noticing is that it is this check for '-lcrypto' which is failing on MinGW/MSYS. Also, if I pass '--with-crypto-lib=none' then the configure script runs fine and generates the Makefile, but make is breaking at that point however, I think that is fixable. I though the check for '-lcrypto' on a windows system is not possible as Openssl libraries are named 'libeay32' on windows.

Rohit

Nick Parker

unread,
Aug 23, 2013, 3:44:52 PM8/23/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hi Rohit,

You may want to continue the route of using --with-crypto-lib=none for
your configure step, that will however configure the source tree to use
the OpenSSL crypto provider, but allow skipping the library check at the
configure step. Then invoking:

make clean
make sqlite3.c
make dll

However you will need make sure the linker can find your OpenSSL
library, be it statically or dynamically linked.
signature.asc

Rohit Valsakumar

unread,
Aug 23, 2013, 4:09:47 PM8/23/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hi Nick,

Thanks for the response, I followed your directions but 'make dll' breaks with an undefined symbol error for 'sqlcipher_openssl_setup'. Is there any step that I am missing?


 make dll
i686-pc-mingw32-gcc   -DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2 -I/cygdrive/c/openssl-vc-32/include/ -DSQLITE_OS_WIN=1 -I. -I./src -I./ext/rtree -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG   -DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1  -shared -o sqlite3.dll sqlite3.def \
        -Wl,"--strip-all" .libs/alter.o .libs/analyze.o .libs/attach.o .libs/auth.o .libs/backup.o .libs/bitvec.o .libs/btmutex.o .libs/btree.o .libs/build.o .libs/callback.o .libs/complete.o .libs/ctime.o .libs/date.o .libs/delete.o .libs/expr.o .libs/fault.o .libs/fkey.o .libs/fts3.o .libs/fts3_aux.o .libs/fts3_expr.o .libs/fts3_hash.o .libs/fts3_icu.o .libs/fts3_porter.o .libs/fts3_snippet.o .libs/fts3_tokenizer.o .libs/fts3_tokenizer1.o .libs/fts3_tokenize_vtab.o .libs/fts3_unicode.o .libs/fts3_unicode2.o .libs/fts3_write.o .libs/func.o .libs/global.o .libs/hash.o .libs/icu.o .libs/insert.o .libs/journal.o .libs/legacy.o .libs/loadext.o .libs/main.o .libs/malloc.o .libs/mem0.o .libs/mem1.o .libs/mem2.o .libs/mem3.o .libs/mem5.o .libs/memjournal.o .libs/mutex.o .libs/mutex_noop.o .libs/mutex_unix.o .libs/mutex_w32.o .libs/notify.o .libs/opcodes.o .libs/os.o .libs/os_unix.o .libs/os_win.o .libs/pager.o .libs/parse.o .libs/pcache.o .libs/pcache1.o .libs/pragma.o .libs/prepare.o .libs/printf.o .libs/random.o .libs/resolve.o .libs/rowset.o .libs/rtree.o .libs/select.o .libs/status.o .libs/table.o .libs/tokenize.o .libs/trigger.o .libs/update.o .libs/util.o .libs/vacuum.o .libs/vdbe.o .libs/vdbeapi.o .libs/vdbeaux.o .libs/vdbeblob.o .libs/vdbemem.o .libs/vdbesort.o .libs/vdbetrace.o .libs/wal.o .libs/walker.o .libs/where.o .libs/utf.o .libs/vtab.o .libs/crypto.o .libs/crypto_impl.o .libs/crypto_openssl.o .libs/crypto_libtomcrypt.o .libs/crypto_cc.o
.libs/crypto_impl.o:crypto_impl.c:(.text+0x176): undefined reference to `sqlcipher_openssl_setup'
collect2: error: ld returned 1 exit status
Makefile:1026: recipe for target `sqlite3.dll' failed
make: *** [sqlite3.dll] Error 1


-Rohit

Nick Parker

unread,
Aug 23, 2013, 4:24:16 PM8/23/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hi Rohit,

That function is externed before the call site in crypto_impl.c and is
defined within crypto_openssl.c which should be getting compiled. This
portion of the compilation would require linking your OpenSSL library,
at least once it is found. Can you verify an object file is being
generated for crypto_openssl?

On 8/23/13 3:09 PM, Rohit Valsakumar wrote:
> Hi Nick,
>
> <http://configure.ac> and
> <http://configure.ac>:
signature.asc

Rohit Valsakumar

unread,
Aug 23, 2013, 4:30:38 PM8/23/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hi Nick,

Yes I can see 'crypto_openssl.o' being created in the '.libs' folder as well as 'crypto_impl.o'. So I tried to switch the order in which they are getting linked by running just the link command, but that is not working either.

Rohit

Rohit Valsakumar

unread,
Aug 23, 2013, 4:52:44 PM8/23/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hi Nick,

I noticed that the crypto_openssl.o was only 288bytes in size and did not contain any symbols so probably everything was being excluded by preproc guards. So I includ -DSQLCIPHER_CRYPTO_OPENSSL in the configure script CFLAGS section, so now I am getting to the point where 'make dll' is breaking while trying to build crypto_openssl.o and I am guessing at this step if I provide the path to the static openssl library, it should work.

Rohit

Rohit Valsakumar

unread,
Aug 23, 2013, 5:21:51 PM8/23/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hi Nick,

That worked, the dll is getting built after passing the path to the Openssl libraries.
Thanks for your help, hopefully I can proceed without any issues from here.

Rohit

Nick Parker

unread,
Aug 23, 2013, 5:25:07 PM8/23/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hi Rohit,

Great - glad to hear things are building well for you. Thanks for
giving us an update!
signature.asc

Héctor Martínez

unread,
Oct 24, 2013, 1:12:01 AM10/24/13
to sqlc...@googlegroups.com, Rohit Valsakumar
Hello,

I have the same problem. I have tried with this configuration:
$ ./configure --enable-tempstore=yes --with-crypto-lib=none CFLAGS="-DSQLITE_TEMP_STORE=2 -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/Projects/OpenSSL-Win32/include/ -L/c/Projects/OpenSSL-Win32/lib/ -llibeay32"

And, after that, make clean and make sqlite3.c

When running the "make sqlite3.c", I get this:

gcc  -DSQLITE_TEMP_STORE=2 -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/Pr
ojects/OpenSSL-Win32/include/ -L/c/Projects/OpenSSL-Win32/lib/ -llibeay32 -o mkk
eywordhash.exe -DSQLITE_OMIT_LOAD_EXTENSION=1  ./tool/mkkeywordhash.c
./mkkeywordhash.exe >keywordhash.h
gcc  -DSQLITE_TEMP_STORE=2 -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/Pr
ojects/OpenSSL-Win32/include/ -L/c/Projects/OpenSSL-Win32/lib/ -llibeay32 -o lem
on.exe ./tool/lemon.c
cp ./src/lempar.c .
cp ./src/parse.y .
rm -f parse.h
./lemon.exe -DSQLITE_OMIT_LOAD_EXTENSION=1  parse.y
mv parse.h parse.h.temp
gawk -f ./addopcodes.awk parse.h.temp >parse.h
cat parse.h ./src/vdbe.c | gawk -f ./mkopcodeh.awk >opcodes.h
gawk -f ./mkopcodec.awk opcodes.h >opcodes.c
tclsh ./tool/mksqlite3h.tcl . >sqlite3.h
/bin/sh: tclsh: command not found
make: *** [sqlite3.h] Error 127

Any idea of what can be wrong? Any help would be appreciated.

Thank you in advance.

Sife Abdelrazak

unread,
Oct 24, 2013, 8:57:10 AM10/24/13
to sqlc...@googlegroups.com
Hello,
The error is indicated in the last line of compilation:

/bin/sh: tclsh: command not found
You have first to install tcl from here, then go to the directory where tcl is installed, you should find like this: tclsh8X.exe where X is a number, rename it to tclsh.exe.
Now, open C:\msys\1.0\etc\fstab and add this line in the end:
c:/Tcl    /tcl

Nick Parker

unread,
Oct 24, 2013, 9:18:08 AM10/24/13
to sqlc...@googlegroups.com
Hi,

Another option is to disable TCL during the configuration, it is often
used to build the test fixture. You can include --disable-tcl within
./configure should you wish to omit TCL usage.

On 10/24/13, 7:57 AM, Sife Abdelrazak wrote:
> Hello,
> The error is indicated in the last line of compilation:
> */bin/sh: tclsh: command not found*
> You have first to install *tcl *from here
> <http://www.activestate.com/activetcl/downloads>, then go to the
> directory where *tcl *is installed, you should find like this:
> *tclsh8X.exe* where X is a number, rename it to *tclsh.exe*.
> Now, open *C:\msys\1.0\etc\fstab* and add this line in the end:
> /*c:/Tcl /tcl*/
>
>
> On Wed, Oct 23, 2013 at 9:12 PM, Héctor Martínez
> <hector....@sensetrix.com <mailto:hector....@sensetrix.com>>
> > > -I/cygdrive/c/openssl-vc-32/__include/
> .libs/crypto_impl.o:crypto___impl.c:(.text+0x176): undefined
> c:/mingw/bin/../lib/gcc/__mingw32/4.7.2/../../../../__mingw32/bin/ld.exe:
> -DSQLCIPHER_CRYPTO___LIBTOMCRYPT"
> > > > BUILD_CFLAGS+="
> -DSQLCIPHER_CRYPTO___LIBTOMCRYPT"
> > > > { $as_echo
> "$as_me:${as_lineno-$LINENO}: result:
> > > libtomcrypt" >&5
> > > > $as_echo "libtomcrypt" >&6; }
> > > > { $as_echo
> "$as_me:${as_lineno-$LINENO}:
> > checking for
> > > > register_cipher in -ltomcrypt" >&5
> > > > $as_echo_n "checking for register_cipher in
> > -ltomcrypt... " >&6; }
> > > > if
> ${ac_cv_lib_tomcrypt_register___cipher+:} false;
> > then :
> > > > $as_echo_n "(cached) " >&6
> > > > else
> > > > ac_check_lib_save_LIBS=$LIBS
> > > > LIBS="-ltomcrypt $LIBS"
> > > > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> > > >
> > > > which is being generated from the
> following block in
> > configure.ac <http://configure.ac>
> <http://configure.ac>
> > > <http://configure.ac>:
> > > >
> > > > ##########
> > > > # Which crypto library do we use
> > > > #
> > > > AC_ARG_WITH([crypto-lib],
> > > >
> AC_HELP_STRING([--with-crypto-__lib],[Specify which
> > crypto library
> > > to use]),
> > > > crypto_lib=$withval)
> > > > AC_MSG_CHECKING([for crypto library to use])
> > > > if test "$crypto_lib" = "none"; then
> > > > AC_MSG_RESULT([none])
> > > > else
> > > > if test "$crypto_lib" = "commoncrypto";
> then
> > > > CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
> > > > BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
> > > > AC_MSG_RESULT([commoncrypto])
> > > > else
> > > > if test "$crypto_lib" = "libtomcrypt";
> then
> > > > CFLAGS+="
> -DSQLCIPHER_CRYPTO___LIBTOMCRYPT"
> > > > BUILD_CFLAGS+="
> -DSQLCIPHER_CRYPTO___LIBTOMCRYPT"
> https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>
> > > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>>
> > > >
> <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>
> > > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>>>
> > > > >
> <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>
> > > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>>
> > > >
> <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>
> > > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>>>>.
> > > > >
> > > > > --
> > > > > Nick Parker
> > > > >
> > > > > --
> > > > >
> > > > > ---
> > > > > You received this message because
> you are
> > subscribed to the
> > > Google
> > > > > Groups "SQLCipher Users" group.
> > > > > To unsubscribe from this group and stop
> > receiving emails
> > > from it,
> > > > send
> > > > > an email to
> sqlcipher+...@googlegroups.com
> > <javascript:>.
> > > > > For more options, visit
> > > https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>
> > > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>>
> > > >
> <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>
> > > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>>>.
> > > >
> > > > --
> > > > Nick Parker
> > > >
> > > > --
> > > >
> > > > ---
> > > > You received this message because you are
> subscribed
> > to the Google
> > > > Groups "SQLCipher Users" group.
> > > > To unsubscribe from this group and stop
> receiving
> > emails from it,
> > > send
> > > > an email to sqlcipher+...@googlegroups.com
> > <javascript:>.
> > > > For more options, visit
> > https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>
> > > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>>.
> > >
> > > --
> > > Nick Parker
> > >
> > > --
> > >
> > > ---
> > > You received this message because you are
> subscribed to
> > the Google
> > > Groups "SQLCipher Users" group.
> > > To unsubscribe from this group and stop
> receiving emails
> > from it, send
> > > an email to sqlcipher+...@googlegroups.com__.
> > > For more options, visit
> > https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>
> > <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>.
> >
> > --
> > Nick Parker
> >
> > --
> >
> > ---
> > You received this message because you are subscribed to the
> Google
> > Groups "SQLCipher Users" group.
> > To unsubscribe from this group and stop receiving emails from
> it, send
> > an email to sqlcipher+...@__googlegroups.com.
> > For more options, visit
> https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
> --
> Nick Parker
>
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "SQLCipher Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to sqlcipher+...@googlegroups.com
> <mailto:sqlcipher%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
> --
> My tech blog <http://0xsife.wordpress.com/>
signature.asc

Héctor Martínez

unread,
Oct 28, 2013, 3:45:12 AM10/28/13
to sqlc...@googlegroups.com
Thank you Sife and Nick and sorry for the late answer.

I have tried both options. The --disable-tcl seems not to work for some strange reason.
Installing Tcl has worked (after restarting MINGW), but now I have a new problem. After make clean and make, I have used "make dll", which gives plenty of "undefined reference to" errors, such as:

.libs/sqlite3.o:sqlite3.c:(.text+0x2c41): undefined reference to `RAND_add'
.libs/sqlite3.o:sqlite3.c:(.text+0x2c84): undefined reference to `EVP_get_cipher
byname'
.libs/sqlite3.o:sqlite3.c:(.text+0x2ca9): undefined reference to `OPENSSL_add_al
l_algorithms_noconf'
.libs/sqlite3.o:sqlite3.c:(.text+0x2d25): undefined reference to `EVP_cleanup'
.libs/sqlite3.o:sqlite3.c:(.text+0x2d8d): undefined reference to `RAND_bytes'
.libs/sqlite3.o:sqlite3.c:(.text+0x2dc0): undefined reference to `HMAC_CTX_init'

.libs/sqlite3.o:sqlite3.c:(.text+0x2dc5): undefined reference to `EVP_sha1'
.libs/sqlite3.o:sqlite3.c:(.text+0x2ded): undefined reference to `HMAC_Init_ex'
.libs/sqlite3.o:sqlite3.c:(.text+0x2e09): undefined reference to `HMAC_Update'
.libs/sqlite3.o:sqlite3.c:(.text+0x2e25): undefined reference to `HMAC_Update'
.libs/sqlite3.o:sqlite3.c:(.text+0x2e44): undefined reference to `HMAC_Final'
.libs/sqlite3.o:sqlite3.c:(.text+0x2e52): undefined reference to `HMAC_CTX_clean
up'
.libs/sqlite3.o:sqlite3.c:(.text+0x2e94): undefined reference to `PKCS5_PBKDF2_H
MAC_SHA1'
.libs/sqlite3.o:sqlite3.c:(.text+0x2ed2): undefined reference to `EVP_CipherInit
'
.libs/sqlite3.o:sqlite3.c:(.text+0x2ee8): undefined reference to `EVP_CIPHER_CTX
_set_padding'
.libs/sqlite3.o:sqlite3.c:(.text+0x2f13): undefined reference to `EVP_CipherInit
'
.libs/sqlite3.o:sqlite3.c:(.text+0x2f40): undefined reference to `EVP_CipherUpda
te'
.libs/sqlite3.o:sqlite3.c:(.text+0x2f71): undefined reference to `EVP_CipherFina
l'
.libs/sqlite3.o:sqlite3.c:(.text+0x2f88): undefined reference to `EVP_CIPHER_CTX
_cleanup'
.libs/sqlite3.o:sqlite3.c:(.text+0x2fa6): undefined reference to `EVP_get_cipher
byname'
.libs/sqlite3.o:sqlite3.c:(.text+0x2fc5): undefined reference to `EVP_CIPHER_nid
'
.libs/sqlite3.o:sqlite3.c:(.text+0x2fcd): undefined reference to `OBJ_nid2sn'
.libs/sqlite3.o:sqlite3.c:(.text+0x2fe2): undefined reference to `EVP_CIPHER_key
_length'
.libs/sqlite3.o:sqlite3.c:(.text+0x2ff7): undefined reference to `EVP_CIPHER_iv_
length'
.libs/sqlite3.o:sqlite3.c:(.text+0x300c): undefined reference to `EVP_CIPHER_blo
ck_size'
.libs/sqlite3.o:sqlite3.c:(.text+0x3019): undefined reference to `EVP_sha1'
.libs/sqlite3.o:sqlite3.c:(.text+0x3021): undefined reference to `EVP_MD_size'

Am I missing some includes or something?

Thank you again.

Sife Abdelrazak

unread,
Oct 28, 2013, 5:19:34 AM10/28/13
to sqlc...@googlegroups.com
Hello,
Mr Martínez, you are in the final stage to complete building SQLCipher, the errors you facing is about OpenSSL linking issues, post your full command to build SQLCipher, also post the path where did you install OpenSSL.


--
 
---
You received this message because you are subscribed to the Google Groups "SQLCipher Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlcipher+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Héctor Martínez

unread,
Oct 28, 2013, 5:53:33 AM10/28/13
to sqlc...@googlegroups.com
Thank you again for your reply. Here is the command:

./configure --enable-tempstore=yes --with-crypto-lib=none CFLAGS="-DSQLITE_TEMP_STORE=2 -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/Projects/OpenSSL-Win32/include/ -L/c/Projects/OpenSSL-Win32/lib/ -llibeay32"

And, about OpenSSL, I have installed it into c:/Projects/OpenSSL-Win32

Do you know what I am missing?
Reply all
Reply to author
Forward
0 new messages