Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928234 - media-libs/gst-plugins-bad-1.22.3-r3: ICE with sys-devel/gcc-13 (unrecognizable insn on rv64gc/lp64d)
Summary: media-libs/gst-plugins-bad-1.22.3-r3: ICE with sys-devel/gcc-13 (unrecognizab...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: riscv Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL: https://github.com/gcc-mirror/gcc/com...
Whiteboard:
Keywords: PATCH
: 929231 929247 931144 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-30 15:04 UTC by Stijn Tintel
Modified: 2024-05-04 03:38 UTC (History)
6 users (show)

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


Attachments
build.log (build.log,293.89 KB, text/x-log)
2024-03-30 15:04 UTC, Stijn Tintel
Details
libimagequant_libimagequant.c.i (libimagequant_libimagequant.c.i,829.18 KB, text/plain)
2024-03-30 20:47 UTC, Stijn Tintel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stijn Tintel 2024-03-30 15:04:40 UTC
FAILED: gst/dvbsubenc/libgstdvbsubenc.so.p/libimagequant_libimagequant.c.o
riscv64-unknown-linux-gnu-gcc -Igst/dvbsubenc/libgstdvbsubenc.so.p -Igst/dvbsubenc -I../gst-plugins-bad-1.22.3/gst/dvbsubenc -I. -I../gst-plugins-bad-1.22.3 -Igst-libs -I../gst-plugins-bad-1.22.3/gst-libs -I/usr/include/gstreamer-1.0 -I/usr/lib64/libffi/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -fvisibility=hidden -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -Wmissing-prototypes -Wold-style-definition -Wmissing-declarations -Wredundant-decls -Wwrite-strings -Wformat -Wformat-security -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wvla -Wpointer-arith -march=rv64imafdc -mcpu=sifive-u74 -O2 -pipe -fPIC -pthread -DHAVE_CONFIG_H -DLIQ_PRIVATE= -Wno-unknown-pragmas -MD -MQ gst/dvbsubenc/libgstdvbsubenc.so.p/libimagequant_libimagequant.c.o -MF gst/dvbsubenc/libgstdvbsubenc.so.p/libimagequant_libimagequant.c.o.d -o gst/dvbsubenc/libgstdvbsubenc.so.p/libimagequant_libimagequant.c.o -c ../gst-plugins-bad-1.22.3/gst/dvbsubenc/libimagequant/libimagequant.c
../gst-plugins-bad-1.22.3/gst/dvbsubenc/libimagequant/libimagequant.c: In function ‘liq_quantize_image’:
../gst-plugins-bad-1.22.3/gst/dvbsubenc/libimagequant/libimagequant.c:917:1: error: unrecognizable insn:
  917 | }
      | ^
(insn 607 606 608 85 (set (reg:DI 629)
        (if_then_else:DI (gt:DF (reg:DF 416 [ pretmp_650 ])
                (reg:DF 630))
            (reg:DI 632)
            (reg:DI 631))) -1
     (nil))
during RTL pass: vregs
../gst-plugins-bad-1.22.3/gst/dvbsubenc/libimagequant/libimagequant.c:917:1: internal compiler error: in extract_insn, at recog.cc:2791
Comment 1 Stijn Tintel 2024-03-30 15:04:59 UTC
Created attachment 889049 [details]
build.log
Comment 2 Stijn Tintel 2024-03-30 15:05:38 UTC
Portage 3.0.63 (python 3.11.8-final-0, default/linux/riscv/20.0/rv64gc/lp64d/desktop/plasma, gcc-13, glibc-2.39-r2, 6.5.5-gentoo-riscv64 riscv64)
=================================================================
System uname: Linux-6.5.5-gentoo-riscv64-riscv64-with-glibc2.39
KiB Mem:    16365196 total,   1767660 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 28 Mar 2024 23:30:00 +0000
Head commit of repository gentoo: 0ff7a9af7dc83572df7a8244a19b86f2b8723a15
Head commit of repository riscv: 5cc28159a5492c2ef147f050a1016e0a6e2cce6f

Head commit of repository stintel: 64a0a266974b67fff49b9093326a5ac2462ff099

Timestamp of repository wayland-desktop: Mon, 25 Mar 2024 00:48:29 +0000
Head commit of repository wayland-desktop: f667069e9f4cb08deb419502a0b05cbcfb284f19

sh bash 5.2_p26
ld GNU ld (Gentoo 2.40 p6) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26::gentoo
dev-build/autoconf:        2.71-r7::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.29.0::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.0-r1::gentoo
dev-lang/perl:             5.38.2-r2::gentoo
dev-lang/python:           3.10.11::gentoo, 3.11.8_p1::gentoo, 3.12.2_p1::gentoo
dev-lang/rust-bin:         1.76.0::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.53.1::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.39-r4::gentoo, 2.40-r7::gentoo, 2.41-r2::gentoo, 2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo, 17.0.6::gentoo, 18.1.2::gentoo
sys-devel/gcc:             12.2.1_p20230304::gentoo, 13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            15.0.7::gentoo, 16.0.6::gentoo, 17.0.6::gentoo, 18.1.2::gentoo
sys-kernel/linux-headers:  6.7-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r2::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://10.50.16.10/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync.exclude
    sync-rsync-verify-max-age: 7
    sync-rsync-verify-jobs: 1

riscv
    location: /var/db/repos/riscv-overlay
    sync-type: git
    sync-uri: http://github.com/gentoo/riscv.git
    masters: gentoo
    volatile: False

stintel
    location: /var/repo/stintel
    sync-type: git
    sync-uri: https://github.com/stintel/gentoo-overlay.git
    masters: gentoo
    volatile: True

wayland-desktop
    location: /var/db/repos/wayland-desktop
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/wayland-desktop.git
    masters: gentoo
    volatile: False

ACCEPT_KEYWORDS="riscv ~riscv"
ACCEPT_LICENSE="@FREE"
CBUILD="riscv64-unknown-linux-gnu"
CFLAGS="-march=rv64imafdc -mcpu=sifive-u74 -O2 -pipe"
CHOST="riscv64-unknown-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"
CXXFLAGS="-march=rv64imafdc -mcpu=sifive-u74 -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-march=rv64imafdc -mcpu=sifive-u74 -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync merge-wait multilib-strict news parallel-fetch pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=rv64imafdc -mcpu=sifive-u74 -O2 -pipe"
GENTOO_MIRRORS="http://ftp.ntua.gr/pub/linux/gentoo/ http://mirror.leaseweb.com/gentoo"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync.exclude"
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"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa bluetooth branding bzip2 cairo caps cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gles2 gpm gtk gui iconv icu ipv6 jpeg kde kwallet lcms libnotify mad mng mp3 mp4 mpeg ncurses networkmanager nls ogg opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 readline riscv screencast sdl seccomp semantic-desktop smp sound spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xv xvid zlib" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock 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" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 3 Stijn Tintel 2024-03-30 15:18:14 UTC
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/riscv64-unknown-linux-gnu/13/lto-wrapper
Target: riscv64-unknown-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-13.2.1_p20240210/work/gcc-13-20240210/configure --host=riscv64-unknown-linux-gnu --build=riscv64-unknown-linux-gnu --prefix=/usr --bindir=/usr/riscv64-unknown-linux-gnu/gcc-bin/13 --includedir=/usr/lib/gcc/riscv64-unknown-linux-gnu/13/include --datadir=/usr/share/gcc-data/riscv64-unknown-linux-gnu/13 --mandir=/usr/share/gcc-data/riscv64-unknown-linux-gnu/13/man --infodir=/usr/share/gcc-data/riscv64-unknown-linux-gnu/13/info --with-gxx-include-dir=/usr/lib/gcc/riscv64-unknown-linux-gnu/13/include/g++-v13 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/riscv64-unknown-linux-gnu/13/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 13.2.1_p20240210 p13' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --disable-multilib --disable-fixed-point --with-abi=lp64d --enable-libgomp --disable-libssp --disable-libada --disable-cet --disable-systemtap --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --without-zstd --without-isl --enable-default-pie --enable-default-ssp --disable-fixincludes
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.1 20240210 (Gentoo 13.2.1_p20240210 p13)
Comment 4 Mart Raudsepp gentoo-dev 2024-03-30 20:44:42 UTC
I can't do anything about a platform-specific compiler ICE as gstreamer maintainer.
Comment 5 Stijn Tintel 2024-03-30 20:47:45 UTC
Created attachment 889074 [details]
libimagequant_libimagequant.c.i

Minimal repro command:

riscv64-unknown-linux-gnu-gcc -O2 -mcpu=sifive-u74 -c libimagequant_libimagequant.c.i
Comment 6 Stijn Tintel 2024-03-30 21:13:11 UTC
cvise produced the following minimized self-contained source:

adjust_histogram_callback_feedback_loop_trials;
adjust_histogram_callback() {
  double target_mse;
  do {
    _Bool first_run_of_target_mse = target_mse;
    viter_do_iteration(first_run_of_target_mse ?: adjust_histogram_callback);
  } while (adjust_histogram_callback_feedback_loop_trials);
}
Comment 8 Stijn Tintel 2024-04-02 13:38:44 UTC
(In reply to matoro from comment #7)
> This is likely https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109760, please
> try the patch at
> https://github.com/gcc-mirror/gcc/commit/
> 55914b016de8c8514c58eb59822677a69e44135c

Applying that patch fixes the problem.
Comment 9 Larry the Git Cow gentoo-dev 2024-04-07 23:25:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=81f30ec8c4148cd75cf2aa15744a77b6bc18094a

commit 81f30ec8c4148cd75cf2aa15744a77b6bc18094a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-04-07 23:04:32 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-07 23:04:32 +0000

    13.2.0: drop upstreamed patch, backport riscv gstreamer fix
    
    Bug: https://bugs.gentoo.org/928234
    Signed-off-by: Sam James <sam@gentoo.org>

 ...50_all_PR111632_system_cxx_headers_libcxx.patch | 134 --------
 .../gentoo/92_all_riscv_PR109760-gstreamer.patch   | 337 +++++++++++++++++++++
 13.2.0/gentoo/README.history                       |   5 +
 3 files changed, 342 insertions(+), 134 deletions(-)
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-07 23:26:01 UTC
commit 8cea25036fdd8fa665cc56c427a9077df4df1dd1
Author: Sam James <sam@gentoo.org>
Date:   Mon Apr 8 00:17:37 2024 +0100

    sys-devel/gcc: add 13.2.1_p20240406

    Bug: https://bugs.gentoo.org/928234
    Signed-off-by: Sam James <sam@gentoo.org>

not kw'd yet
Comment 11 Yixun Lan archtester gentoo-dev 2024-04-13 03:24:42 UTC
*** Bug 929247 has been marked as a duplicate of this bug. ***
Comment 12 Jason Lethbridge 2024-04-14 01:05:13 UTC
*** Bug 929231 has been marked as a duplicate of this bug. ***
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-04 03:35:33 UTC
*** Bug 931144 has been marked as a duplicate of this bug. ***
Comment 14 Larry the Git Cow gentoo-dev 2024-05-04 03:38:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6294230c84e242fe8bbb35b8d394bbdc741982ba

commit 6294230c84e242fe8bbb35b8d394bbdc741982ba
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-05-04 03:36:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-04 03:36:10 +0000

    sys-devel/gcc: keyword 13.2.1_p20240503
    
    Closes: https://bugs.gentoo.org/928234
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/gcc-13.2.1_p20240503.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)