When installing a package and compilation fails, the build log is corrupted. Compiling with ebuild compile produces a correct log file. Reproducible: Always $ emerge --info sys-apps/portage Portage 3.0.17 (python 3.9.1-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-10.2.0, glibc-2.32-r8, 5.11.6-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.11.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-4810MQ_CPU_@_2.80GHz-with-glibc2.32 KiB Mem: 32799616 total, 1278972 free KiB Swap: 50331644 total, 39604636 free Head commit of repository gentoo: a6413b2f09c01a845c1d1af3f20aa30de1ff27b4 Head commit of repository 4nykey: 4a0d32a7d87d5a3b397db14dcae77674a1420755 Head commit of repository bobwya: d562b8a253777868680272005802b5a0d5ff28fd Head commit of repository cg: 7f627298b67f2db05deba16ba9f948fb75c9215d Head commit of repository dotnet: e1634257ae43e8832f88631c6f63c066e4a1d1a5 Head commit of repository gamerlay: 672b58f4592f6c6f2fd3a568d7e7529b5ebb27c7 Head commit of repository guru: ba2cb4bb35a3edcf3099c1524e1f7ed353a01ab3 Head commit of repository haarp: e97de4a7e83a142f405c64d9f6bbda7da7dbc50a Head commit of repository interactive-fiction: 31b83c15417dfbee38ad1ca05908ee6696953b18 Head commit of repository kde: 2666b691ae15525ada4dcd4bcbb29be7818d8f6d Head commit of repository lto-overlay: aba78870f54212703b769109cf6b31ec48ac2d79 Head commit of repository mv: 44378f7460872c19effa2832303e9f7a8a0f0e04 Head commit of repository pg_overlay: 4ef1321d57257cf356f061570c21e0bc47b74439 Head commit of repository qt: 8419ef9dd4ed9bf4be9feffa56f92d2165cfa0e2 Head commit of repository science: c7f828d9796a780e7a3fe492fdca5869ee3990a5 Head commit of repository steam-overlay: 6cf36b792b1b8c1301dd7a9a9c468c78e95960a2 Head commit of repository wjn-overlay: d85f911f2e8b9a5b13fc6762644d575e6bb4901d Head commit of repository x11: 308a1716b7915e524a73298e0751d7ab4bf8d76f sh bash 5.1_p4 ld GNU ld (Gentoo 2.35.2 p1) 2.35.2 app-shells/bash: 5.1_p4::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.32.1::gentoo dev-lang/python: 2.7.18-r100::lto-overlay, 3.7.9-r1::lto-overlay, 3.8.7-r1::lto-overlay, 3.9.1-r1::lto-overlay, 3.10.0_alpha3-r1::lto-overlay dev-util/cmake: 3.19.7::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.7-r1::gentoo sys-apps/sandbox: 2.21::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo, 2.71::gentoo sys-devel/automake: 1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.3-r1::gentoo sys-devel/binutils: 2.35.2::gentoo sys-devel/gcc: 10.2.0-r5::gentoo sys-devel/gcc-config: 2.4::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r8::gentoo Repositories: gentoo location: /var/portage/gentoo sync-type: git sync-uri: git://anongit.gentoo.org/repo/gentoo.git priority: -1000 4nykey location: /var/portage/repository/4nykey sync-type: git sync-uri: https://github.com/4nykey/4nykey.git masters: gentoo priority: 50 bobwya location: /var/portage/repository/bobwya sync-type: git sync-uri: https://github.com/bobwya/miscellaneous_ebuilds.git masters: gentoo priority: 50 cg location: /var/portage/repository/cg sync-type: git sync-uri: https://github.com/brothermechanic/cg.git masters: gentoo priority: 50 dotnet location: /var/portage/repository/dotnet sync-type: git sync-uri: git://anongit.gentoo.org/proj/dotnet.git masters: gentoo priority: 50 gamerlay location: /var/portage/repository/gamerlay sync-type: git sync-uri: git://anongit.gentoo.org/proj/gamerlay.git masters: gentoo priority: 50 guru location: /var/portage/repository/guru sync-type: git sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git masters: gentoo priority: 50 haarp location: /var/portage/repository/haarp sync-type: git sync-uri: https://anongit.gentoo.org/git/user/haarp.git masters: gentoo priority: 50 interactive-fiction location: /var/portage/repository/interactive-fiction sync-type: git sync-uri: git://repo.or.cz/gentoo-interactive-fiction.git masters: gentoo priority: 50 kde location: /var/portage/repository/kde sync-type: git sync-uri: git://anongit.gentoo.org/proj/kde.git masters: gentoo priority: 50 lto-overlay location: /var/portage/repository/lto-overlay sync-type: git sync-uri: https://github.com/InBetweenNames/gentooLTO.git masters: gentoo mv priority: 50 mv location: /var/portage/repository/mv sync-type: git sync-uri: https://anongit.gentoo.org/git/user/mv.git masters: gentoo priority: 50 pg_overlay location: /var/portage/repository/pg_overlay sync-type: git sync-uri: https://github.com/perfect7gentleman/pg_overlay.git masters: gentoo priority: 50 qt location: /var/portage/repository/qt sync-type: git sync-uri: git://anongit.gentoo.org/proj/qt.git masters: gentoo priority: 50 science location: /var/portage/repository/science sync-type: git sync-uri: https://anongit.gentoo.org/git/proj/sci.git masters: gentoo priority: 50 steam-overlay location: /var/portage/repository/steam-overlay sync-type: git sync-uri: git://github.com/anyc/steam-overlay.git masters: gentoo priority: 50 wjn-overlay location: /var/portage/repository/wjn-overlay sync-type: git sync-uri: https://bitbucket.org/wjn/wjn-overlay.git masters: gentoo priority: 50 x11 location: /var/portage/repository/x11 sync-type: git sync-uri: git://anongit.gentoo.org/proj/x11 masters: gentoo priority: 50 my-gentoo location: /var/portage/repository/my-gentoo masters: gentoo priority: 80 xanf location: /home/eugene/develop/xanf/distribution/Gentoo/repository masters: gentoo priority: 80 Installed sets: @system ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE @FREE @EULA 2dboy-EULA xv CC-Sampling-Plus-1.0 GPL2 as-is ValveSteamLicense unRAR bakoma fairuse Skype-TOS Zarf CDF android szip freedist MPEG-4 intel-ucode AVASYS linux-fw-redistributable no-source-code bh-luxi free-noncomm MSttfEULA NVIDIA-r1 GPL LPPL CC-BY-NC-4.0 OSGi-Specification-2.0 sun-jsr67 JasPer2.0 Amazon-EULA all-rights-reserved MS-vscode-EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O3 -fgraphite-identity -floop-nest-optimize -flto=4 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf /usr/share/themes/oxygen-gtk/gtk-2.0" 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="-march=native -O3 -fgraphite-identity -floop-nest-optimize -flto=4 -pipe" DISTDIR="/var/portage/distfiles" EMERGE_DEFAULT_OPTS="--quiet-build --keep-going" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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 binpkg-multi-instance cgroup collision-protect compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://de-mirror.org/gentoo/" LANG="en_IE.UTF-8" LDFLAGS="-Wl,--as-needed -Wl,--hash-style=gnu" LINGUAS=" en en_GB eo de uk ru" MAKEOPTS="-j4" PKGDIR="/var/portage/packages" PORTAGE_COMPRESS="xz" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--quiet" 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/portage/tmp" USE="X a52 aac acl acpi activities alsa amd64 amr apng attica avahi bash-completion berkdb bluetooth bluray branding bs2b btrfs bzip2 cairo canberra caps cdda cdr chromaprint cli colord crypt css cups dbus declarative designer dirac djvu dovecot dri dts dv dvd dvdnav dvdr efi egl elfutils emacs emboss encode exif faac ffmpeg flac font_types_otf fontconfig fortran fuse gdbm geoip gif git gmp gnuplot gnutls gold gpm gsm gstreamer gtk gtk3 gui harfbuzz iconv icu idn ieee1394 imagemagick inotify iproute2 ipv6 jemalloc jit jpeg jpeg2k kde kerberos kipi kwallet lame lapack latex lcms libass libglvnd libinput libnotify libsamplerate libsecret libtirpc live lm-sensors lto luajit luatex lzma mad metalink mng mp3 mp4 mpeg mpi mpris mtp multicall multilib ncurses netlink network networkmanager nfs nftables nls nptl ogg openexr opengl openmp openssl pam pango pch pcre pdf phonon pkcs11 plasma png policykit postscript ppds pulseaudio qml qrcode qt5 quicktime quvi radio readline romio rss rtmp samba scanner sctp sdl seccomp semantic-desktop slp smp speex spell split-usr sqlite ssl startup-notification svg symlink system-icu system-sqlite systemd taglib tcpd theora threads thumbnail tiff truetype udev udisks unicode upnp upower usb v4l v4l2 vaapi vdpau vim-syntax vorbis vpx vulkan wayland webengine webp widgets wifi x264 x265 xattr xcb xcomposite xetex xft xinerama xml xmp xrandr xv xvid yv12 zeroconf zlib zsh-completion zstd" ABI_X86="64" ADA_TARGET="gnat_2018" 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 proxy" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="canon ptp2 fuji" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="garmin garmintxt gpsclock timing" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="libinput evdev libinput" KERNEL="linux" L10N="en en-GB eo de uk ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer nlpsolver" LIRC_DEVICES="alsa_usb" LUA_SINGLE_TARGET="lua5-2" LUA_TARGETS="lua5-2" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby27 ruby30" SANE_BACKENDS="epson2 net" USERLAND="GNU" VIDEO_CARDS="v4l radeon radeonsi intel i965 amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS ================================================================= Package Settings ================================================================= sys-apps/portage-3.0.17-r2::gentoo was built with the following: USE="gentoo-dev (ipc) native-extensions rsync-verify xattr -apidoc -build -doc (-selinux) -test" ABI_X86="(64)" PYTHON_TARGETS="python3_9 -pypy3 -python3_7 -python3_8" CFLAGS="-march=native -O3 -fgraphite-identity -floop-nest-optimize -flto=4 -pipe -Wl,--as-needed -Wl,--hash-style=gnu" CXXFLAGS="-march=native -O3 -fgraphite-identity -floop-nest-optimize -flto=4 -pipe -Wl,--as-needed -Wl,--hash-style=gnu" FEATURES="usersandbox network-sandbox ipc-sandbox news usersync protect-owned userpriv unknown-features-warn strict-keepdir config-protect-if-modified assume-digests xattr splitdebug binpkg-multi-instance merge-sync unmerge-logs preserve-libs userfetch cgroup qa-unresolved-soname-deps pid-sandbox ebuild-locks distlocks binpkg-logs unmerge-orphans collision-protect parallel-fetch fixlafiles sfperms binpkg-docompress strict multilib-strict binpkg-dostrip sandbox" LDFLAGS="-Wl,--as-needed -Wl,--hash-style=gnu -march=native -O3 -fgraphite-identity -floop-nest-optimize -flto=4 -pipe"
Created attachment 693267 [details] sample build log with errors
What do you mean corrupted? Are you referring to ansi colors? You can strip those using something like app-text/ansifilter
I don't know, maybe ANSI color sequences are to blame. My less can't show content around error in the log file left after emerge, but is able to do that with the file from ebuild (also with color sequences).
less -R
less -R shows the same crappy output, less -r is less corrupted, but still impossible to read errors.
(In reply to Eugene Shalygin from comment #5) > less -R shows the same crappy output, less -r is less corrupted, but still > impossible to read errors. Looks funky through a pager for me, but `cat`ing it straight into a terminal looks fine. It seems the characters the package outputs at build time make the log look funny to us in pagers, but this is certainly not an emerge issue.