Bug 164369 - GCJ fail while compiling app with JDBC for Firebird
GCJ fail while compiling app with JDBC for Firebird
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
4
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-27 07:59 EDT by Nabucodonosor Coutinho
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-24 08:39:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Nabucodonosor Coutinho 2005-07-27 07:59:02 EDT
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 07:59:02 EDT
Created attachment 117186 [details]
source of my app for check
Comment 2 Jakub Jelinek 2005-07-27 14:39:11 EDT
Can you first retry with gcc-3.4.4-2.fc3 (from today's updates)?
Comment 3 Andrew Haley 2005-07-28 07:41:19 EDT
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 05:50:15 EDT
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 08:39:32 EDT
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.