compiling com.mysql.jdbc.Driver with gcj

Khiraly khiraly123@gmx.net
Mon Oct 10 22:50:00 GMT 2005


2005-10-10, h keltezĂŠssel 20:11-kor Radu Racaru ezt Ă­rta:
> Hi,
> you need to link to the driver also, that's why the compiler says 
> "undefined reference to".
> 
> Like:
> gcj-4.0 --classpath=../mysql-connector-java-3.1.10-bin.jar:.
> org/dcwatch/dchub/core/*.java
>   org/dcwatch/dchub/util/*java org/dcwatch/sql/SqlConnection.java
> ForceInclude.java
>   --main=org.dcwatch.dchub.core.Core
> mysql-connector-java-3.1.10-bin.jar -o faszom2.out
> 
 gcj-4.0 --classpath=../mysql-connector-java-3.1.10-bin.jar:.
org/dcwatch/dchub/core/*.java org/dcwatch/dchub/util/*java
org/dcwatch/sql/SqlConnection.java ForceInclude.java
--main=org.dcwatch.dchub.core.Core ../mysql-connector-java-3.1.10-bin.jar -o faszom3.out
org/dcwatch/sql/SqlConnection.java:6: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.


> gcj-4.0 -c mysql-connector-java-3.1.10-bin.jar -o
> mysql-connector-java-3.1.10-bin.o
khiraly@elite:~/cybhub/eLiteHUB_0.1$ gcj-4.0
-c ../mysql-connector-java-3.1.10-bin.jar -o
mysql-connector-java-3.1.10-bin.o
java/util/TreeMap.java: In class 'com.mysql.jdbc.Connection':
java/util/TreeMap.java: In method
'com.mysql.jdbc.Connection.execSQL(com.mysql.jdbc.Statement,java.lang.String,int,com.mysql.jdbc.Buffer,int,int,boolean,boolean,java.lang.String,boolean,byte)':
java/util/TreeMap.java:2916: error: verification error at PC=644
java/util/TreeMap.java:2916: error: might transfer control into
subroutine
com/mysql/jdbc/ServerPreparedStatement.java: In class
'com.mysql.jdbc.ServerPreparedStatement':
com/mysql/jdbc/ServerPreparedStatement.java: In method
'com.mysql.jdbc.ServerPreparedStatement.executeBatch()':
com/mysql/jdbc/ServerPreparedStatement.java:531: error: verification
error at PC=521
com/mysql/jdbc/ServerPreparedStatement.java:531: error: might transfer
control into subroutine
com/mysql/jdbc/integration/c3p0/MysqlConnectionTester.java: At top
level:
com/mysql/jdbc/integration/c3p0/MysqlConnectionTester.java:0: error:
cannot find file for class com.mchange.v2.c3p0.QueryConnectionTester
com/mysql/jdbc/integration/c3p0/MysqlConnectionTester.java: In class
'com.mysql.jdbc.integration.c3p0.MysqlConnectionTester':
com/mysql/jdbc/integration/c3p0/MysqlConnectionTester.java: In method
'com.mysql.jdbc.integration.c3p0.MysqlConnectionTester.activeCheckConnection(java.sql.Connection)':
com/mysql/jdbc/integration/c3p0/MysqlConnectionTester.java:68: error:
cannot find file for class com.mchange.v2.c3p0.C3P0ProxyConnection
com/mysql/jdbc/integration/c3p0/MysqlConnectionTester.java:68: error:
verification error at PC=23
com/mysql/jdbc/integration/c3p0/MysqlConnectionTester.java:68: error:
invokeinterface calls method not in interface
com/mysql/jdbc/integration/c3p0/MysqlConnectionTester.java: At top
level:
com/mysql/jdbc/integration/c3p0/MysqlConnectionTester.java:47: error:
cannot find file for class com.mchange.v2.c3p0.QueryConnectionTester
com/mysql/jdbc/integration/jboss/ExtendedMysqlExceptionSorter.java:0: error: cannot find file for class org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
com/mysql/jdbc/integration/jboss/ExtendedMysqlExceptionSorter.java:0:
error: cannot find file for class
org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
com/mysql/jdbc/integration/jboss/ExtendedMysqlExceptionSorter.java:0:
confused by earlier errors, bailing out


I did put online the full source code, if somebody want to play with it:
http://khiraly.4242.hu/tmp/cybhub/eLiteHUB_0.1.zip
http://khiraly.4242.hu/tmp/cybhub/mysql-connector-java-3.1.10-bin.jar

What is wrong here?

Khiraly



More information about the Java mailing list