Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Dec 2005 14:36:20 +0100
From:      =?iso-8859-1?Q?Fr=E9d=E9ric_de_la_Goublaye?= <fredericdelagoublaye@free.fr>
To:        <freebsd-java@FreeBSD.org>
Subject:   java sqlite on FreeBSD 6.0
Message-ID:  <002901c5f8d7$b6b305d0$0400a8c0@iava>

next in thread | raw e-mail | index | archive | help
Thanks for your quick support.
I am making some progress ...


I copy  jawt_md.h and jni_md.h from the sub directory =
/usr/local/jdk1.4.2/include/freebsd/
to the directory /usr/local/jdk1.4.2/include/

I do not really know what I am doing but ... it is working.


 make
./libtool gcc -c -Wall -O -fPIC -I/usr/local/jdk1.4.2/include =
-I/usr/local/jdk1.4.2/include/freebsd6.0 -I/usr/local/include =
-I/usr/local/include  -DHAVE_SQLITE2=3D1 -DHAVE_SQLITE3=3D1  =
-DHAVE_SQLITE_FUNCTION_TYPE=3D1  -DHAVE_SQLITE_OPEN_AUX_FILE=3D0  =
-DHAVE_SQLITE_SET_AUTHORIZER=3D1  -DHAVE_SQLITE_TRACE=3D1  =
-DHAVE_SQLITE_COMPILE=3D1  -DHAVE_SQLITE_PROGRESS_HANDLER=3D1 =
native/sqlite_jni.c
rm -f .libs/sqlite_jni.lo
gcc -c -Wall -O -fPIC -I/usr/local/jdk1.4.2/include =
-I/usr/local/jdk1.4.2/include/freebsd6.0 -I/usr/local/include =
-I/usr/local/include -DHAVE_SQLITE2=3D1 -DHAVE_SQLITE3=3D1 =
-DHAVE_SQLITE_FUNCTION_TYPE=3D1 -DHAVE_SQLITE_OPEN_AUX_FILE=3D0 =
-DHAVE_SQLITE_SET_AUTHORIZER=3D1 -DHAVE_SQLITE_TRACE=3D1 =
-DHAVE_SQLITE_COMPILE=3D1 -DHAVE_SQLITE_PROGRESS_HANDLER=3D1 =
native/sqlite_jni.c  -fPIC -DPIC -o .libs/sqlite_jni.lo
gcc -c -Wall -O -fPIC -I/usr/local/jdk1.4.2/include =
-I/usr/local/jdk1.4.2/include/freebsd6.0 -I/usr/local/include =
-I/usr/local/include -DHAVE_SQLITE2=3D1 -DHAVE_SQLITE3=3D1 =
-DHAVE_SQLITE_FUNCTION_TYPE=3D1 -DHAVE_SQLITE_OPEN_AUX_FILE=3D0 =
-DHAVE_SQLITE_SET_AUTHORIZER=3D1 -DHAVE_SQLITE_TRACE=3D1 =
-DHAVE_SQLITE_COMPILE=3D1 -DHAVE_SQLITE_PROGRESS_HANDLER=3D1 =
native/sqlite_jni.c -o sqlite_jni.o >/dev/null 2>&1
mv -f .libs/sqlite_jni.lo sqlite_jni.lo
./libtool gcc -o libsqlite_jni.la sqlite_jni.lo  -rpath /usr/local/lib =
/usr/local/lib/libsqlite.a /usr/local/lib/libsqlite3.la

*** Warning: Linking the shared library libsqlite_jni.la against the
*** static library /usr/local/lib/libsqlite.a is not portable!
rm -fr .libs/libsqlite_jni.la .libs/libsqlite_jni.* =
.libs/libsqlite_jni.*
gcc -shared  sqlite_jni.lo  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath =
-Wl,/usr/local/lib  /usr/local/lib/libsqlite.a =
/usr/local/lib/libsqlite3.so -lc  -Wl,-soname -Wl,libsqlite_jni.so.0 -o =
.libs/libsqlite_jni.so.0
(cd .libs && rm -f libsqlite_jni.so && ln -s libsqlite_jni.so.0 =
libsqlite_jni.so)
(cd .libs && rm -f libsqlite_jni.so && ln -s libsqlite_jni.so.0 =
libsqlite_jni.so)
ar cru .libs/libsqlite_jni.a /usr/local/lib/libsqlite.a  sqlite_jni.o  =
/usr/local/lib/libsqlite.a
ranlib .libs/libsqlite_jni.a
creating libsqlite_jni.la
(cd .libs && rm -f libsqlite_jni.la && ln -s ../libsqlite_jni.la =
libsqlite_jni.la)

#make test
/usr/local/jdk1.4.2/bin/javac test.java


# java test
Unable to load sqlite: java.lang.UnsatisfiedLinkError: no sqlite_jni in =
java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: version
        at SQLite.Database.version(Native Method)
        at test.main(test.java:72)

# java -jar sqlite.jar test
Unable to load sqlite: java.lang.UnsatisfiedLinkError: no sqlite_jni in =
java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: open
        at SQLite.Database.open(Native Method)
        at SQLite.Shell.main(Shell.java:494)


Have you any idear ?=20
Thanks

Fr=E9d=E9ric


----- Original Message -----=20
From: "Fr=E9d=E9ric de la Goublaye" <fredericdelagoublaye@free.fr>
To: "Panagiotis Astithas" <past@ebs.gr>
Sent: Sunday, December 04, 2005 2:05 PM
Subject: Re: java sqlite on FreeBSD 6.0


> Ouah ! Thanks for your quick support
>=20
> I reinstall sqlite3 with the ports
>=20
> I tried this command:
>=20
> ./configure --with-jdk=3D/usr/local/jdk1.4.2
>=20
> Now I have the message:
>=20
> configure: WARNING: setting generic JNI include file directives!
> setting JNI include file=20
> directives: -I/usr/local/jdk1.4.2/include =
-I/usr/local/jdk1.4.2/include/freebsd6.0
>=20
> but the make gives this error:
>=20
> make
> ./libtool=20
> gcc -c -Wall -O -fPIC -I/usr/local/jdk1.4.2/include =
-I/usr/local/jdk1.4.2/include/freebsd6.0=20
> -I/usr/local/include -I/usr/local/include  -DHAVE_SQLITE2=3D1 =
-DHAVE_SQLITE3=3D1=20
>  -DHAVE_SQLITE_FUNCTION_TYPE=3D1  -DHAVE_SQLITE_OPEN_AUX_FILE=3D0  =
-DHAVE_SQLITE_SET_AUTHORIZER=3D1=20
>  -DHAVE_SQLITE_TRACE=3D1  -DHAVE_SQLITE_COMPILE=3D1  =
-DHAVE_SQLITE_PROGRESS_HANDLER=3D1=20
> native/sqlite_jni.c
> rm -f .libs/sqlite_jni.lo
> gcc -c -Wall -O -fPIC -I/usr/local/jdk1.4.2/include =
-I/usr/local/jdk1.4.2/include/freebsd6.0=20
> -I/usr/local/include -I/usr/local/include -DHAVE_SQLITE2=3D1 =
-DHAVE_SQLITE3=3D1=20
> -DHAVE_SQLITE_FUNCTION_TYPE=3D1 -DHAVE_SQLITE_OPEN_AUX_FILE=3D0 =
-DHAVE_SQLITE_SET_AUTHORIZER=3D1=20
> -DHAVE_SQLITE_TRACE=3D1 -DHAVE_SQLITE_COMPILE=3D1 =
-DHAVE_SQLITE_PROGRESS_HANDLER=3D1=20
> native/sqlite_jni.c  -fPIC -DPIC -o .libs/sqlite_jni.lo
> In file included from native/sqlite_jni.h:2,
>                 from native/sqlite_jni.c:20:
> /usr/local/jdk1.4.2/include/jni.h:27:20: jni_md.h: No such file or =
directory
> In file included from native/sqlite_jni.h:2,
>                 from native/sqlite_jni.c:20:
> /usr/local/jdk1.4.2/include/jni.h:45: error: syntax error before =
"jsize"
> /usr/local/jdk1.4.2/include/jni.h:45: warning: type defaults to `int' =
in=20
> declaration of `jsize'
>=20
>=20
>=20
>=20
> ----- Original Message -----=20
> From: "Panagiotis Astithas" <past@ebs.gr>
> To: "Fr=E9d=E9ric de la Goublaye" <fredericdelagoublaye@free.fr>
> Cc: <freebsd-java@freebsd.org>
> Sent: Sunday, December 04, 2005 1:08 PM
> Subject: Re: java sqlite on FreeBSD 6.0
>=20
>=20
>> Fr=E9d=E9ric de la Goublaye wrote:
>>
>> [...]
>>
>> > install jdk1.4.10: working good (from ports jdk14 after refresh =
with
>> cvsup)
>> > install tomcat 5.5.12: working good
>> >
>> > installed sqlite-3.2.7 from www.sqlite.org: (re-compile src): =
working
>> good
>>
>> Note that you can find a port for this in databases/sqlite3.
>>
>> [...]
>>
>>> configure: WARNING: setting generic JNI include file directives!
>>> setting JNI include file=20
>>> directives: -I/usr/local/include -I/usr/local/include/freebsd6.0
>>
>> This must be your problem. The configure script does not find the jdk =

>> header files. For jdk14 you should=20
>> have -I/usr/local/jdk1.4.2/include =
-I/usr/local/jdk1.4.2/include/freebsd.
>>
>>> using JDBC driver from JDBC2x directory
>>> configure: creating ./config.status
>>> config.status: creating Makefile
>>>
>>> make
>>>
>>> /usr/local/bin/javac  SQLite/Authorizer.java
>>> /usr/local/bin/javac  SQLite/BusyHandler.java
>>> /usr/local/bin/javac  SQLite/Callback.java
>>> /usr/local/bin/javac  SQLite/Database.java
>>> /usr/local/bin/javac  SQLite/Shell.java
>>> ./libtool=20
>>> cc  -I/usr/local/include  -DHAVE_SQLITE2=3D0 -DHAVE_SQLITE3=3D1  -o=20
>>> native/mkconst native/mkconst.c /usr/local/lib/libsqlite3.la
>>> mkdir native/.libs
>>> gcc -I/usr/local/include -DHAVE_SQLITE2=3D0 -DHAVE_SQLITE3=3D1 -o=20
>>> native/mkconst native/mkconst.c=20
>>>  /usr/local/lib/libsqlite3.so -Wl,--rpath -Wl,/usr/local/lib =
-Wl,--rpath =20
>>> -Wl,/usr/local/lib
>>> native/mkconst > SQLite/Constants.java
>>> /usr/local/bin/javac  SQLite/Constants.java
>>> /usr/local/bin/javac  SQLite/StringEncoder.java
>>> /usr/local/bin/javac  SQLite/JDBCDriver.java
>>> /usr/local/bin/javac  SQLite/JDBC2x/JDBCConnection.java
>>> /usr/local/bin/jar cmf manifest sqlite.jar SQLite/Authorizer.class=20
>>> SQLite/BusyHandler.class  SQLite/Callback.class  =
SQLite/Database.class=20
>>> SQLite/Exception.class  SQLite/Shell.class  SQLite/TableResult.class =

>>> SQLite/Function.class  SQLite/FunctionContext.class=20
>>> SQLite/Constants.class  SQLite/Trace.class  SQLite/Vm.class=20
>>> SQLite/ProgressHandler.class  SQLite/StringEncoder.class=20
>>> SQLite/DBDump.class  SQLite/JDBCDriver.class=20
>>> SQLite/JDBC2x/JDBCConnection.class  =
SQLite/JDBC2x/JDBCStatement.class=20
>>> SQLite/JDBC2x/JDBCResultSet.class=20
>>> SQLite/JDBC2x/JDBCResultSetMetaData.class=20
>>> SQLite/JDBC2x/JDBCDatabaseMetaData.class=20
>>> SQLite/JDBC2x/JDBCPreparedStatement.class=20
>>> SQLite/JDBC2x/TableResultX.class  SQLite/JDBC2x/DatabaseX.class
>>> /usr/local/bin/javah -jni -o native/sqlite_jni.h SQLite.Database=20
>>> SQLite.Vm  SQLite.FunctionContext
>>> ....
>>> ....
>>>
>>> native/sqlite_jni.h:111: error: syntax error before "jstring"
>>> native/sqlite_jni.h:112: error: syntax error before '*' token
>>> native/sqlite_jni.h:112: warning: type defaults to `int' in =
declaration=20
>>> of `Java_SQLite_Database_version'
>>> native/sqlite_jni.h:112: warning: data definition has no type or =
storage=20
>>> class
>>> native/sqlite_jni.h:119: error: syntax error before "jstring"
>>> native/sqlite_jni.h:120: error: syntax error before '*' token
>>> native/sqlite_jni.h:120: warning: type defaults to `int' in =
declaration=20
>>> of `Java_SQLite_Database_dbversion'
>>> native/sqlite_jni.h:120: warning: data definition has no type or =
storage=20
>>> class
>>> native/sqlite_jni.h:127: error: syntax error before "void"
>>> native/sqlite_jni.h:135: error: syntax error before "void"
>>> native/sqlite_jni.h:143: error: syntax error before "void"
>>> native/sqlite_jni.h:152: error: syntax error before '*' token
>>> native/sqlite_jni.h:152: warning: type defaults to `int' in =
declaration=20
>>> of `Java_SQLite_Database_error_1string'
>>> native/sqlite_jni.h:152: warning: data definition has no type or =
storage=20
>>> class
>>> native/sqlite_jni.h:159: error: syntax error before "void"
>>> native/sqlite_jni.h:167: error: syntax error before "void"
>>> native/sqlite_jni.h:175: error: syntax error before "void"
>>> native/sqlite_jni.h:184: error: syntax error before '*' token
>>> native/sqlite_jni.h:184: warning: type defaults to `int' in =
declaration=20
>>> of `Java_SQLite_Database_is3'
>>> native/sqlite_jni.h:184: warning: data definition has no type or =
storage=20
>>> class
>>> native/sqlite_jni.h:191: error: syntax error before "void"
>>> native/sqlite_jni.h:199: error: syntax error before "void"
>>> native/sqlite_jni.h:207: error: syntax error before "void"
>>> native/sqlite_jni.h:215: error: syntax error before "void"
>>> native/sqlite_jni.h:235: error: syntax error before '*' token
>>> native/sqlite_jni.h:235: warning: type defaults to `int' in =
declaration=20
>>> of `Java_SQLite_Vm_step'
>>> native/sqlite_jni.h:235: warning: data definition has no type or =
storage=20
>>> class
>>> native/sqlite_jni.h:242: error: syntax error before "jboolean"
>>> native/sqlite_jni.h:243: error: syntax error before '*' token
>>> native/sqlite_jni.h:243: warning: type defaults to `int' in =
declaration=20
>>> of `Java_SQLite_Vm_compile'
>>> native/sqlite_jni.h:243: warning: data definition has no type or =
storage=20
>>> class
>>> native/sqlite_jni.h:250: error: syntax error before "void"
>>> native/sqlite_jni.h:258: error: syntax error before "void"
>>> native/sqlite_jni.h:266: error: syntax error before "void"
>>> native/sqlite_jni.h:285: error: syntax error before "void"
>>> native/sqlite_jni.h:293: error: syntax error before "void"
>>> native/sqlite_jni.h:301: error: syntax error before "void"
>>> native/sqlite_jni.h:309: error: syntax error before "void"
>>> ....
>>> native/sqlite_jni.c: At top level:
>>> native/sqlite_jni.c:702: error: syntax error before "void"
>>> native/sqlite_jni.c:110: warning: 'seterr' defined but not used
>>> native/sqlite_jni.c:120: warning: 'setvmerr' defined but not used
>>> native/sqlite_jni.c:165: warning: 'globrefset' defined but not used
>>> native/sqlite_jni.c:214: warning: 'transfree' defined but not used
>>> native/sqlite_jni.c:222: warning: 'trans2iso' defined but not used
>>> native/sqlite_jni.c:331: warning: 'busyhandler3' defined but not =
used
>>> native/sqlite_jni.c:353: warning: 'progresshandler' defined but not =
used
>>> native/sqlite_jni.c:372: warning: 'callback' defined but not used
>>> native/sqlite_jni.c:625: warning: 'doclose' defined but not used
>>> *** Error code 1
>>>
>>> Stop in /usr/local/sqlite/javasqlite-20050608.
>>=20
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002901c5f8d7$b6b305d0$0400a8c0>