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]
Also fails with 1.10.0 from bug 494214
Possible fix upstream: https://github.com/ukoethe/vigra/commit/da57c1ac2db0f8ae3593ad299ea36ef48883df80
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.
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.
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.
(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
(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.
(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