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 John Merrells <me...@sleepycat.com> on 2003/11/05 16:36:51 UTC

link failure on os/x with xerces cvs revision

I just built Xerces from CVS on OS/X (10.2) with gcc3.3 and it compiled
ok, but my app didn't link. (It linked ok on RH9). I get these unresolved
symbols...

ld: Undefined symbols:
xercesc_2_3::XMLGrammarPoolImpl::getURIStringPool()
xercesc_2_3::XMLGrammarPoolImpl::getXSModel() const

..I note that they are both 'inline', and am wondering if this is an 
oddity of
os/x gcc. Is there anyone else working on this platform who can explain 
this,
or reassure me that Xerces does work ok on os/x.

John


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


Re: link failure on os/x with xerces cvs revision

Posted by James Berry <ja...@jberry.us>.
I'm the responsible party for the Mac OS X port, but confess I've been 
a little less than responsible of late.

A few notes:

	- As noted by somebody, the ProjectBuilder (and also CodeWarrior) 
projects haven't yet been brought up to date with late changes in the 
cvs. I'll be doing that soon. I'll may also commit an xcode project at 
the same time, though I hate to have too much of a proliferation of 
projects...feedback welcome.
	
	- I'll look more into the inline issue. I remember seeing other notes 
recently about problems with inline functions, though I don't remember 
if it was a xerces issue or on the darwin list. Those functions, 
however, probably shouldn't be marked inline, since they're used 
outside of their compilation unit.  I don't know what the C++ standard 
has to say about that...anyway, I suspect the right fix is to outline 
them.

	- Apart from these couple of issues surrounding recent changes, Xerces 
works great on Mac OS X.

James.


On Nov 5, 2003, at 7:36 AM, John Merrells wrote:

>
> I just built Xerces from CVS on OS/X (10.2) with gcc3.3 and it compiled
> ok, but my app didn't link. (It linked ok on RH9). I get these 
> unresolved
> symbols...
>
> ld: Undefined symbols:
> xercesc_2_3::XMLGrammarPoolImpl::getURIStringPool()
> xercesc_2_3::XMLGrammarPoolImpl::getXSModel() const
>
> ..I note that they are both 'inline', and am wondering if this is an 
> oddity of
> os/x gcc. Is there anyone else working on this platform who can 
> explain this,
> or reassure me that Xerces does work ok on os/x.
>
> John
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


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


Re: link failure on os/x with xerces cvs revision

Posted by Don Willems <do...@mac.com>.
Can't give you an answer but I too am very interested to learn how to 
build Xerces on OS X.
I've tried it with the provided ProjectBuilder project and that didn't work.

Don


> I just built Xerces from CVS on OS/X (10.2) with gcc3.3 and it compiled
> ok, but my app didn't link. (It linked ok on RH9). I get these unresolved
> symbols...
>
> ld: Undefined symbols:
> xercesc_2_3::XMLGrammarPoolImpl::getURIStringPool()
> xercesc_2_3::XMLGrammarPoolImpl::getXSModel() const
>
> ..I note that they are both 'inline', and am wondering if this is an 
> oddity of
> os/x gcc. Is there anyone else working on this platform who can 
> explain this,
> or reassure me that Xerces does work ok on os/x.
>
> John
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>



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


Re: link failure on os/x with xerces cvs revision

Posted by James Berry <ja...@jberry.us>.
This issue should now be resolved in cvs. Note that the fix was to 
remove several inlines as you suggest, and/or move them to .hpp. Neil 
and I patched this at almost the same instant, apparently.

-jdb

On Nov 5, 2003, at 7:36 AM, John Merrells wrote:

>
> I just built Xerces from CVS on OS/X (10.2) with gcc3.3 and it compiled
> ok, but my app didn't link. (It linked ok on RH9). I get these 
> unresolved
> symbols...
>
> ld: Undefined symbols:
> xercesc_2_3::XMLGrammarPoolImpl::getURIStringPool()
> xercesc_2_3::XMLGrammarPoolImpl::getXSModel() const
>
> ..I note that they are both 'inline', and am wondering if this is an 
> oddity of
> os/x gcc. Is there anyone else working on this platform who can 
> explain this,
> or reassure me that Xerces does work ok on os/x.
>
> John
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


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


Re: link failure on os/x with xerces cvs revision

Posted by John Merrells <me...@sleepycat.com>.
I edited out the 'inline' from those two methods and my linking
problem went away. So, I suspect there's some kind of issue
with gcc 3.3 on os/x here. Do they really need to be inline?...
Inline in the .cpp file. Kinda odd. Here's the diff.... I don't have
commit rights, so could someone with access check that this
change is correct, and commit it please?

John

Index: internal/XMLGrammarPoolImpl.cpp
===================================================================
RCS file: 
/home/cvspublic/xml-xerces/c/src/xercesc/internal/XMLGrammarPoolImpl.cpp,v
retrieving revision 1.8
diff -c -r1.8 XMLGrammarPoolImpl.cpp
*** internal/XMLGrammarPoolImpl.cpp     29 Oct 2003 16:16:08 -0000      1.8
--- internal/XMLGrammarPoolImpl.cpp     5 Nov 2003 17:39:26 -0000
***************
*** 212,218 ****
        return new (getMemoryManager()) 
XMLSchemaDescriptionImpl(targetNamespace, getMemoryManager());
  }
 
! inline XSModel *XMLGrammarPoolImpl::getXSModel() const
  {
      if(!fLocked)
          return 0;
--- 212,218 ----
        return new (getMemoryManager()) 
XMLSchemaDescriptionImpl(targetNamespace, getMemoryManager());
  }
 
! XSModel *XMLGrammarPoolImpl::getXSModel() const
  {
      if(!fLocked)
          return 0;
***************
*** 220,226 ****
      return 0;
  }
 
! inline XMLStringPool *XMLGrammarPoolImpl::getURIStringPool()
  {
      if(fLocked)
          return fSynchronizedStringPool;
--- 220,226 ----
      return 0;
  }
 
! XMLStringPool *XMLGrammarPoolImpl::getURIStringPool()
  {
      if(fLocked)
          return fSynchronizedStringPool;




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