You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Berin Lautenbach <be...@wingsofhermes.org> on 2004/12/07 10:00:06 UTC

Problem with gcc 2.95.4

G'day all,

Has anyone seen the following with the latest CVS checkout on linux 
using gcc 2.95.4?

g++ -O2 -DNDEBUG     -Wall -fPIC -DLINUX -D_REENTRANT 
-DXALAN_INMEM_MSG_LOADER -c -I/export/autobuild/build/xml-xalan/src 
-I/export/autobuild/build/xml-xalan/include -I../../nls/include 
-I/export/autobuild/build/xml-xerces/src/ 
-I/export/autobuild/build/xml-xerces/include/xercesc 
-I/export/autobuild/build/xml-xerces/include/  -o 
../../obj/ResultNamespacesStack.o 
/export/autobuild/build/xml-xalan/src/xalanc/XSLT/ResultNamespacesStack.cpp
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_iterator.h: 
In function `ptrdiff_t distance<const xalanc_1_9::NameSpace *>(const 
xalanc_1_9::NameSpace *, const xalanc_1_9::NameSpace *)':
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_iterator.h:308:
  template instantiation depth exceeds maximum of 17

....  (many many many more lines of output)

/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_iterator.h:308:
   (use -ftemplate-depth-NN to increase the maximum)

.... (many many more)

If you increase -ftemplate-depth-NN it compiles (takes some time but 
works).  I don't see this problem on gcc 3.x (although I've only tried 
with a couple of versions.

I think it may need a test in configure, but I think it may be a bit of 
a bugger to write - although we could just try compiling this file I 
suppose :>.

Cheers,
	Berin


Re: Problem with gcc 2.95.4

Posted by da...@us.ibm.com.
> The number 17 comes from the standard (Annex B - Impl. Quantities) and 
is the
> minimum recommended limit (and in this case the default limit of the 
compiler).

Ahh, that explains it.  But it would be interesting to know the reasoning 
behind that number.

> It would not be a problem to create a test for this.  If a quick fix is
> required, I don't think it would cause any problems to just add it to 
the
> compile options for linux in our Makefile.incl. 

I did a quick Google search, and it looks like this is exacerbated by some 
problems with the standard library that ships with 2.95.x, because it can 
use up to 14 levels just by itself.  I'm not sure this is why we're having 
problems with 2.95.x, but I'd rather not just arbitrarily add the option. 
A more interesting question is how we can figure out what the minimum is. 
Maybe if it fails, we just bump it up to 50, or so?

Dave

Re: Problem with gcc 2.95.4

Posted by Matthew Hoyt <mh...@ca.ibm.com>.
Hi all,

The number 17 comes from the standard (Annex B - Impl. Quantities) and is 
the minimum recommended limit (and in this case the default limit of the 
compiler).

It would not be a problem to create a test for this.    If a quick fix is 
required, I don't think it would cause any problems to just add it to the 
compile options for linux in our Makefile.incl.

-Matt.





david_n_bertoni@us.ibm.com 
12/07/2004 11:36 AM
Please respond to
xalan-c-users


To
xalan-c-users@xml.apache.org
cc

Subject
Re: Problem with gcc 2.95.4






> G'day all,
> 
> Has anyone seen the following with the latest CVS checkout on linux 
> using gcc 2.95.4?

No, we've pretty much given up on 2.95.4.  I think Xerces-C is also 
problematic on that version as well, so we're probably not losing 
anything.

Are there still platforms where something in the 2.95.x series is the 
default compiler?

> If you increase -ftemplate-depth-NN it compiles (takes some time but 
> works).  I don't see this problem on gcc 3.x (although I've only tried 
> with a couple of versions.
> 
> I think it may need a test in configure, but I think it may be a bit of 
> a bugger to write - although we could just try compiling this file I 
> suppose :>.

I'm not sure how I would want to do this.  We can probably come up with a 
test file that instantiate a bunch of our new template classes just to 
push things past 17.  By the way, I wonder who chose _that_ magic number?

Matt, do you have an opinion?

Thanks!

Dave


Re: Problem with gcc 2.95.4

Posted by da...@us.ibm.com.
> G'day all,
> 
> Has anyone seen the following with the latest CVS checkout on linux 
> using gcc 2.95.4?

No, we've pretty much given up on 2.95.4.  I think Xerces-C is also 
problematic on that version as well, so we're probably not losing 
anything.

Are there still platforms where something in the 2.95.x series is the 
default compiler?

> If you increase -ftemplate-depth-NN it compiles (takes some time but 
> works).  I don't see this problem on gcc 3.x (although I've only tried 
> with a couple of versions.
> 
> I think it may need a test in configure, but I think it may be a bit of 
> a bugger to write - although we could just try compiling this file I 
> suppose :>.

I'm not sure how I would want to do this.  We can probably come up with a 
test file that instantiate a bunch of our new template classes just to 
push things past 17.  By the way, I wonder who chose _that_ magic number?

Matt, do you have an opinion?

Thanks!

Dave