This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
gcj-3.3.1 can compile to bytecode, but not to object code
- From: Everton da Silva Marques <everton at lab dot ipaccess dot diveo dot net dot br>
- To: java at gcc dot gnu dot org
- Date: Fri, 19 Sep 2003 20:50:11 -0300
- Subject: gcj-3.3.1 can compile to bytecode, but not to object code
- Reply-to: everton at lab dot ipaccess dot diveo dot net dot br
Hi,
I am able to use gcj 3.3.1 to compile Classpathx servletAPI
and Apache XMLRPC to bytecode, plus a small test case program.
As a side note, Sun's JVM from j2sdk1.4.2_01 can run
cleanly the bytecode generated by gcj.
However, I can't run the test case with gcj/gij because:
1) I'm failing to make gcj to compile
xmlrpc/servlet/test-case to object code. I get this error:
$ gcj --main=sample.RpcServer --classpath=src:servletapi-2.3-alpha1/source:xmlrpc-1.2-b1/src/java -o server src/sample/RpcServer.java
/tmp/ccX8wsuM.o(.text+0x1e): In function `sample::RpcServer::main(JArray<java::lang::String*>*)':
: undefined reference to `org::apache::xmlrpc::WebServer::class$'
/tmp/ccX8wsuM.o(.text+0x36): In function `sample::RpcServer::main(JArray<java::lang::String*>*)':
: undefined reference to `org::apache::xmlrpc::WebServer::WebServer[in-charge](int)'
/tmp/ccX8wsuM.o(.text+0x4b): In function `sample::RpcServer::main(JArray<java::lang::String*>*)':
: undefined reference to `sample::RpcHandler::class$'
/tmp/ccX8wsuM.o(.text+0x5e): In function `sample::RpcServer::main(JArray<java::lang::String*>*)':
: undefined reference to `sample::RpcHandler::RpcHandler[in-charge]()'
collect2: ld returned 1 exit status
$
2) gij reports this error:
$ gij-3.3 -classpath dist/sample.jar:dist/xmlrpc.jar:dist/servlet.jar sample.RpcClient
could not call XML-RPC method: java.io.IOException: Malformed HTTP header
java.io.IOException: Malformed HTTP header
at org.apache.xmlrpc.XmlRpcClient$Worker.execute(java.lang.String, java.util.Vector) (Unknown Source)
at org.apache.xmlrpc.XmlRpcClient.execute(java.lang.String, java.util.Vector) (Unknown Source)
at sample.RpcClient.fetchInterfaces() (Unknown Source)
at sample.RpcClient.main(java.lang.String[]) (Unknown Source)
$
What else can I try? How can I further trace problems (1) and (2)?
Please advise.
Thanks,
Everton