You are viewing a plain text version of this content. The canonical link for it is here.
Posted to p-dev@xerces.apache.org by "Harmon S. Nine" <hn...@ns1.netarx.com> on 2000/09/01 20:35:22 UTC

Submitted for your approval

Here's a more complete version of xerces-perl.  This has tests, but still
no docs.  However, if you look at the tests, and the DOM API, you get an
idea of how to use it all...

Happy Labor Day!

-- Harmon


-- 
---------------------------
Dr. Harmon S. Nine
Netarx, Inc.

30910 Telegraph Road
Bingham Farms, MI 48025

PH.  (248)647-9800
FX.  (248)647-9840

Re: Submitted for your approval

Posted by "Parand T. Darugar" <td...@velocigen.com>.
Dear Harmon,

> Here's a more complete version of xerces-perl.  This has tests, but still
> no docs.  However, if you look at the tests, and the DOM API, you get an
> idea of how to use it all...

  Thanks! I put it at the usual location:

http://www.velocigen.com/~tdarugar/xerces-p/

Best,

Parand Tony Darugar			tdarugar@velocigen.com
858-622-1164				High Performance Perl Server Pages
858-622-0303 fax			VelociGen XML Server
http://www.velocigen.com/

Re: Submitted for your approval

Posted by "Parand T. Darugar" <td...@velocigen.com>.
Dear Harmon,

> Here's a more complete version of xerces-perl.  This has tests, but still
> no docs.  However, if you look at the tests, and the DOM API, you get an
> idea of how to use it all...

  I have the first benchmark, of opening and parsing a file.
Please note that these are probably incredibly innacurate, wrong,
immoral, and anything else that can be said about benchmarks.
The benchmarking script is attached. The XML file I used is a
a weather report I found a while back; I can put it on the web
somewhere. I was going to use the classic REC-xml-19980210.xml
file, but xerces barfes on a DTD thing. 

  Anyway, benchmark says:

Benchmark: timing 500 iterations of DOM, Xerces...
       DOM: 83 wallclock secs (81.00 usr +  0.14 sys = 81.14 CPU)
    Xerces: 13 wallclock secs (12.77 usr +  0.11 sys = 12.88 CPU)

  So, at least the parsing is quite a bit faster.

Best,

Parand Tony Darugar			tdarugar@velocigen.com
858-622-1164				High Performance Perl Server Pages
858-622-0303 fax			VelociGen XML Server
http://www.velocigen.com/		Confidential

Re: Submitted for your approval

Posted by "Harmon S. Nine" <hn...@ns1.netarx.com>.
Hey, Parand.

I just downloaded Xerces-C-src_1_1_0.tar.gz myself, I've been using
Xerces-C-src_1_1_0_d15.tar.gz up to this point.  The only problem I had
compiling was that src/util/Transcoders/Iconv/IconvTransService.cpp had
the following set of lines (starting at line 129):

#if defined (XML_GNUG)
#include <wctype.h>
#endif

which made it so that src/util/Transcoders/Iconv/IconvTransService.cpp
wouldn't compile, since XML_GNUG wasn't defined and it needs the include.  
The only solutions were to comment out the #if and #endif, or somehow
define XML_GNUG.  I opted for the former.



The make went well after that.  HOWEVER, when compiling the samples I ran
into the same problem you did.  The solution was to get "-lpthread" to be
a linker option for every compile/link.  For the samples, this involved
going into the samples/Makefile.incl file and changing line 110 from

LIBRARY_NAMES=-l${LIBNAME}${VER}

to

LIBRARY_NAMES=-l${LIBNAME}${VER} -lpthread


This or something silimar should work for you.


As for xerces-perl, it looks like you may need to set your LD_LIBRARY_PATH
variable before firing up your script, i.e. (bash):

export LD_LIBRARY_PATH=<directory where libxerces-c1_1.so resides>

This tells the DynaLoader (and ld.so in particular) to look for libraries
in this directory as well as the standard directores like /lib and
/usr/lib (actually, LD_LIBRARY_PATH is a colon-separated list of
directories, much like the PATH variable).

If this doesn't help, there might be a problem with how you compiled the
xerces library.  As I recall, some time ago I had to use "-Dbool=char" or
"-Ubool=char" or "-DHAS_BOOL" or some combination thereof as an option on
all the compiles.  I don't have to do this now, but it may be needed for
your setup.


HTH

-- Harmon


On Fri, 1 Sep 2000, Parand T. Darugar wrote:

> Dear Harmon,
> 
>   As a first step I'm trying to get Xerces-C to compile on
> my machine. I downloaded Xerces-C-src_1_1_0.tar.gz from the
> xml.apache.org site , and am attempting to compile it under
> linux, Redhat 6.1 
> 
>   The xerces library seems to compile ok, but I can't get the
> tools to compile. Here's the error message:
> 
> ---------------------------------------
> g++ -DLINUX -fpic -L/usr/lib -L/usr/local/lib
> /home/tdarugar/packages/xerces-c-src_1_1_0/bin/obj/CreateDOMDocument/CreateDOMDocument.o
> -o /home/tdarugar/packages/xerces-c-src_1_1_0/bin/CreateDOMDocument
> -L/home/tdarugar/packages/xerces-c-src_1_1_0/lib -lxerces-c1_1 -lc
> /home/tdarugar/packages/xerces-c-src_1_1_0/lib/libxerces-c1_1.so:
> undefined reference to `pthread_mutexattr_destroy'
> /home/tdarugar/packages/xerces-c-src_1_1_0/lib/libxerces-c1_1.so:
> undefined reference to `pthread_mutexattr_settype'
> /home/tdarugar/packages/xerces-c-src_1_1_0/lib/libxerces-c1_1.so:
> undefined reference to `pthread_mutexattr_init'
> collect2: ld returned 1 exit
> status                                                                                         
> ---------------------------------------
> 
>   It seems unhappy about pthreads. Which version are you using?
> Mine looks to be /lib/libpthread-0.8.so, from the rpm glibc-2.1.2-11.
> 
>   Ignoring this, I attempted to build xerces-perl. It seems to
> compile fine, but the tests fail. I tried just use XERCES;
> and I got:
> 
> Can't load
> '/usr/local/vgx/ve/perl5/site_perl/5.005/i586-linux/auto/XERCES/XERCES.so'
> for module XERCES:
> /usr/local/vgx/ve/perl5/site_perl/5.005/i586-linux/auto/XERCES/XERCES.so:
> undefined symbol: __ti14BinInputStream at
> /usr/local/vgx/ve/perl5/5.00503/i586-linux/DynaLoader.pm line 169.
> 
>   I'm not familiar with this one. Harmon, could you send some details 
> on the versions of any and all things that might be relevant? Much
> appreciated.
> 
> Best,
> 
> Parand Tony Darugar			tdarugar@velocigen.com
> 858-622-1164				High Performance Perl Server Pages
> 858-622-0303 fax			VelociGen XML Server
> http://www.velocigen.com/		Confidential
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
> 

-- 
---------------------------
Dr. Harmon S. Nine
Netarx, Inc.

30910 Telegraph Road
Bingham Farms, MI 48025

PH.  (248)647-9800
FX.  (248)647-9840


Re: Submitted for your approval

Posted by "Parand T. Darugar" <td...@velocigen.com>.
Dear Harmon,

  As a first step I'm trying to get Xerces-C to compile on
my machine. I downloaded Xerces-C-src_1_1_0.tar.gz from the
xml.apache.org site , and am attempting to compile it under
linux, Redhat 6.1 

  The xerces library seems to compile ok, but I can't get the
tools to compile. Here's the error message:

---------------------------------------
g++ -DLINUX -fpic -L/usr/lib -L/usr/local/lib
/home/tdarugar/packages/xerces-c-src_1_1_0/bin/obj/CreateDOMDocument/CreateDOMDocument.o
-o /home/tdarugar/packages/xerces-c-src_1_1_0/bin/CreateDOMDocument
-L/home/tdarugar/packages/xerces-c-src_1_1_0/lib -lxerces-c1_1 -lc
/home/tdarugar/packages/xerces-c-src_1_1_0/lib/libxerces-c1_1.so:
undefined reference to `pthread_mutexattr_destroy'
/home/tdarugar/packages/xerces-c-src_1_1_0/lib/libxerces-c1_1.so:
undefined reference to `pthread_mutexattr_settype'
/home/tdarugar/packages/xerces-c-src_1_1_0/lib/libxerces-c1_1.so:
undefined reference to `pthread_mutexattr_init'
collect2: ld returned 1 exit
status                                                                                         
---------------------------------------

  It seems unhappy about pthreads. Which version are you using?
Mine looks to be /lib/libpthread-0.8.so, from the rpm glibc-2.1.2-11.

  Ignoring this, I attempted to build xerces-perl. It seems to
compile fine, but the tests fail. I tried just use XERCES;
and I got:

Can't load
'/usr/local/vgx/ve/perl5/site_perl/5.005/i586-linux/auto/XERCES/XERCES.so'
for module XERCES:
/usr/local/vgx/ve/perl5/site_perl/5.005/i586-linux/auto/XERCES/XERCES.so:
undefined symbol: __ti14BinInputStream at
/usr/local/vgx/ve/perl5/5.00503/i586-linux/DynaLoader.pm line 169.

  I'm not familiar with this one. Harmon, could you send some details 
on the versions of any and all things that might be relevant? Much
appreciated.

Best,

Parand Tony Darugar			tdarugar@velocigen.com
858-622-1164				High Performance Perl Server Pages
858-622-0303 fax			VelociGen XML Server
http://www.velocigen.com/		Confidential

Re: Submitted for your approval

Posted by "Parand T. Darugar" <td...@velocigen.com>.
Dear Harmon,

  Success! I had to make a couple of minor modificatios, including
linking the libxerces-c library into the Xerces.so file:

LDDLFLAGS = -shared -L/usr/local/lib
-L/home/tdarugar/packages/xerces-c-src_1_1_0/lib -lxerces-c1_1

  and including the Xerces-s src directory in the include path:

CCCDLFLAGS = -fpic -I/home/tdarugar/packages/xerces-c-src_1_1_0/src

  and I think that was about it. I'm using Redhat 6.1,
xerces-c-src_1_1_0,
egcs-1.1.2-24. I don't think the version of egcs or glibc make any
difference (earlier I thought it did).

  Anyway, it passes all 4 test now. I'm going to be play with it.
Thanks very much for the nice package.

Best,

Parand Tony Darugar			tdarugar@velocigen.com
858-622-1164				High Performance Perl Server Pages
858-622-0303 fax			VelociGen XML Server
http://www.velocigen.com/		

> Here's a more complete version of xerces-perl.  This has tests, but still
> no docs.  However, if you look at the tests, and the DOM API, you get an
> idea of how to use it all...