Bug 164369 - GCJ fail while compiling app with JDBC for Firebird
Summary: GCJ fail while compiling app with JDBC for Firebird
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 4
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-27 11:59 UTC by Nabucodonosor Coutinho
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-24 12:39:32 UTC
Type: ---


Attachments (Terms of Use)
source of my app for check (797 bytes, text/plain)
2005-07-27 11:59 UTC, Nabucodonosor Coutinho
no flags Details

Description Nabucodonosor Coutinho 2005-07-27 11:59:02 UTC
Description of problem:
I'm running my java aplication using JDBC for firebird on GIJ and have sucess,
but while try compile with GCJ, this fail with segmentation fail message

Version-Release number of selected component (if applicable):
gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)


How reproducible:
Write one java application without swing or awt, with JDBC connection with
Firebirdsql using JBird and try compile with GCJ compiling the application and
the JBird whit your dependences

Steps to Reproduce:
1.Compile and package your app in jar format
2.Try run with gij for check if functionaly
3.Try compile with application and JBird with GCJ
  
Actual results:

Component.java: In class
`java.awt.Component$AccessibleAWTComponent$AccessibleAWTComponentHandler':
Component.java: In constructor `(java.awt.Component$AccessibleAWTComponent)':
Component.java:0: internal compiler error: Falha de segmentação
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.

Expected results:


Additional info:

Codes useds in my application

forceInclude.java
--------------------------------------------------------------------------
public class forceInclude {
    private final Class Class1 = org.firebirdsql.jdbc.FBDriver.class;
    forceInclude(){

    }

    public void main(String[] args){
        new forceInclude();
    }
}


db.java
-----------------------------------------------------------------
public class db {

        Connection con;
        String url = "jdbc:firebirdsql:aspec-res-015:c:/bancodedados/sistemainte
rno.fdb";
        public db(){
                try {
                        Class.forName("org.firebirdsql.jdbc.FBDriver");
                        con = DriverManager.getConnection(url,"SYSDBA","masterke
y");

                        con.close();
                        System.out.println("conectou");
                } catch(Exception e ){
                        System.out.println(e.toString());
                }
        }

        public static void main(String[] args) {

                new db();

        }

}

Script used for compile
------------------------------------------------------------
echo "Gerando classes..."
gcj -C
--CLASSPATH=firebirdsql-full.jar:lib/mini-j2ee.jar:lib/mini-concurrent.jar:lib/log4j-core.jar:lib/jaas.jar:.
db.java
gcj -C
--CLASSPATH=firebirdsql-full.jar:lib/mini-j2ee.jar:lib/mini-concurrent.jar:lib/log4j-core.jar:lib/jaas.jar:.
forceInclude.java


echo "Gerando o jar..."
jar cf db.jar *.class

echo "Compilando..."
gcj -o db.bin --main=db
--classpath=firebirdsql-full.jar:lib/mini-j2ee.jar:lib/mini-concurrent.jar:lib/log4j-core.jar:lib/jaas.jar:.
db.jar lib/mini-concurrent.jar lib/mini-j2ee.jar lib/log4j-core.jar lib/jaas.jar
firebirdsql-full.jar

Comment 1 Nabucodonosor Coutinho 2005-07-27 11:59:02 UTC
Created attachment 117186 [details]
source of my app for check

Comment 2 Jakub Jelinek 2005-07-27 18:39:11 UTC
Can you first retry with gcc-3.4.4-2.fc3 (from today's updates)?

Comment 3 Andrew Haley 2005-07-28 11:41:19 UTC
The error message indicates that you're recompiling
java.awt.Component$AccessibleAWTComponent$AccessibleAWTComponentHandler.
This is a very strange thing to do.

But I don't know what causes the compiler to segfault, and I can't
duplicate your problem because I don't have the JARs.

It would be more conventional to compile the JARs one at a time to
shared libraries, and then compile your application.  Like this:

gcj -shared
--classpath=firebirdsql-full.jar:lib/mini-j2ee.jar:lib/mini-concurrent.jar:lib/log4j-core.jar:lib/jaas.jar:.
-Bsymbolic -o libmini-concurrent.so lib/mini-concurrent.jar
... etc

and then compile the main program like this:

gcj -o db.bin --main=db
--classpath=firebirdsql-full.jar:lib/mini-j2ee.jar:lib/mini-concurrent.jar:lib/log4j-core.jar:lib/jaas.jar:.
-L. -lmini-concurrent -lmini-j2ee ... etc.

But I can't exactly tell what you're trying to do.


Comment 4 Jakub Jelinek 2005-08-18 09:50:15 UTC
Can you please attach all the .jar files you are using to reproduce this?
Also, FC4 which is set as product version in this BZ is certainly not
including gcc-3.4.x, so, are you on FC3 or is the GCC version you mentioned
from other box?

Comment 5 Jakub Jelinek 2005-09-24 12:39:32 UTC
If you have the requested files and info, please reopen.


Note You need to log in before you can comment on or make changes to this bug.