Apache Xerces - a neverending story

Hi Kevin, hi @ all

1.) I solved the problem with the compiler-error by removing the
typecastings at that lines, where the compiler failed. For example within
IDAttrImpl.cpp [line 103] :

------ snip ------------------------------------
IDOM_Node IDAttrImpl::cloneNode (bool deep) const {
return new /
(this->getOwnerDocument())*/ DAttrImpl (*this, deep);
}
------ snip ------------------------------------


2.) Now I’m at the same position like you. I’ve got everything compiled with
only 5-6 warnings, that ‘void *’ is not a pointer-to-object type and so on.
But that doesn’t matter right now. I’ve tried linking a static (libxerces.a)
and a dynamic (libxerces.so) library. Linking was ok. But for instance using
the static library with a sample-application gives me that linker-error :

The output is this :

------ snip ------------------------------------
g++ -c sample.cpp
g++ -o sample sample.o libxerces.a
/usr/lib/libxerces.a: In function _init': /usr/lib/libxerces.a(.init+0x0): multiple definition of _init’
/x86/lib/crti.o(.init+0x0): first defined here
/usr/lib/libxerces.a: In function _start': /usr/lib/libxerces.a(.text+0x8): multiple definition of _start’
/x86/lib/crt1.o(.text+0x8): first defined here
/usr/lib/libxerces.a: In function _fini': /usr/lib/libxerces.a(.fini+0x0): multiple definition of _fini’
/x86/lib/crti.o(.fini+0x0): first defined here
/usr/lib/libxerces.a: In function __PIC__': libgcc2.c(*ABS*+0x8291898): multiple definition of GLOBAL_OFFSET_TABLE
/x86/lib/crtbegin.o(.got.plt+0x0): first defined here
/x86/lib/crtbegin.o(.dynamic+0x0): multiple definition of `_DYNAMIC’
collect2: ld returned 1 exit status
make: *** [all] Error 1
------ snip ------------------------------------

Did you got the same errors?


3.) Using the dynamic library as shared object crashes my application with a
memfault (core dump) while running it.

BTW: The testapplication is only an empty main :

------ snip ------------------------------------
#include <xerces/util/PlatformUtils.hpp>
#include <xerces/util/XMLString.hpp>
#include <xerces/DOM/DOM.hpp>
#include <iostream.h>

int main (int argc, char **argv) {
return (0);
}

------ snip ------------------------------------

I’ve read your threads on qdn.public.porting and it seems that you’ve got
the same problems. The compiler option -fpic doesn’t help me solving the
problem.

And now? Whats going on? I don’t know what could be wrong. I compiled
without optimization or any other gimmicks.

Can anybody else help?

Marcel



----- Original Message -----
From: Kevin Caporaso <kcaporaso@pillardata.com>
To: Marcel Hoyer <MarcelHoyer@ppw3001.de>
Sent: Monday, July 01, 2002 3:07 PM
Subject: RE: Need your help - Xerces for QNX



Yes, I got the same errors, I haven’t gone back to investigate deeply yet,
for now
I just commented out those functions.
You might also try turning off all optimizations (-O) too see if that lets
the compiler sneak
by.
I’m compiled and linked but am now tracking down Segmentation Faults within
the
xerces library.
It’s been a royal pain in the a**!!
Good luck and please let me know if you have a break-through!

Kevin

-----Original Message-----
From: Marcel Hoyer [mailto:MarcelHoyer@ppw3001.de]
Sent: Monday, July 01, 2002 9:45 AM
To: Kevin Caporaso
Subject: Re: Need your help - Xerces for QNX


Hi Kevin,

I’ve tried to port the library by myself. It was working fine with some
simple errors. But now I get a message, that there is a compiler-error in
find_function_data (function.c). This happens on compiling IDAttrImpl.cpp. I
think there is a fault within the compiler, not the Xercessource.

Did you got the same error? I can’t see any solution for this problem.
Preparing the source brings up more and more errors. I’m using gcc version
2.95.3.

Greetings

Marcel



----- Original Message -----
From: Kevin Caporaso <kcaporaso@pillardata.com>
To: Marcel Hoyer <MarcelHoyer@ppw3001.de>
Sent: Friday, June 28, 2002 3:42 PM
Subject: RE: Need your help - Xerces for QNX



Let me rephrase where I’m at.
I have build the xerces library and the Xalan library but I can’t seem to
link
in the xerces library to even a simple cpp program that doesn’t reference
calls in the xerces/Xalan library. I get 3 annoying linking errors.

For a start on the port, take a look at these instructions (about half way
down the page).
http://xml.apache.org/xerces-c/build-misc.html#faq-4

-----Original Message-----
From: Marcel Hoyer [mailto:MarcelHoyer@ppw3001.de]
Sent: Friday, June 28, 2002 5:11 AM
To: Kevin Caporaso
Subject: Need your help - Xerces for QNX


Hi Kevin,

I’ve tried to reach you via the qnx-newsgroup. I’ve read your messages about
Xerces and Xalan. But I’ve still the problem compiling Xerces under QNX 6.1
(6.2). Did you made the port? If so, please send me your experiences about
it. I need this library for an XML-project.

Thanks a lot

Marcel