This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/14212] New: Can't mix compiled and interpreted code with 3.3.3
- From: "stiles at siliconlogic dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Feb 2004 15:55:58 -0000
- Subject: [Bug java/14212] New: Can't mix compiled and interpreted code with 3.3.3
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
We have an application that is compiled with gcj. This application uses the
Xerces XML Parser (v 2.5.0). Currently we are not compiling the Xerces XML
parser, but just pointing the class path at the standard jar file.
Using gcj 3.2.3 and previous revisions this worked correctly. Using gcj 3.3.2
or 3.3.3 the linking phase now fails with undefined references to classes and
methods in the XML Parser.
When linking the executable we have been using the -fno-rtti and -fPIC. Under
3.3.3 we getting the warning:
cc1: warning: "-fno-rtti" is valid for C++ but not for C/ObjC
Full Screen output:
bash-2.05a$ make
gcj -c -o Parser.o Parser.java
gcj -c -o MyErrorHandler.o MyErrorHandler.java
gcj -c -o MyContentHandler.o MyContentHandler.java
gcj -fno-rtti -fPIC --main=Parser Parser.o MyErrorHandler.o MyContentHandler.o
-o parser
cc1: warning: "-fno-rtti" is valid for C++ but not for C/ObjC
Parser.o: In function `Parser::Parser[in-charge](java::lang::String*)':
Parser.o(.text+0x171): undefined reference to
`org::xml::sax::helpers::XMLReaderFactory::createXMLReader(java::lang::String*)'
Parser.o(.text+0x190): undefined reference to `org::xml::sax::XMLReader::class$'
Parser.o(.text+0x1d6): undefined reference to `org::xml::sax::XMLReader::class$'
Parser.o(.text+0x21c): undefined reference to `org::xml::sax::XMLReader::class$'
Parser.o(.gcc_except_table+0x24): undefined reference to
`org::xml::sax::SAXException::class$'
MyErrorHandler.o: In function
`MyErrorHandler::warning(org::xml::sax::SAXParseException*)':
MyErrorHandler.o(.text+0x19f): undefined reference to
`org::xml::sax::SAXException::class$'
MyErrorHandler.o(.text+0x1b7): undefined reference to
`org::xml::sax::SAXException::SAXException[in-charge](java::lang::String*)'
MyErrorHandler.o: In function
`MyErrorHandler::error(org::xml::sax::SAXParseException*)':
MyErrorHandler.o(.text+0x365): undefined reference to
`org::xml::sax::SAXException::class$'
MyErrorHandler.o(.text+0x37d): undefined reference to
`org::xml::sax::SAXException::SAXException[in-charge](java::lang::String*)'
MyErrorHandler.o: In function
`MyErrorHandler::fatalError(org::xml::sax::SAXParseException*)':
MyErrorHandler.o(.text+0x52b): undefined reference to
`org::xml::sax::SAXException::class$'
MyErrorHandler.o(.text+0x543): undefined reference to
`org::xml::sax::SAXException::SAXException[in-charge](java::lang::String*)'
MyErrorHandler.o(.data+0xb0): undefined reference to
`org::xml::sax::ErrorHandler::class$'
MyContentHandler.o: In function
`MyContentHandler::MyContentHandler[in-charge](java::util::HashMap*)':
MyContentHandler.o(.text+0xd): undefined reference to
`org::xml::sax::helpers::DefaultHandler::DefaultHandler[in-charge]()'
MyContentHandler.o(.data+0xa4): undefined reference to
`org::xml::sax::helpers::DefaultHandler::resolveEntity(java::lang::String*,
java::lang::String*)'
MyContentHandler.o(.data+0xa8): undefined reference to
`org::xml::sax::helpers::DefaultHandler::notationDecl(java::lang::String*,
java::lang::String*, java::lang::String*)'
MyContentHandler.o(.data+0xac): undefined reference to
`org::xml::sax::helpers::DefaultHandler::unparsedEntityDecl(java::lang::String*,
java::lang::String*, java::lang::String*, java::lang::String*)'
MyContentHandler.o(.data+0xb0): undefined reference to
`org::xml::sax::helpers::DefaultHandler::setDocumentLocator(org::xml::sax::Locator*)'
MyContentHandler.o(.data+0xb4): undefined reference to
`org::xml::sax::helpers::DefaultHandler::startDocument()'
MyContentHandler.o(.data+0xb8): undefined reference to
`org::xml::sax::helpers::DefaultHandler::endDocument()'
MyContentHandler.o(.data+0xbc): undefined reference to
`org::xml::sax::helpers::DefaultHandler::startPrefixMapping(java::lang::String*,
java::lang::String*)'
MyContentHandler.o(.data+0xc0): undefined reference to
`org::xml::sax::helpers::DefaultHandler::endPrefixMapping(java::lang::String*)'
MyContentHandler.o(.data+0xc8): undefined reference to
`org::xml::sax::helpers::DefaultHandler::endElement(java::lang::String*,
java::lang::String*, java::lang::String*)'
MyContentHandler.o(.data+0xd0): undefined reference to
`org::xml::sax::helpers::DefaultHandler::ignorableWhitespace(JArray<wchar_t>*,
int, int)'
MyContentHandler.o(.data+0xd4): undefined reference to
`org::xml::sax::helpers::DefaultHandler::processingInstruction(java::lang::String*,
java::lang::String*)'
MyContentHandler.o(.data+0xd8): undefined reference to
`org::xml::sax::helpers::DefaultHandler::skippedEntity(java::lang::String*)'
MyContentHandler.o(.data+0xdc): undefined reference to
`org::xml::sax::helpers::DefaultHandler::warning(org::xml::sax::SAXParseException*)'
MyContentHandler.o(.data+0xe0): undefined reference to
`org::xml::sax::helpers::DefaultHandler::error(org::xml::sax::SAXParseException*)'
MyContentHandler.o(.data+0xe4): undefined reference to
`org::xml::sax::helpers::DefaultHandler::fatalError(org::xml::sax::SAXParseException*)'
MyContentHandler.o(.data+0x110): undefined reference to
`org::xml::sax::helpers::DefaultHandler::class$'
collect2: ld returned 1 exit status
make: *** [parser] Error 1
bash-2.05a$
bash-2.05a$ echo $CLASSPATH
/apps/java/3rdparty/xerces-2_5_0/xercesImpl.jar:.
--
Summary: Can't mix compiled and interpreted code with 3.3.3
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: stiles at siliconlogic dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14212