Issue 26518 - chart2 and template instantiation depth exceeds maximum of 50
Summary: chart2 and template instantiation depth exceeds maximum of 50
Status: CLOSED WONT_FIX
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Linux, all
: P2 Trivial (vote)
Target Milestone: ---
Assignee: Martin Hollmichel
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-15 21:45 UTC by pavel
Modified: 2013-02-24 21:19 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
*Wrong* patch that made it compile to demonstrate problem (8.27 KB, patch)
2004-03-15 21:47 UTC, pavel
no flags Details | Diff
patch for gcc3.0 (compiler-flags in makefiles) (1.08 KB, patch)
2004-03-18 09:26 UTC, bjoern.milcke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2004-03-15 21:45:35 UTC
Hi,

gcc 3.0.4 gives me this message:

Making: ../../../unxlngi4.pro/slo/ChartTypeManager.obj
/home/oo/BuildDir/ccache /opt/experimental/bin/g++ -fmessage-length=0 -c -I. 
-I. -I../inc -I../../../source/inc -I../../../inc -I../../../unx/inc
-I../../../unxlngi4.pro/inc -I.
-I/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/solver/680/unxlngi4.pro/inc/stl
-I/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/solver/680/unxlngi4.pro/inc/external
-I/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/solver/680/unxlngi4.pro/inc
-I/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/solenv/unxlngi4/inc
-I/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/solenv/inc
-I/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/res
-I/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/solver/680/unxlngi4.pro/inc/stl
-I/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/solenv/inc/Xp31
-I/usr/lib/java/include -I/usr/lib/java/include/linux
-I/usr/lib/java/include/native_threads/include -I/usr/X11R6/include     -I.
-I../../../res -I. -O1   -pipe -mcpu=pentiumpro -fno-rtti -include preinclude.h
-fexceptions -fno-enforce-eh-specs   -fpic -DLINUX -DUNX -DVCL -DGCC -DC300
-DINTEL -DGXX_INCLUDE_PATH=/opt/experimental/include/g++-v3 -DCVER=C300
-D_USE_NAMESPACE -DGLIBC=2 -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR
-D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 -D__DMAKE -DUNIX -DCPPU_ENV=gcc3
-DSUPD=680 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE
-DEXCEPTIONS_ON -DCUI -DSOLAR_JAVA -DSRC680   -DSHAREDLIB -D_DLL_  -DMULTITHREAD
 -o ../../../unxlngi4.pro/slo/ChartTypeManager.o
/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/chart2/source/model/template/ChartTypeManager.cxx
In file included from ../../../source/inc/InlineContainer.hxx:141,
... many same lines deleted...
                 from ../../../source/inc/InlineContainer.hxx:141,
                 from
/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/solver/680/unxlngi4.pro/inc/stl/stl/_map.h:133,
                 from
/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/chart2/source/model/template/ChartTypeManager.cxx:352:
../../../source/inc/InlineContainer.hxx:141: template instantiation depth
exceeds maximum of 50 (use -ftemplate-depth-NN to increase the maximum)
instantiating `comphelper::MakeMap<Key, Value>& comphelper::MakeMap<Key,
Value>::operator()(const Key&, const Value&) [with Key = rtl::OUString, Value =
<unnamed>::TemplateId]'
../../../source/inc/InlineContainer.hxx:141:   instantiated from
`comphelper::MakeMap<Key, Value>& comphelper::MakeMap<Key,
Value>::operator()(const Key&, const Value&) [with Key = rtl::OUString, Value =
<unnamed>::TemplateId]'
...
../../../source/inc/InlineContainer.hxx:141:   instantiated from
`comphelper::MakeMap<Key, Value>& comphelper::MakeMap<Key,
Value>::operator()(const Key&, const Value&) [with Key = rtl::OUString, Value =
<unnamed>::TemplateId]'
../../../source/inc/InlineContainer.hxx:141:   instantiated from
`comphelper::MakeMap<Key, Value>& comphelper::MakeMap<Key,
Value>::operator()(const Key&, const Value&) [with Key = rtl::OUString, Value =
<unnamed>::TemplateId]'
/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/solver/680/unxlngi4.pro/inc/stl/stl/_map.h:133:
  instantiated from `_STL::map<_Key, _Tp, _Compare, _Alloc>::map(const
_STL::map<_Key, _Tp, _Compare, _Alloc>&) [with _Key = rtl::OUString, _Tp =
<unnamed>::TemplateId, _Compare = _STL::less<rtl::OUString>, _Alloc =
_STL::allocator<_STL::pair<const rtl::OUString, <unnamed>::TemplateId> >]'
/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/chart2/source/model/template/ChartTypeManager.cxx:352:
  instantiated from here
dmake:  Error code 1, while making '../../../unxlngi4.pro/slo/ChartTypeManager.obj'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making
/home/oo/BuildDir/ooo_cws_src680_ooo20040329_src/chart2/source/model/template
dmake:  Error code 1, while making 'build_all'

./chart2/source/controller/dialogs/dlg_ChartType.cxx
./chart2/source/model/template/ChartTypeManager.cxx

Commenting several lines "helped" (at least to finish the compilation). Attached
patch to demonstrate *WRONG* solution.
Comment 1 pavel 2004-03-15 21:47:34 UTC
Created attachment 13827 [details]
*Wrong* patch that made it compile to demonstrate problem
Comment 2 kla 2004-03-16 09:42:36 UTC
for you
Comment 3 IngridvdM 2004-03-16 12:22:21 UTC
please have a look.
Comment 4 IngridvdM 2004-03-16 13:55:55 UTC
.
Comment 5 bjoern.milcke 2004-03-16 14:43:31 UTC
CC to mh
Comment 6 bjoern.milcke 2004-03-16 14:47:44 UTC
Note: What is compiled here is not really a nested template. It is a
template-object for which the operator() is called in a nested way.  gcc 3.2
also compiles with -ftemplate-depth-17, so I assume that the expression is
parsed differently in both compilers (and IMO in 3.2 in a more correct way).

Should also work with 3.0 when setting -ftemplate-depth-64 (Something bigger
than 57).
Comment 7 Martin Hollmichel 2004-03-16 15:33:27 UTC
mh->pavel: what about conditional extend of CFLAGS+=-ftemplate-depth-64 for
SHORTSTDCPP3=="3" in the makefile.mk ?
better way would be the upgrade of the compiler, if we'll get to many problems
like that, we might consider to drop 3.0.x support for 2.0.
Comment 8 pavel 2004-03-16 19:13:09 UTC
mh: this kind of ideas will come to my mind only if I'm going to hear that the
code is written in the only correct way :-)

I do not know C++ to such extend to judge it myself.
Comment 9 pavel 2004-03-17 17:01:01 UTC
I can not solve this issue.

We can abandon gcc 3.0.4 or fix it. I can't do any of those :-)
Comment 10 bjoern.milcke 2004-03-18 09:26:44 UTC
Created attachment 13893 [details]
patch for gcc3.0 (compiler-flags in makefiles)
Comment 11 bjoern.milcke 2004-03-18 09:28:21 UTC
Hi Pavel, could you please check whether the added patch works with gcc3.0.4. If
so, I would suggest to apply the patch in a recent CWS.
Comment 12 pavel 2004-03-18 21:27:15 UTC
I checked this patch and

chart2/source/controller/dialogs/makefile.mk needs at least 67
chart2/source/model/template/makefile.mk needs at least 66

Hmm 8) Why different value (it really is different, I double checked)?

See
ftp://ftp.linux.cz/pub/localization/OpenOffice.org/devel/build/Patches/OOo_cws_src680_ooo20040329_source-TEMP-chart2.diff
I will use this patch for now, but do you plan to add more "entries" there? If
yes, I should use higher value here.

Hmm, this is really GCC's bug and I think it is not worth the effort to put in
cws and we should deprecate 3.0.4. It should have been only for gcc, only for
specific version, in two files. Now, but in the future, we will find other issues.

And it is not worth the effort. I will continue to use it for 1.1.x but will
upgrade to newer version for 2.0.

Thanks for your help!

Martin, reassigning to you to finally decide.
Comment 13 Martin Hollmichel 2004-03-26 15:32:47 UTC
this seems a compiler issue, even 2.95 is working :).
so I will have to announce 3.0.x compiler as deprecated for 2.0 development.
Comment 14 sander_traveling 2004-04-21 12:08:44 UTC
verifying
Comment 15 Martin Hollmichel 2005-04-08 13:52:47 UTC
close issue.