Compiling SQLite JDBC driver for SQLCipher

755 views
Skip to first unread message

Dan

unread,
Jul 22, 2010, 7:18:22 PM7/22/10
to SQLCipher Users
Hi guys - After making some minor tweaks to the sqlitejdbc for
sqlcipher makefile I was able to compile on 10.6 OSX but immediately
get a bunch of "no SQLite library found" exceptions when executing the
JUnit tests. Now normally I would just ignore this but I get the same
exception in my project so I figured if I solve it for the jdbc driver
I solve it there too. Any idea what's going on?

<snipped>
$JAVA_HOME/bin/java -Djava.library.path=build/Darwin-i386 \
-cp "build/sqlitejdbc-v056-native.jar:build:lib/junit-4.1.jar" \
org.junit.runner.JUnitCore test.ConnectionTest
test.DBMetaDataTest test.PrepStmtTest test.RSMetaDataTest
test.StatementTest test.TransactionTest test.UDFTest
JUnit version 4.1
.E.E.E..EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EEI.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE
Time: 0.433
There were 213 failures:
1) isClosed(test.ConnectionTest)
java.sql.SQLException: no SQLite library found
at org.sqlite.Conn.<init>(Conn.java:83)
at org.sqlite.JDBC.connect(JDBC.java:64)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at test.ConnectionTest.isClosed(ConnectionTest.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
</snipped>

Stephen Lombardo

unread,
Jul 22, 2010, 11:32:47 PM7/22/10
to sqlc...@googlegroups.com
Hi Dan,

What kind of tweaks did you make to the makefile?

I've been able to test successfully building as such:

make  CC=/usr/bin/gcc LINKFLAGS="-mmacosx-version-min=10.6 -dynamiclib -isysroot /Developer/SDKs/MacOSX10.6.sdk"

Does that work for you?

Cheers,
Stephen

Dan

unread,
Jul 23, 2010, 8:40:44 AM7/23/10
to SQLCipher Users
You're the man Stephen! I ended up recloning the project from github
and running your command below...and lo and behold it works! I knew
it had to be missing config or make parameters...I'm afraid I'm not a
make expert and I had a hard time finding documentation on what exact
command to use. Hopefully I'll have the same luck with the other
project which is written in Java.

Thanks again!

Dan

unread,
Jul 23, 2010, 9:00:15 AM7/23/10
to SQLCipher Users
No joy on the using this jdbc driver in my Java project but I think I
know what I need to do. Your SQLCipher jdbc driver I compiled is
*much* smaller in size than the plain vanilla one I was using before I
included encryption. I suspect the driver needs to be merged with the
native sqlcipher libraries somehow so that it's all in one place.
I'll do some more research and let you know what I find.

Thanks again!

On Jul 22, 11:32 pm, Stephen Lombardo <sjlomba...@zetetic.net> wrote:
> Hi Dan,
>
> What kind of tweaks did you make to the makefile?
>
> I've been able to test successfully building as such:
>
> make  CC=/usr/bin/gcc LINKFLAGS="-mmacosx-version-min=10.6 -dynamiclib
> -isysroot /Developer/SDKs/MacOSX10.6.sdk"
>
> Does that work for you?
>
> Cheers,
> Stephen
>
>
>
> On Thu, Jul 22, 2010 at 7:18 PM, Dan <dloo...@gmail.com> wrote:
> > Hi guys - After making some minor tweaks to the sqlitejdbc for
> > sqlcipher makefile I was able to compile on 10.6 OSX but immediately
> > get a bunch of "no SQLite library found" exceptions when executing the
> > JUnit tests.  Now normally I would just ignore this but I get the same
> > exception in my project so I figured if I solve it for the jdbc driver
> > I solve it there too.  Any idea what's going on?
>
> > <snipped>
> > $JAVA_HOME/bin/java -Djava.library.path=build/Darwin-i386 \
> >            -cp "build/sqlitejdbc-v056-native.jar:build:lib/junit-4.1.jar" \
> >            org.junit.runner.JUnitCore test.ConnectionTest
> > test.DBMetaDataTest test.PrepStmtTest test.RSMetaDataTest
> > test.StatementTest test.TransactionTest test.UDFTest
> > JUnit version 4.1
Reply all
Reply to author
Forward
0 new messages