Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 506902 - media-libs/vigra-1.9.0 with sys-devel/clang-3.4 - .../work/vigra-1.9.0/include/vigra/accumulator.hxx:1445:54: fatal error: recursive template instantiation exceeded maximum depth of 256
Summary: media-libs/vigra-1.9.0 with sys-devel/clang-3.4 - .../work/vigra-1.9.0/includ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2014-04-06 10:26 UTC by Priit Laes (IRC: plaes)
Modified: 2016-09-07 18:24 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
vigra-1.9.0-build.log (build.log,125.43 KB, text/plain)
2014-04-06 10:26 UTC, Priit Laes (IRC: plaes)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Priit Laes (IRC: plaes) 2014-04-06 10:26:34 UTC
Created attachment 374366 [details]
vigra-1.9.0-build.log

When building vigra-1.9.0 with clang-3.4 following error happens:
[snip]
/var/tmp/portage/media-libs/vigra-1.9.0/work/vigra-1.9.0/include/vigra/accumulator.hxx:1445:54: fatal error: 
      recursive template instantiation exceeded maximum depth of 256
        static const int                     index = InternalBaseType::index + 1;
[/snip]
Comment 1 Priit Laes (IRC: plaes) 2014-04-06 10:50:51 UTC
Also fails with 1.10.0 from bug 494214
Comment 2 Priit Laes (IRC: plaes) 2014-09-16 06:02:23 UTC
Possible fix upstream: https://github.com/ukoethe/vigra/commit/da57c1ac2db0f8ae3593ad299ea36ef48883df80
Comment 3 Franz Trischberger 2015-09-24 05:44:12 UTC
Issue confirmed for both 1.9.0 and 1.10.0.
Adding -ftemplate-depth=900 to CXXFLAGS helps. This should also be OK for recent GCC versions, putting it into make.conf should not create failures. Nevertheless I appended it to CXXFLAGS in my package.env file already used to enable clang. Of course the best solution would be if this could be handled in the ebuild.
Comment 4 Fabio Scaccabarozzi 2016-01-25 20:35:49 UTC
This still happens with clang-3.7.1 as well, on both versions (1.9.0, 1.10.0).
Can we please backport the patch or add the required flag?
Please note that I had to use -ftemplate-depth=1800 in order to have it work, seems 900 wasn't enough.
Comment 5 Austin English (RETIRED) gentoo-dev 2016-06-16 18:59:06 UTC
Backporting the patch involves significant effort afaict. vigra-1.11.0 includes the patch, however, and compiles fine with no patching.

I'll make an ebuild and send a PR.
Comment 6 Austin English (RETIRED) gentoo-dev 2016-06-17 00:21:55 UTC
(In reply to Austin English from comment #5)
> Backporting the patch involves significant effort afaict. vigra-1.11.0
> includes the patch, however, and compiles fine with no patching.
> 
> I'll make an ebuild and send a PR.

https://github.com/gentoo/gentoo/pull/1691
Comment 7 Austin English (RETIRED) gentoo-dev 2016-07-21 18:48:57 UTC
(In reply to Austin English from comment #6)
> (In reply to Austin English from comment #5)
> > Backporting the patch involves significant effort afaict. vigra-1.11.0
> > includes the patch, however, and compiles fine with no patching.
> > 
> > I'll make an ebuild and send a PR.
> 
> https://github.com/gentoo/gentoo/pull/1691

dilfridge, mrueg, tamiko, ping.
Comment 8 Austin English (RETIRED) gentoo-dev 2016-09-07 18:24:12 UTC
(In reply to Austin English from comment #6)
> (In reply to Austin English from comment #5)
> > Backporting the patch involves significant effort afaict. vigra-1.11.0
> > includes the patch, however, and compiles fine with no patching.
> > 
> > I'll make an ebuild and send a PR.
> 
> https://github.com/gentoo/gentoo/pull/1691

https://github.com/gentoo/gentoo/commit/f10498150b680bafef1fb6887957f1bc0e9c2720