Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 600000 - dev-util/oprofile-1.1.0-r1: template instantiation depth exceeds maximum of 50
Summary: dev-util/oprofile-1.1.0-r1: template instantiation depth exceeds maximum of 50
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrew Savchenko
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-16 13:55 UTC by PM
Modified: 2016-11-23 17:14 UTC (History)
2 users (show)

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


Attachments
build log (build.log,69.22 KB, text/x-log)
2016-11-16 13:55 UTC, PM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PM 2016-11-16 13:55:17 UTC
Created attachment 453516 [details]
build log

This may be caused by GCC 6.2.0

In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/bits/move.h:57:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/bits/nested_exception.h:40,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/exception:171,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/ios:39,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/istream:38,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/sstream:38,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/complex:45,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/ccomplex:39,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/x86_64-pc-linux-gnu/bits/stdc++.h:52,
                 from <command-line>:0:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/type_traits: In instantiation of ‘struct std::is_object<std::_Tuple_impl<3ul, bool*>&>’:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/type_traits:120:12:   required from ‘struct std::__or_<std::is_object<std::_Tuple_impl<3ul, bool*>&>, std::is_reference<std::_Tuple_impl<3ul, bool*>&> >’
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/type_traits:627:12:   required from ‘struct std::__is_referenceable<std::_Tuple_impl<3ul, bool*>&>’
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/type_traits:1666:12:   required from ‘struct std::add_rvalue_reference<std::_Tuple_impl<3ul, bool*>&>’
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/type_traits:2257:5:   required by substitution of ‘template<class _Tp> typename std::add_rvalue_reference< <template-parameter-1-1> >::type std::declval() [with _Tp = std::_Tuple_impl<3ul, bool*>&]’
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/type_traits:777:61:   required by substitution of ‘template<class _Tp, class> static std::true_type std::__do_is_destructible_impl::__test(int) [with _Tp = std::_Tuple_impl<3ul, bool*>; <template-parameter-1-2> = <missing>]’
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/type_traits:788:35:   [ skipping 39 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/type_traits:1231:12:   required from ‘struct std::__is_nothrow_move_constructible_impl<std::_Tuple_impl<1ul, std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()>*, bool*>, true>’
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/type_traits:1237:12:   required from ‘struct std::is_nothrow_move_constructible<std::_Tuple_impl<1ul, std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()>*, bool*> >’
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/type_traits:143:12:   required from ‘struct std::__and_<std::is_nothrow_move_constructible<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()>*, bool*)> >, std::is_nothrow_move_constructible<std::_Tuple_impl<1ul, std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()>*, bool*> > >’
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/tuple:218:7:   required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 0ul; _Head = std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()>*, bool*)>; _Tail = {std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()>*, bool*}]’
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/mutex:608:41:   required from ‘void std::call_once(std::once_flag&, _Callable&&, _Args&& ...) [with _Callable = void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()>*, bool*); _Args = {std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()>*, bool*}]’
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/future:393:57:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/type_traits:590:12: fatal error: template instantiation depth exceeds maximum of 50 (use -ftemplate-depth= to increase the maximum)
     struct is_object
            ^~~~~~~~~



Portage 2.3.2 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, gcc-6.2.0, glibc-2.23-r3, 4.8.8-gentoo x86_64)
=================================================================
System uname: Linux-4.8.8-gentoo-x86_64-Intel-R-_Core-TM-_i7-4790K_CPU_@_4.00GHz-with-gentoo-2.3
KiB Mem:    16347068 total,  13824652 free
KiB Swap:    4095996 total,   4095996 free
Timestamp of repository gentoo: Wed, 16 Nov 2016 13:00:01 +0000
sh bash 4.4_p5
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p5::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/cmake:           3.7.0::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.3-r1::gentoo
sys-apps/sandbox:         2.11-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.4_p6-r2::gentoo, 1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo, 2.27::gentoo
sys-devel/gcc:            6.2.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.8::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

dupa
    location: /usr/local/portage/moje
    masters: gentoo
    priority: 0

multimedia
    location: /var/lib/layman/multimedia
    masters: gentoo
    priority: 50

qt
    location: /var/lib/layman/qt
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

sunrise
    location: /var/lib/layman/sunrise
    masters: gentoo
    priority: 50

Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=native -pipe -fno-delete-null-pointer-checks -flifetime-dse=1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O3 -march=native -pipe -fno-delete-null-pointer-checks -flifetime-dse=1"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --quiet-build=n --autounmask-write"
FCFLAGS="-O3 -march=native -pipe -fno-delete-null-pointer-checks -flifetime-dse=1"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O3 -march=native -pipe -fno-delete-null-pointer-checks -flifetime-dse=1"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ http://mirror.leaseweb.com/gentoo/ http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/"
LANG="pl_PL.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X Xaw3d a52 aac aalib acl acpi adobe-cff aes alsa amd64 amr amrnb amrwb apng async audiofile automount avahi avresample avx avx2 bash-completion berkdb bfq bidi bineditor bluetooth bluray branding bzip2 c++0x cairo cdda cddb cdparanoia chdir clang clangcodemodel clangstaticanalyzer cli consolekit cracklib crypt css cuda cups curl cxx dbus dirac disk-partition divx djvu dri dts dvd dvdr ebook editor efi emboss emovix enca encode exchange exif faac faad fam fat fdk ffmpeg fftw firefox firefox3 flac fma3 fontconfig fortran fribidi g3dvl gd gdbm geoip gif glamor glitz gmedia gnuplot gold gphoto2 gpm gtk gtkstyle hddtemp iconv id3 id3tag imagemagick inotify iostats ipod ipv6 jpeg kde4 kdehiddenvisibility kipi kompare kpathsea kqemu ladspa lame laptop lastfm latex lcms libass libcaca libnotify libsamplerate lldb lm_sensors lto lzma lzo mad matroska midi mjpeg mmap mmx mmxext mng modules moodbar mp3 mp3tunes mp4 mpeg mplayer mtp multilib musicbrainz ncurses networkmanager nls notebook nptl nsplugin ntfs nvidia ogg okteta openal opencl opencore-amr opengl openmp optimized-qmake opus pam pango pch pcre pdf png policykit popcnt portage ppds private-headers pulseaudio python3 qt3 qt3support qt4 qt5 qthelp raster readline realmedia roe scanner schroedinger sdl seccomp secure-delete semantic-desktop sensord session shaders slang sndfile solver soundtouch sourceview sparse spell sse sse2 sse3 sse4 sse41 sse4_1 sse4a ssl ssse3 startup-notification steamruntime suid svg swat symlink syslog tcpd theora threads tiff truetype udev udisks unicode upnp upower usb vaapi vamp vcd vdpau vorbis wifi wmf wmp wxwidgets wxwindows x264 xattr xcb xcomposite xml xscreensaver xv xvid xvmc zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4 sse4_2 sse41 sse4_1 sse42 sse4a aes avx avx2 fma3 popcnt" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="pl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 PM 2016-11-16 13:56:14 UTC
Bug 600000! Do I win something?
Comment 2 Jan-Matthias Braun 2016-11-17 20:38:23 UTC
Hi!

(In reply to PM from comment #1)
> Bug 600000! Do I win something?

Sorry, not that I know of. :-)

On my system, I was able to emerge oprofile with USE="-pch". So, the issue seems to be connected to precompiled headers.

Cheerio!

Jan
Comment 3 PM 2016-11-18 22:07:22 UTC
(In reply to Jan-Matthias Braun from comment #2)

> On my system, I was able to emerge oprofile with USE="-pch". So, the issue
> seems to be connected to precompiled headers.

I can confirm that, builds fine with USE=-pch.
Comment 4 Andrew Savchenko gentoo-dev 2016-11-21 14:37:13 UTC
Can you build any other package with USE=pch and gcc-6.x on your system?

And yeah, bug ID 600000 is a total win. Never thought it will be assigned to me :)
Comment 5 Jan-Matthias Braun 2016-11-21 16:26:55 UTC
(In reply to Andrew Savchenko from comment #4)
> Can you build any other package with USE=pch and gcc-6.x on your system?

First up, I am using gcc-6, too.

And yes, everything else seems to work. As far as I can remember, I only had problems with a *reinstall* of oprofile-1.1.0-r1. I.e., I suspect, that it even compiled well once, but I am not 100 % sure of this.

To make sure, I recompiled p7zip and ncftp, but all packages with USE="pch" have recompiled quite well since installing gcc-6.

It seems kind of funny that the template instantiation depth only hits us when using precompiled headers.
Comment 6 PM 2016-11-21 16:28:43 UTC
Same here, everything I tried with USE=pch builds fine, except oprofile.
Comment 7 Jan-Matthias Braun 2016-11-21 16:35:15 UTC
(In reply to Jan-Matthias Braun from comment #5)
[…]
> And yes, everything else seems to work. As far as I can remember, I only had
> problems with a *reinstall* of oprofile-1.1.0-r1. I.e., I suspect, that it
> even compiled well once, but I am not 100 % sure of this.

Hi again. I checked and now I am 100 % sure that it never compiled with gcc-6 on my system. Please excuse my erroneous insertion above.
I started experimenting with gcc-6.2.0, so I have nothing to say about earlier versions of gcc-6.
Comment 8 PM 2016-11-21 17:39:46 UTC
I checked that it builds fine with clang 3.9.
Comment 9 Andrew Savchenko gentoo-dev 2016-11-21 22:43:36 UTC
Fixed with commit 4ea581785bda37bc01a20fbf5095c087e3bcda26 for oprofile-1.1.0-r1.

Problem was caused by -ftemplate-depth-50 enforced by oprofile's configure script if compiler supports this option, while default g++ value is 900 so other packages build fine. clang has no support for -ftemplate-depth, thus it build package fine too. As for why it fired on gcc-6.2, it is likely induced by some change in stdc++ library which increased total template depth for > 50.
Comment 10 Jan-Matthias Braun 2016-11-22 08:27:16 UTC
(In reply to Andrew Savchenko from comment #9)
> Fixed with commit 4ea581785bda37bc01a20fbf5095c087e3bcda26 for
> oprofile-1.1.0-r1.
> 
> Problem was caused by -ftemplate-depth-50 enforced by oprofile's configure
> script if compiler supports this option, while default g++ value is 900 so
> other packages build fine. clang has no support for -ftemplate-depth, thus
> it build package fine too. As for why it fired on gcc-6.2, it is likely
> induced by some change in stdc++ library which increased total template
> depth for > 50.

Great. Thanks!