Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 730254

Summary: sys-apps/bat-0.15.4: undefined reference to `ansi256_from_rgb'
Product: Gentoo Linux Reporter: Craig Andrews <candrews>
Component: Current packagesAssignee: Georgy Yakovlev <gyakovlev>
Status: RESOLVED CANTFIX    
Severity: normal CC: candrews
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 709568    
Attachments: build.log

Description Craig Andrews gentoo-dev 2020-06-30 14:39:02 UTC
Running `rustc --crate-name bat --edition=2018 src/bin/bat/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C codegen-units=1 --cfg 'feature="application"' --cfg 'feature="atty"' --cfg 'feature="clap"' --cfg 'feature="default"' --cfg 'feature="dirs"' --cfg 'feature="git"' --cfg 'feature="git2"' --cfg 'feature="lazy_static"' --cfg 'feature="liquid"' --cfg 'feature="paging"' --cfg 'feature="regex-onig"' --cfg 'feature="shell-words"' --cfg 'feature="wild"' -C metadata=6fec60bc2113a434 -C extra-filename=-6fec60bc2113a434 --out-dir /var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps -L dependency=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps --extern ansi_colours=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libansi_colours-daf31a76b8db5bee.rlib --extern ansi_term=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libansi_term-962341387d4aeeff.rlib --extern atty=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libatty-aa13c7e54adb45eb.rlib --extern bat=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libbat-cf2ce1a8a11588d1.rlib --extern clap=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libclap-b55f395c01fdfa26.rlib --extern console=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libconsole-74677f26b9be2965.rlib --extern content_inspector=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libcontent_inspector-bd331f1ff647cc57.rlib --extern dirs=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libdirs-9cbb8f217024dae7.rlib --extern encoding=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libencoding-a1e3874e5e21d177.rlib --extern error_chain=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/liberror_chain-6aa32ce18d4f2f8e.rlib --extern git2=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libgit2-1e87495a12617f08.rlib --extern globset=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libglobset-5d7908c1255d9e05.rlib --extern lazy_static=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/liblazy_static-c780c929f6ccc3ca.rlib --extern path_abs=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libpath_abs-e8df208861208879.rlib --extern semver=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libsemver-c46484f89727ff78.rlib --extern serde=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libserde-3f65f6058899318e.rlib --extern serde_yaml=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libserde_yaml-83ed6cce56384aa1.rlib --extern shell_words=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libshell_words-157dc2b19d63d6c9.rlib --extern syntect=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libsyntect-37dae6707735ccf3.rlib --extern unicode_width=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libunicode_width-92e079ec0d16e96a.rlib --extern wild=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/libwild-f4bbf89219f7e3e6.rlib -L native=/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/build/ansi_colours-9813a9bbba23b325/out -L native=/usr/lib64 -L native=/usr/lib64 -L native=/usr/lib64`
error: linking with `x86_64-pc-linux-gnu-gcc` failed: exit code: 1
  |
  = note: "x86_64-pc-linux-gnu-gcc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/bat-6fec60bc2113a434.bat.do02x93s-cgu.0.rcgu.o" "-o" "/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/bat-6fec60bc2113a434" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps" "-L" "/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/build/ansi_colours-9813a9bbba23b325/out" "-L" "/usr/lib64" "-L" "/usr/lib64" "-L" "/usr/lib64" "-L" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/var/tmp/portage/sys-apps/bat-0.15.4/temp/rustcwDJREx/libansi_colours-daf31a76b8db5bee.rlib" "-Wl,--start-group" "/var/tmp/portage/sys-apps/bat-0.15.4/temp/rustcwDJREx/libbacktrace_sys-48156977368ed4e9.rlib" "-Wl,--end-group" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-6bbce9ac42a0f9d6.rlib" "-Wl,-Bdynamic" "-lgit2" "-lz" "-lonig" "-lc" "-lutil" "-ldl" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-ldl" "-lutil"
  = note: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/bat-6fec60bc2113a434.bat.do02x93s-cgu.0.rcgu.o: in function `bat::printer::InteractivePrinter::new':
          bat.do02x93s-cgu.0:(.text._ZN3bat7printer18InteractivePrinter3new17hed783c6d7e6d3929E+0x897): undefined reference to `ansi256_from_rgb'
          /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/bat-6fec60bc2113a434.bat.do02x93s-cgu.0.rcgu.o: in function `<bat::printer::InteractivePrinter as bat::printer::Printer>::print_line':
          bat.do02x93s-cgu.0:(.text._ZN74_$LT$bat..printer..InteractivePrinter$u20$as$u20$bat..printer..Printer$GT$10print_line17hf13f698670f2f16dE+0x1bda): undefined reference to `ansi256_from_rgb'
          /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: bat.do02x93s-cgu.0:(.text._ZN74_$LT$bat..printer..InteractivePrinter$u20$as$u20$bat..printer..Printer$GT$10print_line17hf13f698670f2f16dE+0x3698): undefined reference to `ansi256_from_rgb'
          /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/bat-6fec60bc2113a434.bat.do02x93s-cgu.0.rcgu.o: in function `bat::terminal::as_terminal_escaped':
          bat.do02x93s-cgu.0:(.text._ZN3bat8terminal19as_terminal_escaped17h44f1f8ad821c88ddE+0xdd): undefined reference to `ansi256_from_rgb'
          /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: bat.do02x93s-cgu.0:(.text._ZN3bat8terminal19as_terminal_escaped17h44f1f8ad821c88ddE+0x198): undefined reference to `ansi256_from_rgb'
          collect2: error: ld returned 1 exit status


Reproducible: Always




$ emerge --info
Portage 2.3.103 (python 3.8.3-final-0, default/linux/amd64/17.1/systemd, gcc-10.1.0, glibc-2.31-r5, 5.4.33-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.4.33-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i5-6500_CPU_@_3.20GHz-with-glibc2.2.5
KiB Mem:    16141608 total,   1192856 free
KiB Swap:   18310136 total,  17235632 free
Timestamp of repository gentoo: Tue, 30 Jun 2020 13:00:01 +0000
Head commit of repository gentoo: a6de9965d65b29942c78a8406ad57684aef0941b
sh bash 5.0_p17
ld GNU ld (Gentoo 2.34 p3) 2.34.0
ccache version 3.7.10 [enabled]
app-shells/bash:          5.0_p17::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3-r1::gentoo
dev-lang/python:          2.7.18::gentoo, 3.7.8::gentoo, 3.8.3::gentoo, 3.9.0_beta3::gentoo
dev-util/ccache:          3.7.10::gentoo
dev-util/cmake:           3.17.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2::gentoo
sys-devel/binutils:       2.34-r1::gentoo
sys-devel/gcc:            10.1.0-r1::gentoo
sys-devel/gcc-config:     2.3.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r5::gentoo
Repositories:

gentoo
    location: /var/cache/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA Intel-SDP Oracle-BCLA-JavaSE Oracle-EADLA AMD-GPU-PRO-EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fuse-linker-plugin -flto -Wl,-flto -ftree-vectorize -ftree-slp-vectorize -falign-functions=32 -fgraphite-identity -floop-nest-optimize -fno-common"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -fuse-linker-plugin -flto -Wl,-flto -ftree-vectorize -ftree-slp-vectorize -falign-functions=32 -fgraphite-identity -floop-nest-optimize -fno-common"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=4.5"
ENV_UNSET="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 candy ccache cgroup clean-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync mount-sandbox multilib-strict network-sandbox news parallel-fetch parallel-install 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://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -flto -Wl,--hash-style=gnu"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/var/cache/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 a52 aac aacs acl acpi aiglx alac alsa amd64 amr amrnb amrwb animation apache2 apng argon2 artworkextra asf aspnet2 asyncns authdaemond avahi avi bash-completion bcmath berkdb bitmap-fonts bluetooth bluray bmp bonjour brotli btrfs bzip2 cairo caps cdda cddb cdparanoia cdr celt chm clang cli crypt cryptsetup css cups curl daap dbus device-mapper dga dhclient dirac divx4linux dlloader dns dnssec dovecot-sasl dpms dri dri3 dts dv dvb dvd dvdr dvdread egl enca encode exif ext4 faac fame fat fbcondecor fbsplash ffmpeg fftw firefox flac fontconfig foomaticdb fortran freetype ftp fuse gaim gd gdbm geoip gif gimpprint glamor gles gles1 gles2 glib glibc-omitfp glitz glut gost gphoto2 graphite gsm gstreamer gstreamer10 gtk gtk2 gudev hardenedphp hbci howl howl-compat http2 https hwdb iconv icu idn imagemagick imap imlib innodb ipv6 java java5 javafx jbig jce joystick jpeg jpeg2k junit kdbus kdehiddenvisibility kvm lapack lcms libfame libglvnd libkms libnotify librtmp libtirpc libusb live llvm lm_sensors lvm lz4 lzma lzo mad maildir mdadm mdnsresponder-compat metalink mjpeg mmap mms mng motif mozilla mozsvg mp3 mpeg mpeg2 mplayer mpx multilib musepack mysql mythtv natspec ncurses nemesi network networkmanager nls nptl nptlonly ntfs ocl-icd offensive ofx ogg oggvorbis openal opencl openexr opengl openmp openvg opus pam pango pcre pcre16 pcre32 pcsc-lite pdf pdflib perl pgo phonon pic pie png pnp policykit ppd ppds pulseaudio python quicktime quvi rar readline rtc rtmp schroedinger screensaver sctp sdl seccomp session sftp sharedmem shout smp sna sni sox speex spell split-usr sqlite srt ssh ssl steamruntime suspend2 svg systemd theora threads tiff tls transcode truetype truetype-fonts type-fonts udev udisks unicode unzip upnp ups usb user-session uxa v4l2 vaapi vcd videos virgl vorbis vpx vulkan wayland webdav webp webservices wifi win32codecs wmf wv x264 x265 xanim xattr xcb xcomposite xdg xinerama xml xml2 xpm xprint xrandr xv xvfb xvid xvmc zeroconf zip zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="actions alias auth_basic authn_core authz_core authn_socache cache_disk authn_alias authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex brotli cache dav dav_fs dav_lock dconf deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias auth_digest proxy proxy_ajp proxy_connect proxy_http proxy_fcgi reqtimeout cgi cgid unixd socache_shmcb proxy_html xml2enc" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="userspace" NGINX_MODULES_HTTP="access auth_basic autoindex brotli browser charset empty_gif fastcgi geo grpc gunzip gzip limit_conn limit_req map memcached mirror proxy referer rewrite scgi split_clients ssi upstream_hash upstream_ip_hash upstream_keepalive upstream_least_conn upstream_zone userid uwsgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_7 python3_8" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="intel i965 iris amdgpu radeon 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, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Craig Andrews gentoo-dev 2020-06-30 14:39:24 UTC
Created attachment 647222 [details]
build.log
Comment 2 Georgy Yakovlev gentoo-dev 2020-06-30 20:00:29 UTC
I can reproduce the failure with your flags, same error.

error: linking with `powerpc64le-unknown-linux-gnu-gcc` failed: exit code: 1                                                                                                                                       
  |                                                                                                                                                                                                                
  = note: "powerpc64le-unknown-linux-gnu-gcc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/usr/lib/rustlib/powerpc64le-unknown-linux-gnu/lib" "/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/
release/deps/bat-d4b13915a8d38571.bat.4s4pkz66-cgu.0.rcgu.o" "-o" "/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/bat-d4b13915a8d38571" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-zn
ow" "-Wl,-O1" "-nodefaultlibs" "-L" "/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps" "-L" "/var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/build/ansi_colours-b1f63cb
d3ba3b963/out" "-L" "/usr/lib64" "-L" "/usr/lib64" "-L" "/usr/lib64" "-L" "/usr/lib/rustlib/powerpc64le-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/var/tmp/portage/sys-apps/bat-0.15.4/temp/rustc5DQJ47/libansi_colour
s-f426bb2d278e113e.rlib" "-Wl,--start-group" "/var/tmp/portage/sys-apps/bat-0.15.4/temp/rustc5DQJ47/libbacktrace_sys-265b3f3e5f239de0.rlib" "-Wl,--end-group" "/usr/lib/rustlib/powerpc64le-unknown-linux-gnu/lib/l
ibcompiler_builtins-77abc912212716e5.rlib" "-Wl,-Bdynamic" "-lgit2" "-lz" "-lonig" "-lc" "-lutil" "-ldl" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-ldl" "-lutil"      
  = note: /usr/lib/gcc/powerpc64le-unknown-linux-gnu/9.3.0/../../../../powerpc64le-unknown-linux-gnu/bin/ld: /var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/bat-d4b13915a8d38571.bat.4s4p
kz66-cgu.0.rcgu.o: in function `bat::printer::InteractivePrinter::new':
          bat.4s4pkz66-cgu.0:(.text._ZN3bat7printer18InteractivePrinter3new17h0b6f72732b4eb633E+0x71c): undefined reference to `ansi256_from_rgb'
          /usr/lib/gcc/powerpc64le-unknown-linux-gnu/9.3.0/../../../../powerpc64le-unknown-linux-gnu/bin/ld: /var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/bat-d4b13915a8d38571.bat.4s4p
kz66-cgu.0.rcgu.o: in function `<bat::printer::InteractivePrinter as bat::printer::Printer>::print_line': 
          bat.4s4pkz66-cgu.0:(.text._ZN74_$LT$bat..printer..InteractivePrinter$u20$as$u20$bat..printer..Printer$GT$10print_line17h9628bfb867981740E+0x1b08): undefined reference to `ansi256_from_rgb'
          /usr/lib/gcc/powerpc64le-unknown-linux-gnu/9.3.0/../../../../powerpc64le-unknown-linux-gnu/bin/ld: bat.4s4pkz66-cgu.0:(.text._ZN74_$LT$bat..printer..InteractivePrinter$u20$as$u20$bat..printer..Printer$
GT$10print_line17h9628bfb867981740E+0x33f4): undefined reference to `ansi256_from_rgb'
          /usr/lib/gcc/powerpc64le-unknown-linux-gnu/9.3.0/../../../../powerpc64le-unknown-linux-gnu/bin/ld: /var/tmp/portage/sys-apps/bat-0.15.4/work/bat-0.15.4/target/release/deps/bat-d4b13915a8d38571.bat.4s4p
kz66-cgu.0.rcgu.o: in function `bat::terminal::as_terminal_escaped':
          bat.4s4pkz66-cgu.0:(.text._ZN3bat8terminal19as_terminal_escaped17h67a5010977f8962eE+0x150): undefined reference to `ansi256_from_rgb'
          /usr/lib/gcc/powerpc64le-unknown-linux-gnu/9.3.0/../../../../powerpc64le-unknown-linux-gnu/bin/ld: bat.4s4pkz66-cgu.0:(.text._ZN3bat8terminal19as_terminal_escaped17h67a5010977f8962eE+0x16c): undefined 
reference to `ansi256_from_rgb'
          collect2: error: ld returned 1 exit status 
           

error: aborting due to previous error

error: could not compile `bat`.

#################################


I thought gentoo developers don't use ricer flags ;-)

'-ftree-vectorize' already enables '-ftree-slp-vectorize' afaik.



btw, you might like
RUSTFLAGS="-Ctarget-cpu=native"

it's safe to set -Ctarget-cpu=native globally for rust.

or you can set it to cpu type explicitly, check `rustc -C target-cpu=help`
help output(works only with rust-bin or rust compiled WITHOUT system-llvm)

rust does lto differently. and the final object is already LTOed
https://github.com/sharkdp/bat/blob/master/Cargo.toml

look at last section of toml.


what happens here is ansi_colours fails at LTO.
it may be possible to fatLTO it, but I haven't tried.

I recommend to add all cargo packages to non-lto files.
sometime later when cargo implements custom release profiles, we may add lto useflag via eclass, but not it's up to upstream to enable or disable lto.
Comment 3 Craig Andrews gentoo-dev 2020-06-30 20:08:05 UTC
> I thought gentoo developers don't use ricer flags ;-)

Without ricer flags, things might work reliably... what fun would that be?


> I recommend to add all cargo packages to non-lto files.
sometime later when cargo implements custom release profiles, we may add lto useflag via eclass, but not it's up to upstream to enable or disable lto.

If no cargo packages should be built with lto enabled for now, I wonder if we should add:
filter-flags '-flto*'
to cargo.eclass?
Comment 4 Georgy Yakovlev gentoo-dev 2020-06-30 20:24:24 UTC
true.
I'll test it and add to eclass if  it works fine.

it may be a bit trickier with packages like quiche or newsboat though (using cargo indirectly)