I turned on -verbose=template. Now I can see the various templates being
instantiated. This is confusing; I can see that the unreferenced symbols
during compilation of the samples are being instantiated during compilation
of the library.

For example, from the build logs I see the following from samples build:

Undefined                       first referenced
 symbol                             in file
xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>::RefHashTableOf(const
unsigned,const bool,xercesc_2_3::HashBase*,xercesc_2_3::MemoryManager*const)
/u/emdev/xerces/xerces-c-src_2_3_0/lib/libxerces-c.so


Yet, from the library build (with -verbose=template) I see that this is
being instantiated:


"ValueStoreCache.cpp", line 138: Information: Instantiating
xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>::RefHashTableOf(const
unsigned, const bool, xercesc_2_3::HashBase*,
xercesc_2_3::MemoryManager*const).



Build log for samples

Building SAXPrint
gmake -C SAXPrint 
gmake[1]: Entering directory
`/u/emdev/xerces/xerces-c-src_2_3_0/samples/SAXPrint'
mkdir -p /u/emdev/xerces/xerces-c-src_2_3_0/bin/obj/SAXPrint
CC -c -DSOLARIS -D_REENTRANT -pic -I.
-I/u/emdev/xerces/xerces-c-src_2_3_0/include -c -verbose=template  -w -O
-DAPP_NO_THREADS -DXML_USE_NO_THREADS   -o
/u/emdev/xerces/xerces-c-src_2_3_0/bin/obj/SAXPrint/SAXPrint.o
/u/emdev/xerces/xerces-c-src_2_3_0/samples/SAXPrint/SAXPrint.cpp
CC -c -DSOLARIS -D_REENTRANT -pic -I.
-I/u/emdev/xerces/xerces-c-src_2_3_0/include -c -verbose=template  -w -O
-DAPP_NO_THREADS -DXML_USE_NO_THREADS   -o
/u/emdev/xerces/xerces-c-src_2_3_0/bin/obj/SAXPrint/SAXPrintHandlers.o
/u/emdev/xerces/xerces-c-src_2_3_0/samples/SAXPrint/SAXPrintHandlers.cpp
CC -DSOLARIS  -L/usr/lib
/u/emdev/xerces/xerces-c-src_2_3_0/bin/obj/SAXPrint/SAXPrint.o
/u/emdev/xerces/xerces-c-src_2_3_0/bin/obj/SAXPrint/SAXPrintHandlers.o -o
/u/emdev/xerces/xerces-c-src_2_3_0/bin/SAXPrint
-L/u/emdev/xerces/xerces-c-src_2_3_0/lib -lxerces-c -lc -lgen 
Undefined                       first referenced
 symbol                             in file
xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>::RefHashTableOf(const
unsigned,const bool,xercesc_2_3::HashBase*,xercesc_2_3::MemoryManager*const)
/u/emdev/xerces/xerces-c-src_2_3_0/lib/libxerces-c.so
xercesc_2_3::Janitor<xercesc_2_3::RefVectorOf<xercesc_2_3::DatatypeValidator
> >::~Janitor() /u/emdev/xerces/xerces-c-src_2_3_0/lib/libxerces-c.so
xercesc_2_3::FlagJanitor<bool>::FlagJanitor(bool*const,const bool)
/u/emdev/xerces/xerces-c-src_2_3_0/lib/libxerces-c.so
xercesc_2_3::XMLRefInfo&xercesc_2_3::RefHashTableOfEnumerator<xercesc_2_3::X
MLRefInfo>::nextElement()
/u/emdev/xerces/xerces-c-src_2_3_0/lib/libxerces-c.so
void
xercesc_2_3::RefHash2KeysTableOf<xercesc_2_3::ValueVectorOf<xercesc_2_3::Sch
emaElementDecl*>
>::put(void*,int,xercesc_2_3::ValueVectorOf<xercesc_2_3::SchemaElementDecl*>
*const) /u/emdev/xerces/xerces-c-src_2_3_0/lib/libxerces-c.so
xercesc_2_3::RefHash2KeysTableOf<xercesc_2_3::SchemaAttDef>::~RefHash2KeysTa
bleOf() /u/emdev/xerces/xerces-c-src_2_3_0/lib/libxerces-c.so
void
xercesc_2_3::BaseRefVectorOf<xercesc_2_3::DOMNormalizer::InScopeNamespaces::
Scope>::addElement(xercesc_2_3::DOMNormalizer::InScopeNamespaces::Scope*cons
t) /u/emdev/xerces/xerces-c-src_2_3_0/lib/libxerces-c.so
unsigned xercesc_2_3::ValueVectorOf<unsigned>::size()const
/u/emdev/xerces/xerces-c-src_2_3_0/lib/libxerces-c.so
xercesc_2_3::Janitor<xercesc_2_3::RefHashTableOf<xercesc_2_3::KVStringPair>
>::Janitor(xercesc_2_3::RefHashTableOf<xercesc_2_3::KVStringPair>*const)
/u/emdev/xerces/xerces-c-src_2_3_0/lib/libxerces-c.so
xercesc_2_3::RefHashTableOfEnumerator<xercesc_2_3::Grammar>::~RefHashTableOf
Enumerator() /u/emdev/xerces/xerces-c-src_2_3_0/lib/libxerces-c.so

...


Build log for xerces shared library

CC -KPIC -mt -xs -ptr/u/emdev/xerces/xerces-c-src_2_3_0/obj/SOLARIS
-features=rtti -DSOLARIS -D_REENTRANT -c
-I/u/emdev/xerces/xerces-c-src_2_3_0/include
-I/u/emdev/xerces/xerces-c-src_2_3_0/src -verbose=template  -w -O
-DPROJ_XMLPARSER  -DPROJ_XMLUTIL  -DPROJ_PARSERS  -DPROJ_SAX4C  -DPROJ_SAX2
-DPROJ_DOM  -DPROJ_VALIDATORS -DXML_USE_NATIVE_TRANSCODER
-DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS
-DXML_USE_NETACCESSOR_SOCKET     -o
/u/emdev/xerces/xerces-c-src_2_3_0/obj/SOLARIS/ValueStoreCache.o
ValueStoreCache.cpp
"ValueStoreCache.cpp", line 129: Information: Instantiating
xercesc_2_3::RefHash2KeysTableOf<xercesc_2_3::ValueStore>::removeAll().
"ValueStoreCache.cpp", line 130: Information: Instantiating
xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>::removeAll().
"ValueStoreCache.cpp", line 131: Information: Instantiating
xercesc_2_3::BaseRefVectorOf<xercesc_2_3::ValueStore>::removeAllElements().
"ValueStoreCache.cpp", line 132: Information: Instantiating
xercesc_2_3::RefStackOf<xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>
>::removeAllElements().
"/u/emdev/xerces/xerces-c-src_2_3_0/include/xercesc/util/RefStackOf.c", line
148: Information: Instantiating
xercesc_2_3::BaseRefVectorOf<xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueS
tore>>::removeAllElements().
"ValueStoreCache.cpp", line 137: Information: Instantiating
xercesc_2_3::RefStackOf<xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>
>::push(xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>*const).
"/u/emdev/xerces/xerces-c-src_2_3_0/include/xercesc/util/RefStackOf.c", line
124: Information: Instantiating
xercesc_2_3::BaseRefVectorOf<xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueS
tore>>::addElement(xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>*cons
t).
"/u/emdev/xerces/xerces-c-src_2_3_0/include/xercesc/util/BaseRefVectorOf.c",
line 97: Information: Instantiating
xercesc_2_3::BaseRefVectorOf<xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueS
tore>>::ensureExtraCapacity(const unsigned).
"ValueStoreCache.cpp", line 138: Information: Instantiating
xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>::RefHashTableOf(const
unsigned, const bool, xercesc_2_3::HashBase*,
xercesc_2_3::MemoryManager*const).
"/u/emdev/xerces/xerces-c-src_2_3_0/include/xercesc/util/RefHashTableOf.c",
line 177: Information: Instantiating
xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>::initialize(const
unsigned).
"ValueStoreCache.cpp", line 149: Information: Instantiating
xercesc_2_3::RefStackOf<xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>
>::empty().
"/u/emdev/xerces/xerces-c-src_2_3_0/include/xercesc/util/RefStackOf.c", line
157: Information: Instantiating
xercesc_2_3::BaseRefVectorOf<xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueS
tore>>::size() const.
"ValueStoreCache.cpp", line 153: Information: Instantiating
xercesc_2_3::RefStackOf<xercesc_2_3::RefHashTableOf<xercesc_2_3::ValueStore>
>::pop().


...




-----Original Message-----
From: Graham Bennett [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 24, 2003 4:40 PM
To: [EMAIL PROTECTED]
Subject: Re: Xerces Build on Solaris

On Fri, Oct 24, 2003 at 08:12:06AM -0700, Witten, Kevin wrote:
> Thanks for the reply. I appreciate the help. I did see this posting but
I'm
> not sure what they mean by 'canonical paths' are not being used in the
> options passed to configure?

I think this was taken from one of my posts.  Are you building into some
kind of network filesystem?  If so try building on a local disk.
Basically the problem was solved in my case by changing the paths passed
to configure to be absolute instead of via a hierarchy of symlinks that
we have in place, which seemed to confuse template instantiation.

One thing I would suggest is to try enabling verbose flags on the
compiler (e.g. -verbose=template).  Otherwise there are various options
to force instantiation of templates which you could try (with care).

Also I was using version 6 of the compiler.

Hope that helps a little,

Graham.

-- 
Graham Bennett

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to