You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Norm Samuelson <nh...@llnl.gov> on 2004/08/24 18:56:30 UTC

static build of Xerces

I got tired of waiting for someone to come up with a solution to building a 
static version of the xerces library.  I set aside some time and looked 
into the problem for myself, with the help of a colleague who worked on the 
Windows version.

There are a couple of problems with shared libraries.  First, it annoys 
users if they have to specify LD_LIBRARY_PATH.  There is a simple 
work-around for that, specifying -R followed by the same path used in -L 
when linking the code causes it to remember the path at runtime.  (actually 
it is not quite that simple, it is -R on some machines, -rpath on others, 
and on AIX systems, -brtl (without the path)).

The second problem is tougher.  We have a major new machine coming in soon, 
Blue Gene Light, from IBM.  Our understanding is that the lightweight 
kernel running on each of the nodes will NOT support shared libraries.

So, we have been looking at what is required to build a static version of 
the library.  That too is a bit of a pain.  On many Unix machines, you 
cannot simply us the "ar" utility to build an archive file for C++ code 
that includes templates.  It turns out that on those machines you need to 
invoke the linker, much as is done to build the shared library.  On some 
machines it is "CC -ar -o libxerces.a ...", on others "CC -xar -o 
libxerces.a ...".

We have built a static Xerces library on Solaris and on Windows.  We will 
be building it soon on AIX, IRIX, and TRU64 machines.  I would be happy to 
submit the changes in the makefiles needed to build the static version for 
each of those platforms, with the hope that it will be included with future 
releases of Xerces.


- Norm -

Norman H. Samuelson                         nhs@llnl.gov
Lawrence Livermore National Lab      925-422-0661
P.O. Box 808, L-98
Livermore, CA 94551  


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: static build of Xerces

Posted by Gareth Reakes <ga...@parthenoncomputing.com>.
Hi,

> We have built a static Xerces library on Solaris and on Windows.  We 
> will be building it soon on AIX, IRIX, and TRU64 machines.  I would be 
> happy to submit the changes in the makefiles needed to build the static 
> version for each of those platforms, with the hope that it will be 
> included with future releases of Xerces.

Thats great, this is a frequently asked question. Give me a mail if I 
can help.


Gareth


-- 
Gareth Reakes, Managing Director      Parthenon Computing
+44-1865-811184                  http://www.parthcomp.com

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org