Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895250 - sys-devel/gcc: ICE in wi::divmod_internal (dev-lang/python-3.10.9-r1 fails to compile under Gentoo powerpc)
Summary: sys-devel/gcc: ICE in wi::divmod_internal (dev-lang/python-3.10.9-r1 fails to...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-18 12:09 UTC by contact.tdw78
Modified: 2023-04-20 22:49 UTC (History)
1 user (show)

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


Attachments
the build log (build.txt,42.04 KB, text/plain)
2023-02-18 12:09 UTC, contact.tdw78
Details

Note You need to log in before you can comment on or make changes to this bug.
Description contact.tdw78 2023-02-18 12:09:04 UTC
Created attachment 852634 [details]
the build log

I'd like to mention that this machine hasn't been powered on since November of 2022.
I've attached the build log and here's the output of emerge --info because I don't know how to attach multiple files:

Portage 3.0.38.1 (python 3.10.8-final-0, default/linux/ppc/17.0/desktop, gcc-11.3.0, glibc-2.35-r8, 6.0.0-rc5-PMacG4 ppc)
=================================================================
System uname: Linux-6.0.0-rc5-PMacG4-ppc-7455,_altivec_supported-with-glibc2.35
KiB Mem:     2048608 total,    543180 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 18 Feb 2023 09:30:01 +0000
Head commit of repository gentoo: b3edfe0019505092b957d0f6824b519306274a26
sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.38 p4) 2.38
distcc 3.4 powerpc-unknown-linux-gnu [disabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-lang/perl:             5.34.1-r4::gentoo
dev-lang/python:           3.10.8_p2::gentoo, 3.11.0_p1::gentoo
dev-lang/rust-bin:         1.64.0-r1::gentoo
dev-util/cmake:            3.24.2::gentoo
dev-util/meson:            0.63.2-r1::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.45.2-r1::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.38-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r8::gentoo
Repositories:

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

ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="*"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe"
CHOST="powerpc-unknown-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/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -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="-O2 -mcpu=powerpc -mtune=powerpc -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live 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 strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/var/cache/binpkgs"
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"
SHELL="/bin/bash"
USE="X a52 aac acl alsa big-endian branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg lcms libglvnd libnotify mad mng mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppc ppds qt5 readline sdl seccomp sound spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xft xml xv xvid zlib" ADA_TARGET="gnat_2021" 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" 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" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="radeon" 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:  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, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-18 12:13:06 UTC
```
parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal  -I. -I./Include -I/usr/include/ncursesw  -fPIC -DPy_BUILD_CORE -o Objects/interpreteridobject.o Objects/interpreteridobject.c
during RTL pass: cse1
Objects/funcobject.c: In function 'sm_dealloc':
Objects/funcobject.c:1006:1: internal compiler error: Segmentation fault
 1006 | }
      | ^
0x11299523 internal_error(char const*, ...)
        ???:0
0x10b42b38 wi::divmod_internal(long long*, unsigned int*, long long*, long long const*, unsigned int, unsigned int, long long const*, unsigned int, unsigned int, signop, wi::overflow_type*)
        ???:0
0x107af9ab simplify_const_binary_operation(rtx_code, machine_mode, rtx_def*, rtx_def*)
        ???:0
{standard input}: Assembler messages:
{standard input}:1614: Warning: end of file not at end of a line; newline inserted
{standard input}:1615: Error: missing operand
{standard input}:1615: Error: missing operand
{standard input}:1615: Error: missing operand
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
powerpc-unknown-linux-gnu-gcc: internal compiler error: Segmentation fault signal terminated program cc1
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
make: *** [Makefile:1855: Objects/funcobject.o] Err
```

Decent chance this is a dupe of bug 894134, although it's weird it gets that far on.
Comment 2 contact.tdw78 2023-02-18 12:14:18 UTC
(In reply to Sam James from comment #1)
> ```
> parameter -Wno-missing-field-initializers -Wstrict-prototypes
> -Werror=implicit-function-declaration -fvisibility=hidden 
> -I./Include/internal  -I. -I./Include -I/usr/include/ncursesw  -fPIC
> -DPy_BUILD_CORE -o Objects/interpreteridobject.o
> Objects/interpreteridobject.c
> during RTL pass: cse1
> Objects/funcobject.c: In function 'sm_dealloc':
> Objects/funcobject.c:1006:1: internal compiler error: Segmentation fault
>  1006 | }
>       | ^
> 0x11299523 internal_error(char const*, ...)
>         ???:0
> 0x10b42b38 wi::divmod_internal(long long*, unsigned int*, long long*, long
> long const*, unsigned int, unsigned int, long long const*, unsigned int,
> unsigned int, signop, wi::overflow_type*)
>         ???:0
> 0x107af9ab simplify_const_binary_operation(rtx_code, machine_mode, rtx_def*,
> rtx_def*)
>         ???:0
> {standard input}: Assembler messages:
> {standard input}:1614: Warning: end of file not at end of a line; newline
> inserted
> {standard input}:1615: Error: missing operand
> {standard input}:1615: Error: missing operand
> {standard input}:1615: Error: missing operand
> {standard input}: Error: open CFI at the end of file; missing .cfi_endproc
> directive
> powerpc-unknown-linux-gnu-gcc: internal compiler error: Segmentation fault
> signal terminated program cc1
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <https://bugs.gentoo.org/> for instructions.
> make: *** [Makefile:1855: Objects/funcobject.o] Err
> ```
> 
> Decent chance this is a dupe of bug 894134, although it's weird it gets that
> far on.

I mean that bug was issued for a G5 Mac, this is a G4. But maybe it is.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-18 12:18:48 UTC
The bug is not thought to be specific to a G5 otherwise (or PowerPC, really), we've seen it in a few places but it's not very reproducible. We've seen it on HPPA for example, but abidiffing +/-cpudetection on gmp makes no difference.

Also, the common bit is "weird ICE involving floating point".

Anyway: for now, could you possibly try downgrading gmp?
Comment 4 contact.tdw78 2023-02-18 13:30:13 UTC
(In reply to Sam James from comment #3)
> The bug is not thought to be specific to a G5 otherwise (or PowerPC,
> really), we've seen it in a few places but it's not very reproducible. We've
> seen it on HPPA for example, but abidiffing +/-cpudetection on gmp makes no
> difference.
> 
> Also, the common bit is "weird ICE involving floating point".
> 
> Anyway: for now, could you possibly try downgrading gmp?

Hi, I downgraded gmp and I've been compiling python for some time but it's stuck at this point

Compiling '/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/test/test_struct.py'...
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/concurrent/futures/process.py", line 323, in run
    self.terminate_broken(cause)
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/concurrent/futures/process.py", line 458, in terminate_broken
    work_item.future.set_exception(bpe)
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/concurrent/futures/_base.py", line 561, in set_exception
    raise InvalidStateError('{}: {!r}'.format(self._state, self))
concurrent.futures._base.InvalidStateError: CANCELLED: <Future at 0xa5a816e8 state=cancelled>
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/compileall.py", line 462, in <module>
    exit_status = int(not main())
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/compileall.py", line 439, in main
    if not compile_dir(dest, maxlevels, args.ddir,
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/compileall.py", line 114, in compile_dir
    success = min(results, default=True)
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/concurrent/futures/process.py", line 570, in _chain_from_iterable_of_lists
    for element in iterable:
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
    yield _result_or_cancel(fs.pop())
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
    return fut.result(timeout)
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
Compiling '/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/test/test_structseq.py'...
Compiling '/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/test/test_subclassinit.py'...
Compiling '/var/tmp/portage/dev-lang/python-3.10.9-r1/image/usr/lib/python3.10/test/test_subprocess.py'...


It's been stuck for like at least an hour
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-18 13:32:39 UTC
Can you try with MAKEOPTS="-j1"?
Comment 6 contact.tdw78 2023-02-18 21:20:53 UTC
(In reply to Sam James from comment #5)
> Can you try with MAKEOPTS="-j1"?

lmao that fixed it