In file included from /var/tmp/portage/net-im/telegram-desktop-1.8.2/work/telegram-desktop-1.8.2/Telegram/SourceFiles/rpl/lifetime.h:10, from /var/tmp/portage/net-im/telegram-desktop-1.8.2/work/telegram-desktop-1.8.2/Telegram/SourceFiles/rpl/rpl.h:12, from /var/tmp/portage/net-im/telegram-desktop-1.8.2/work/telegram-desktop-1.8.2_build/Telegram_pch/stdafx.h:65, from <command-line>: /var/tmp/portage/net-im/telegram-desktop-1.8.2/work/telegram-desktop-1.8.2/Telegram/SourceFiles/base/unique_function.h: In instantiation of ‘base::unique_function<Return(Args ...)>::unique_function(Callable&&) [with Callable = ApiWrap::saveStickerSets(const Order&, const Order&)::<lambda(const RPCError&)>; <template-parameter-2-2> = void; Return = void; Args = {const RPCError&}]’: /var/tmp/portage/net-im/telegram-desktop-1.8.2/work/telegram-desktop-1.8.2/Telegram/SourceFiles/apiwrap.cpp:1993:5: required from here /var/tmp/portage/net-im/telegram-desktop-1.8.2/work/telegram-desktop-1.8.2/Telegram/SourceFiles/base/unique_function.h:101:2: internal compiler error: Segmentation fault 101 | } | ^ Portage 2.3.74 (python 3.6.9-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.2.0, glibc-2.29-r4, 5.2.10-gentoomelf x86_64) ================================================================= System uname: Linux-5.2.10-gentoomelf-x86_64-Intel-R-_Core-TM-_i5-2400_CPU_@_3.10GHz-with-gentoo-2.6 KiB Mem: 16368176 total, 5162016 free KiB Swap: 17825788 total, 17800444 free Timestamp of repository gentoo: Sun, 01 Sep 2019 15:45:01 +0000 Head commit of repository gentoo: 112d93e221777c61fd0cefa6ff9fa539497bc1fc Timestamp of repository libressl: Tue, 27 Aug 2019 17:27:44 +0000 Head commit of repository libressl: e78fac0b54ec5c63c61b00c4cc5512bb13f22448 Timestamp of repository mva: Sat, 31 Aug 2019 14:47:44 +0000 Head commit of repository mva: b055301bc591fa0137cc73477c8d8055f58e1296 Timestamp of repository rion: Sun, 18 Aug 2019 09:26:00 +0000 Head commit of repository rion: f29dd4f69d424fda91616bb7b63f66d10215a265 sh bash 5.0_p9 ld GNU ld (Gentoo 2.32 p2) 2.32.0 app-shells/bash: 5.0_p9::gentoo dev-lang/perl: 5.30.0::gentoo dev-lang/python: 2.7.16::gentoo, 3.6.9::gentoo, 3.7.4-r1::gentoo dev-util/cmake: 3.15.2::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/sandbox: 2.18::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.16.1-r1::gentoo sys-devel/binutils: 2.32-r1::gentoo sys-devel/gcc: 9.2.0::gentoo sys-devel/gcc-config: 2.0::gentoo sys-devel/libtool: 2.4.6-r5::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 5.2::gentoo (virtual/os-headers) sys-libs/glibc: 2.29-r4::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync1.ru.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: -4 sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes sync-rsync-verify-jobs: 1 libressl location: /var/db/repos/libressl sync-type: git sync-uri: https://github.com/gentoo-mirror/libressl.git masters: gentoo mva location: /var/db/repos/mva sync-type: git sync-uri: https://github.com/gentoo-mirror/mva.git masters: gentoo rion location: /var/db/repos/rion sync-type: git sync-uri: https://github.com/gentoo-mirror/rion.git masters: gentoo custom location: /usr/local/portage masters: gentoo priority: 70 Installed sets: @development, @fonts, @kdeapps, @python-extra ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE freedist linux-fw-redistributable linux-firmware no-source-code MPEG-4 unRAR CC-BY-NC-ND-3.0 intel-ucode Samsung-EULA bluez-firmware BitstreamCyberbit MSttfEULA grass-ipafonts free-noncomm bh-luxi" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -mtune=native " CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/ibus/component/simple.xml /var/lib/i2pd/certificates" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/openvpn/update-systemd-resolved /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native -mtune=native " DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--keep-going --quiet-build" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.bloodhost.ru/ http://mirror.yandex.ru/gentoo-distfiles/ http://mirror.leaseweb.com/gentoo/" INSTALL_MASK="/etc/init.d/ /etc/xinetd.d/ /etc/hosts /etc/networks" LANG="ru_RU.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_GB ru ja" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="-4" 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 a52 aac acl acpi activities alsa amd64 anthy berkdb bluetooth branding btrfs bzip2 cacert cairo cdda cdr cjk cli crypt cryptsetup cups cxx dbus declarative djvu dri dts dvd dvdr egl emboss encode exif fam ffmpeg flac fortran gdbm gif git glamor gpg gpm gstreamer gtk ibus iconv icu idn ipv6 jpeg kde kipi kwallet lcms libnotify libressl libtirpc lm_sensors mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds pulseaudio python qml qt5 raw readline samba scanner sdl seccomp spell split-usr ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb v4l vorbis wayland widgets wxwidgets x264 x265 xattr xcb xcomposite xml xv xvid 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="libressl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en en-GB ru ja" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86 AMDGPU" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python3_7" RUBY_TARGETS="ruby25" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="radeon r600 amdgpu radeonsi" 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, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Created attachment 588640 [details] build.log
I'd bet it is `-march=native -mtune=native` fault. They are not a [safe cflags](https://wiki.gentoo.org/wiki/Safe_CFLAGS).
Also, this can also be triggered by sounds of https://github.com/telegramdesktop/tdesktop/issues/5996 I'd suggest you to build tdesktop with: a) CFLAGS=-O0 (on commandline or in /etc/portage/env! DO NOT SET THIS in make.conf!!!) b) clang, as it works most of the time, while GCC builds works depends on the moon phase and tons of patches. Tdesktop developer uses Mac (so builds an app with clang himself) and only tests gcc-8 (with ubuntu patches) on travis. IIRC, at the time when I added a check about gcc-9.1.0 bug, gcc-9.2 was masked, but the upstream patch was already merged in svn, so I thought next release should have the patch included. Although, I'm not sure if gcc-9.2 has that bug fixed, so by trying path "a)" you can test if it is. By the way, compiler segfaults can be also caused by hardware corruption (although, if it was the reason, you'd get that not only on telegram).
CFLAGS=-O0 didn't help, I decided to switch to clang. By the way, why is setting it in make.conf considered bad? I can immediately revert it after emerge starts.