public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/16653] New: incompatible type on stack
@ 2004-07-21  6:22 mwteng at hotmail dot com
  2004-07-21  7:15 ` [Bug java/16653] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: mwteng at hotmail dot com @ 2004-07-21  6:22 UTC (permalink / raw)
  To: java-prs

When try running the binary, its failed with ...
org.apache.xercs.parsers.XML11Configuration::configureXML11Pipeline(()V):
incompatible type on stack ...

The way in which the application is built are:
(1) convert two required xml parser jar to object for linking...
    e.g. gcj -c -O2 xmlParserAPIs.jar

(2) compile the application source and link with those libraries.
    e.g. gcj -O2 --main=Main Main.java xmlParserAPIs.o xercesImpl.o

BTW, I could like to know how to submit a complete report for investigation.

Regards,
Meng Wah

Teng.MengWah@illation.com.sg

-- 
           Summary: incompatible type on stack
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mwteng at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org,mwteng at hotmail dot com,tromey at gcc dot gnu
                    dot org
 GCC build triplet: RedHat 9
  GCC host triplet: RedHat 9
GCC target triplet: RedHat 9


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/16653] incompatible type on stack
  2004-07-21  6:22 [Bug java/16653] New: incompatible type on stack mwteng at hotmail dot com
@ 2004-07-21  7:15 ` pinskia at gcc dot gnu dot org
  2004-07-21  7:25 ` rmathew at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-21  7:15 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-21 07:15 -------
Do you know if you run with gij (the interrupter) if it works?
Also you attach the files using the web interface referenced in the URL below.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/16653] incompatible type on stack
  2004-07-21  6:22 [Bug java/16653] New: incompatible type on stack mwteng at hotmail dot com
  2004-07-21  7:15 ` [Bug java/16653] " pinskia at gcc dot gnu dot org
@ 2004-07-21  7:25 ` rmathew at gcc dot gnu dot org
  2004-07-21  8:32 ` mwteng at hotmail dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2004-07-21  7:25 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From rmathew at gcc dot gnu dot org  2004-07-21 07:25 -------
(In reply to comment #0)
> When try running the binary, its failed with ...
> org.apache.xercs.parsers.XML11Configuration::configureXML11Pipeline(()V):
> incompatible type on stack ...

You mean when you execute "a.out", right?

This looks like a bytecode verification error...


> The way in which the application is built are:
> (1) convert two required xml parser jar to object for linking...
>     e.g. gcj -c -O2 xmlParserAPIs.jar

This is a weird usage...you can just specify xmlParserAPIs.jar
on the next GCJ command line...


> (2) compile the application source and link with those libraries.
>     e.g. gcj -O2 --main=Main Main.java xmlParserAPIs.o xercesImpl.o
> 
> BTW, I could like to know how to submit a complete report for investigation.

You can help by running GCJ's "jcf-dump" (or JDK's "javap") on
the class "org.apache.xerces.parsers.XML11Configuration" and pasting
the output for the method "configureXML11Pipeline" - do make sure
to have the relevant JARs in your CLASSPATH when you run this. For
example (on Linux):

jcf-dump --classpath xmlParserAPIs.jar -c
org.apache.xerces.parsers.XML11Configuration >foo.txt

(Note the "-c" flag.)

Open "foo.txt" and copy the method body for "configureXML11Pipeline"
into this bug report.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/16653] incompatible type on stack
  2004-07-21  6:22 [Bug java/16653] New: incompatible type on stack mwteng at hotmail dot com
  2004-07-21  7:15 ` [Bug java/16653] " pinskia at gcc dot gnu dot org
  2004-07-21  7:25 ` rmathew at gcc dot gnu dot org
@ 2004-07-21  8:32 ` mwteng at hotmail dot com
  2004-07-21  8:47 ` mwteng at hotmail dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mwteng at hotmail dot com @ 2004-07-21  8:32 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mwteng at hotmail dot com  2004-07-21 08:32 -------
(In reply to comment #1)
> Do you know if you run with gij (the interrupter) if it works?
> Also you attach the files using the web interface referenced in the URL 
below.

I have no idea will it run with gij and how I should make it run with it.

BTW, I failed to attach the complete source and libraries for your 
invesitgation via GCC Bugzilla...it always responded with "You did not specify 
a file to attach". Thus I will send to you directly in separate email.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/16653] incompatible type on stack
  2004-07-21  6:22 [Bug java/16653] New: incompatible type on stack mwteng at hotmail dot com
                   ` (2 preceding siblings ...)
  2004-07-21  8:32 ` mwteng at hotmail dot com
@ 2004-07-21  8:47 ` mwteng at hotmail dot com
  2004-07-21 11:40 ` rmathew at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mwteng at hotmail dot com @ 2004-07-21  8:47 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mwteng at hotmail dot com  2004-07-21 08:47 -------
(In reply to comment #2)
> (In reply to comment #0)
> > When try running the binary, its failed with ...
> > org.apache.xercs.parsers.XML11Configuration::configureXML11Pipeline(()V):
> > incompatible type on stack ...
> You mean when you execute "a.out", right?
> This looks like a bytecode verification error...
> > The way in which the application is built are:
> > (1) convert two required xml parser jar to object for linking...
> >     e.g. gcj -c -O2 xmlParserAPIs.jar
> This is a weird usage...you can just specify xmlParserAPIs.jar
> on the next GCJ command line...
> > (2) compile the application source and link with those libraries.
> >     e.g. gcj -O2 --main=Main Main.java xmlParserAPIs.o xercesImpl.o
> > 
> > BTW, I could like to know how to submit a complete report for 
investigation.
> You can help by running GCJ's "jcf-dump" (or JDK's "javap") on
> the class "org.apache.xerces.parsers.XML11Configuration" and pasting
> the output for the method "configureXML11Pipeline" - do make sure
> to have the relevant JARs in your CLASSPATH when you run this. For
> example (on Linux):
> jcf-dump --classpath xmlParserAPIs.jar -c
> org.apache.xerces.parsers.XML11Configuration >foo.txt
> (Note the "-c" flag.)
> Open "foo.txt" and copy the method body for "configureXML11Pipeline"
> into this bug report.

No, I am running an executable name 'main'. The simple program needs xml 
parser and we are using xmlParserAPIs.jar and xercesImpl.jar. However, I 
failed to build the simple program without converting the two jars into object 
file. 

------------------------- Below is the compilation and run detail ------------

gcj -v -g -O2 --main=Main -o main \
	alpha/LowerCase.java alpha/UpperCase.java alpha/one/LowerCase.java 
alpha/two/UpperCase.java beta/LowerCase.java beta/UpperCase.java 
beta/one/LowerCase.java beta/two/UpperCase.java 
xmlvalidator/xmlvalidator01.java Main.java \
	lib/xmlParserAPIs.o lib/xercesImpl.o 
Reading specs from /opt/gcc-3.4.1/bin/../lib/gcc/i686-pc-linux-gnu/3.4.1/specs
Reading specs from /opt/gcc-3.4.1/bin/../lib/gcc/i686-pc-linux-
gnu/3.4.1/../../../libgcj.spec
rename spec lib to liborig
Configured with: ./configure --prefix=/opt
Thread model: posix
gcc version 3.4.1
 /opt/gcc-3.4.1/bin/../libexec/gcc/i686-pc-linux-
gnu/3.4.1/jc1 /tmp/ccfUtvVjjx -fhash-synchronization -fno-use-divide-
subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions -
quiet -dumpbase ccfUtvVjjx -mtune=pentiumpro -auxbase ccfUtvVjjx -g -O2 -
version -ffilelist-file -o /tmp/cc0lRYQt.s
GNU Java version 3.4.1 (i686-pc-linux-gnu)
	compiled by GNU C version 3.2.2 20030222 (Red Hat Linux 3.2.2-5).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31906
Class path starts here:
    ./
    /mnt/hgfs/cbr-deploy-lib/activation.jar/ (zip)
    /mnt/hgfs/cbr-deploy-lib/jh.jar/ (zip)
    /mnt/hgfs/cbr-deploy-lib/mailapi.jar/ (zip)
    /mnt/hgfs/cbr-deploy-lib/xmlParserAPIs.jar/ (zip)
    /mnt/hgfs/cbr-deploy-lib/jaxp.jar/ (zip)
    /mnt/hgfs/cbr-deploy-lib/parser.jar/ (zip)
    /mnt/hgfs/cbr-deploy-lib/xercesImpl.jar/ (zip)
    /opt/gcc-3.4.1/bin/../lib/gcc/../../share/java/libgcj-3.4.1.jar/ (system) 
(zip)
 as -V -Qy -o /tmp/ccoyyzOj.o /tmp/cc0lRYQt.s
GNU assembler version 2.13.90.0.18 (i386-redhat-linux) using BFD version 
2.13.90.0.18 20030206
 /opt/gcc-3.4.1/bin/../libexec/gcc/i686-pc-linux-gnu/3.4.1/jvgenmain 
Mainmain /tmp/ccWnJomg.i
 /opt/gcc-3.4.1/bin/../libexec/gcc/i686-pc-linux-
gnu/3.4.1/cc1 /tmp/ccWnJomg.i -quiet -dumpbase Mainmain.c -mtune=pentiumpro -
g -O2 -version -fdollars-in-identifiers -o /tmp/cc0lRYQt.s
GNU C version 3.4.1 (i686-pc-linux-gnu)
	compiled by GNU C version 3.2.2 20030222 (Red Hat Linux 3.2.2-5).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31906
 as -V -Qy -o /tmp/ccOZFmDd.o /tmp/cc0lRYQt.s
GNU assembler version 2.13.90.0.18 (i386-redhat-linux) using BFD version 
2.13.90.0.18 20030206
 /opt/gcc-3.4.1/bin/../libexec/gcc/i686-pc-linux-gnu/3.4.1/collect2 --eh-frame-
hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o 
main /usr/lib/crt1.o /usr/lib/crti.o /opt/gcc-3.4.1/bin/../lib/gcc/i686-pc-
linux-gnu/3.4.1/crtbegin.o -L/opt/gcc-3.4.1/bin/../lib/gcc/i686-pc-linux-
gnu/3.4.1 -L/opt/gcc-3.4.1/bin/../lib/gcc -L/opt/gcc-3.4.1/bin/../lib/gcc/i686-
pc-linux-gnu/3.4.1/../../.. /tmp/ccOZFmDd.o lib/xmlParserAPIs.o 
lib/xercesImpl.o /tmp/ccoyyzOj.o -lgcc_s -lgcc -lgcj -lm -lpthread -ldl -
lgcc_s -lgcc -lc -lgcc_s -lgcc /opt/gcc-3.4.1/bin/../lib/gcc/i686-pc-linux-
gnu/3.4.1/crtend.o /usr/lib/crtn.o
[Alpha.two]SOMESTRING
[Alpha.one]somestring
XML File: /mnt/hgfs/share/casebase.xml
Exception in thread "main" java.lang.VerifyError: verification failed at PC 
236 in org.apache.xerces.parsers.XML11Configuration:configureXML11Pipeline(()
V): incompatible type on stack
   at _Jv_BytecodeVerifier.verify_fail(byte, int) (/opt/gcc-
3.4.1/lib/libgcj.so.5.0.0)
   at _Jv_BytecodeVerifier.pop_init_ref(_Jv_BytecodeVerifier.type) (/opt/gcc-
3.4.1/lib/libgcj.so.5.0.0)
   at _Jv_BytecodeVerifier.verify_instructions_0() (/opt/gcc-
3.4.1/lib/libgcj.so.5.0.0)
   at _Jv_VerifyMethod(_Jv_InterpMethod) (/opt/gcc-3.4.1/lib/libgcj.so.5.0.0)
   at _Jv_PrepareClass(java.lang.Class) (/opt/gcc-3.4.1/lib/libgcj.so.5.0.0)
   at _Jv_WaitForState(java.lang.Class, int) (/opt/gcc-
3.4.1/lib/libgcj.so.5.0.0)
   at java.lang.VMClassLoader.linkClass0(java.lang.Class) (/opt/gcc-
3.4.1/lib/libgcj.so.5.0.0)
   at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/opt/gcc-
3.4.1/lib/libgcj.so.5.0.0)
   at java.lang.Class.initializeClass() (/opt/gcc-3.4.1/lib/libgcj.so.5.0.0)
   at java.lang.Class.newInstance() (/opt/gcc-3.4.1/lib/libgcj.so.5.0.0)
   at org.apache.xerces.util.ObjectFactory.newInstance(java.lang.String, 
java.lang.ClassLoader) (Unknown Source)
   at org.apache.xerces.util.ObjectFactory.createObject(java.lang.String, 
java.lang.String, java.lang.String) (Unknown Source)
   at org.apache.xerces.util.ObjectFactory.createObject(java.lang.String, 
java.lang.String) (Unknown Source)
   at org.apache.xerces.parsers.DOMParser.DOMParser() (Unknown Source)
   at xmlvalidator.xmlvalidator01.parseDocument(java.lang.String) 
(/home/mwteng/jbproject/alpha/src/xmlvalidator/xmlvalidator01.java:75)
   at xmlvalidator.xmlvalidator01.xmlvalidator01(java.lang.String) 
(/home/mwteng/jbproject/alpha/src/xmlvalidator/xmlvalidator01.java:45)
   at Main.xml(java.lang.String) 
(/home/mwteng/jbproject/alpha/src/Main.java:31)
   at Main.main(java.lang.String[]) 
(/home/mwteng/jbproject/alpha/src/Main.java:37)




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/16653] incompatible type on stack
  2004-07-21  6:22 [Bug java/16653] New: incompatible type on stack mwteng at hotmail dot com
                   ` (3 preceding siblings ...)
  2004-07-21  8:47 ` mwteng at hotmail dot com
@ 2004-07-21 11:40 ` rmathew at gcc dot gnu dot org
  2004-07-22  1:18 ` mwteng at hotmail dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2004-07-21 11:40 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From rmathew at gcc dot gnu dot org  2004-07-21 11:40 -------
> I have no idea will it run with gij and how I should make it run with it.

You run "gij" just like you run "java" from the JDK/JRE.

Run "gij --help" for help on the options (you will just
need to use the --classpath option).

Exactly which version of Xerces are you using?

For this particular case can you please attach the
output of running:

jcf-dump -c --classpath xercesImpl.jar org.apache.xerces.parsers.XML11Configuration

(redirected, of course, to a file that you can upload)?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/16653] incompatible type on stack
  2004-07-21  6:22 [Bug java/16653] New: incompatible type on stack mwteng at hotmail dot com
                   ` (4 preceding siblings ...)
  2004-07-21 11:40 ` rmathew at gcc dot gnu dot org
@ 2004-07-22  1:18 ` mwteng at hotmail dot com
  2004-07-22  2:43 ` mwteng at hotmail dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mwteng at hotmail dot com @ 2004-07-22  1:18 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mwteng at hotmail dot com  2004-07-22 01:18 -------
(In reply to comment #8)
> > I have no idea will it run with gij and how I should make it run with it.
> You run "gij" just like you run "java" from the JDK/JRE.
> Run "gij --help" for help on the options (you will just
> need to use the --classpath option).
> Exactly which version of Xerces are you using?
> For this particular case can you please attach the
> output of running:
> jcf-dump -c --classpath xercesImpl.jar 
org.apache.xerces.parsers.XML11Configuration
> (redirected, of course, to a file that you can upload)?

Yup... I could run the application with java and gij. ... Thanks.
As for the jcf-dump ...ing, its failed with file not found.
By unjaring the xercesImpl.jar... I could not see that file too. 
Surprise... why during runtime it being asked.

BTW, I don't know the version of the jar and it was bundle in subdir 'lib' of 
package pkg-16653.tar.gz.
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/16653] incompatible type on stack
  2004-07-21  6:22 [Bug java/16653] New: incompatible type on stack mwteng at hotmail dot com
                   ` (5 preceding siblings ...)
  2004-07-22  1:18 ` mwteng at hotmail dot com
@ 2004-07-22  2:43 ` mwteng at hotmail dot com
  2004-07-22 10:43 ` rmathew at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mwteng at hotmail dot com @ 2004-07-22  2:43 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mwteng at hotmail dot com  2004-07-22 02:43 -------
(In reply to comment #8)
> > I have no idea will it run with gij and how I should make it run with it.
> You run "gij" just like you run "java" from the JDK/JRE.
> Run "gij --help" for help on the options (you will just
> need to use the --classpath option).
> Exactly which version of Xerces are you using?
> For this particular case can you please attach the
> output of running:
> jcf-dump -c --classpath xercesImpl.jar 
org.apache.xerces.parsers.XML11Configuration
> (redirected, of course, to a file that you can upload)?

Based on my last reply ... I couldn't find the XML11Configuration file.
With the new downloaded copy of xerces-j-2.6.2. I managed to perform the jcf-
dump (file: jcf-dump-xercesImpl-output.txt). However, it failed during 
compilation (e.g. gcj -c xercesImpl.jar) and the error can be found in 
file 'gcj-xercesImpl-output.txt).

The mentioned two output files will be forwarded to you in separated 
email...again I failed to attached them from here...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/16653] incompatible type on stack
  2004-07-21  6:22 [Bug java/16653] New: incompatible type on stack mwteng at hotmail dot com
                   ` (6 preceding siblings ...)
  2004-07-22  2:43 ` mwteng at hotmail dot com
@ 2004-07-22 10:43 ` rmathew at gcc dot gnu dot org
  2004-07-22 13:30 ` mwteng at hotmail dot com
  2004-07-23  2:08 ` mwteng at hotmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2004-07-22 10:43 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From rmathew at gcc dot gnu dot org  2004-07-22 10:43 -------
(In reply to comment #10)
> Based on my last reply ... I couldn't find the XML11Configuration file.
> With the new downloaded copy of xerces-j-2.6.2. I managed to perform the jcf-
> dump (file: jcf-dump-xercesImpl-output.txt). However, it failed during 
> compilation (e.g. gcj -c xercesImpl.jar) and the error can be found in 
> file 'gcj-xercesImpl-output.txt).

It's not able to find the indicated class - I guess the other JAR
needs to be in the CLASSPATH while you compile this JAR.

However, you should not use the "-c" option to compile a JAR.
Doesn't (for example):

  gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar

work for you?

If you do want to compile xercesImpl.jar into a native library,
the proper invocation would be something like:

  gcj -shared -fPIC --classpath xmlParserAPIs.jar \
    -o lib-org-apache-xerces.so

Then you can use this library just as you would any normal
shared library like so:

  gcj --main=Main Main.java -l-org-apache-xerces

However, the easiest way out for you would be to
just use the Xerces2-J packages available with
RHUG:

  http://sources.redhat.com/rhug/


> 
> The mentioned two output files will be forwarded to you in separated 
> email...again I failed to attached them from here...
> 



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/16653] incompatible type on stack
  2004-07-21  6:22 [Bug java/16653] New: incompatible type on stack mwteng at hotmail dot com
                   ` (7 preceding siblings ...)
  2004-07-22 10:43 ` rmathew at gcc dot gnu dot org
@ 2004-07-22 13:30 ` mwteng at hotmail dot com
  2004-07-23  2:08 ` mwteng at hotmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: mwteng at hotmail dot com @ 2004-07-22 13:30 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mwteng at hotmail dot com  2004-07-22 13:30 -------
(In reply to comment #14)
> (In reply to comment #10)
> > Based on my last reply ... I couldn't find the XML11Configuration file.
> > With the new downloaded copy of xerces-j-2.6.2. I managed to perform the 
jcf-
> > dump (file: jcf-dump-xercesImpl-output.txt). However, it failed during 
> > compilation (e.g. gcj -c xercesImpl.jar) and the error can be found in 
> > file 'gcj-xercesImpl-output.txt).
> It's not able to find the indicated class - I guess the other JAR
> needs to be in the CLASSPATH while you compile this JAR.
> However, you should not use the "-c" option to compile a JAR.
> Doesn't (for example):
>   gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar
> work for you?
> If you do want to compile xercesImpl.jar into a native library,
> the proper invocation would be something like:
>   gcj -shared -fPIC --classpath xmlParserAPIs.jar \
>     -o lib-org-apache-xerces.so
> Then you can use this library just as you would any normal
> shared library like so:
>   gcj --main=Main Main.java -l-org-apache-xerces
> However, the easiest way out for you would be to
> just use the Xerces2-J packages available with
> RHUG:
>   http://sources.redhat.com/rhug/
> > 
> > The mentioned two output files will be forwarded to you in separated 
> > email...again I failed to attached them from here...
> > 

>   gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar
I have tried something like:
 gcj --classpath .:xmlParserAPIs.jar:xercesImpl.jar --main=Main Main.java
But it failed with undefined references (the references are refering to those 
jars in classpath). Have any idea why --classpath had no effect? 
With no choice, I then try converting the two jar into native, however, I have 
not done that correctly ... like you pointed out below ...
  gcj -shared -fPIC --classpath xmlParserAPIs.jar -o lib-org-apache-xerces.so

BTW, I have downloaded the 'rhug' but not able to build them as shared 
libraries... as I could not run the 'configure'.

In any case, I will try to compile again using something like below 
  gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar





-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug java/16653] incompatible type on stack
  2004-07-21  6:22 [Bug java/16653] New: incompatible type on stack mwteng at hotmail dot com
                   ` (8 preceding siblings ...)
  2004-07-22 13:30 ` mwteng at hotmail dot com
@ 2004-07-23  2:08 ` mwteng at hotmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: mwteng at hotmail dot com @ 2004-07-23  2:08 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mwteng at hotmail dot com  2004-07-23 02:07 -------
(In reply to comment #15)
> (In reply to comment #14)
> > (In reply to comment #10)
> > > Based on my last reply ... I couldn't find the XML11Configuration file.
> > > With the new downloaded copy of xerces-j-2.6.2. I managed to perform the 
> jcf-
> > > dump (file: jcf-dump-xercesImpl-output.txt). However, it failed during 
> > > compilation (e.g. gcj -c xercesImpl.jar) and the error can be found in 
> > > file 'gcj-xercesImpl-output.txt).
> > It's not able to find the indicated class - I guess the other JAR
> > needs to be in the CLASSPATH while you compile this JAR.
> > However, you should not use the "-c" option to compile a JAR.
> > Doesn't (for example):
> >   gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar
> > work for you?
> > If you do want to compile xercesImpl.jar into a native library,
> > the proper invocation would be something like:
> >   gcj -shared -fPIC --classpath xmlParserAPIs.jar \
> >     -o lib-org-apache-xerces.so
> > Then you can use this library just as you would any normal
> > shared library like so:
> >   gcj --main=Main Main.java -l-org-apache-xerces
> > However, the easiest way out for you would be to
> > just use the Xerces2-J packages available with
> > RHUG:
> >   http://sources.redhat.com/rhug/
> > > 
> > > The mentioned two output files will be forwarded to you in separated 
> > > email...again I failed to attached them from here...
> > > 
> >   gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar
> I have tried something like:
>  gcj --classpath .:xmlParserAPIs.jar:xercesImpl.jar --main=Main Main.java
> But it failed with undefined references (the references are refering to 
those 
> jars in classpath). Have any idea why --classpath had no effect? 
> With no choice, I then try converting the two jar into native, however, I 
have 
> not done that correctly ... like you pointed out below ...
>   gcj -shared -fPIC --classpath xmlParserAPIs.jar -o lib-org-apache-xerces.so
> BTW, I have downloaded the 'rhug' but not able to build them as shared 
> libraries... as I could not run the 'configure'.
> In any case, I will try to compile again using something like below 
>   gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar

Good morning Mathew,

(1) I tried compile the application using something like...
    gcj --main=Main Main.java xmlParserAPIs.jar xercesImpl.jar resolver.jar
... I got a Segmentation Fault ... Detail will be sent separately

(2) Next, the xmlParserAPIs.jar, xercesImpl.jar and resolver.jar are converted 
to shared lib using something like
   gcj -shared -fPIC --classpath xmlParserAPIs.jar -o libxmlParserAPIs.so
and build the application using something like
   gcj --main=Main Main.java -lxmlParserAPIs -lxercesImpl -lresolver
Things turn out fine...:)










-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-07-23  2:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-21  6:22 [Bug java/16653] New: incompatible type on stack mwteng at hotmail dot com
2004-07-21  7:15 ` [Bug java/16653] " pinskia at gcc dot gnu dot org
2004-07-21  7:25 ` rmathew at gcc dot gnu dot org
2004-07-21  8:32 ` mwteng at hotmail dot com
2004-07-21  8:47 ` mwteng at hotmail dot com
2004-07-21 11:40 ` rmathew at gcc dot gnu dot org
2004-07-22  1:18 ` mwteng at hotmail dot com
2004-07-22  2:43 ` mwteng at hotmail dot com
2004-07-22 10:43 ` rmathew at gcc dot gnu dot org
2004-07-22 13:30 ` mwteng at hotmail dot com
2004-07-23  2:08 ` mwteng at hotmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).