Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913348 - www-client/chromium-115/116: error: incompatible function pointer types assigning to 'gmult_func' in boringssl on ppc64
Summary: www-client/chromium-115/116: error: incompatible function pointer types assig...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal normal
Assignee: Chromium Project
URL:
Whiteboard:
Keywords: PullRequest
Depends on: 882815
Blocks:
  Show dependency tree
 
Reported: 2023-08-30 19:04 UTC by darkbasic
Modified: 2023-10-13 20:17 UTC (History)
5 users (show)

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


Attachments
chromium-115.build.log.gz (chromium-115.0.5790.170-build.log.gz,61.68 KB, application/gzip)
2023-08-30 19:06 UTC, darkbasic
Details
chromium-116.build.log.gz (chromium-116.0.5845.96-build.log.gz,157.96 KB, application/gzip)
2023-08-30 19:07 UTC, darkbasic
Details
Electron v8 ppc64 sandbox backport (v8_11_enable_ppc64_sandbox.patch,37.59 KB, patch)
2023-10-09 15:28 UTC, Timothy Pearson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description darkbasic 2023-08-30 19:04:41 UTC
Since version 115 Chromium doesn't compile anymore on ppc64le.

This is the log with Chromium 115:

[1377/55900] clang -MMD -MF obj/third_party/boringssl/boringssl/bcm.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_>
FAILED: obj/third_party/boringssl/boringssl/bcm.o
clang -MMD -MF obj/third_party/boringssl/boringssl/bcm.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DIS>
In file included from ../../third_party/boringssl/src/crypto/fipsmodule/bcm.c:90:
../../third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c:234:15: error: incompatible function pointer types assigning to 'gmult_func' (aka 'void (*)(unsigned char *, const u128 *)') from 'void (uint64_t *, const u128 *)' (aka 'void (unsigned long *, const u128 *)') [-Wincompat>
    *out_mult = gcm_gmult_p8;
              ^ ~~~~~~~~~~~~
../../third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c:235:15: error: incompatible function pointer types assigning to 'ghash_func' (aka 'void (*)(unsigned char *, const u128 *, const unsigned char *, unsigned long)') from 'void (uint64_t *, const u128 *, const uint8_t *, si>
    *out_hash = gcm_ghash_p8;
              ^ ~~~~~~~~~~~~
2 errors generated.

This is the log with Chromium 116:

[4473/56426] clang -MMD -MF obj/third_party/boringssl/boringssl/bcm.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -D_LIBCPP_ENABLE_ASSERTIONS=1 -D_LIBCPP_DISA>
FAILED: obj/third_party/boringssl/boringssl/bcm.o
clang -MMD -MF obj/third_party/boringssl/boringssl/bcm.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -D_LIBCPP_ENABLE_ASSERTIONS=1 -D_LIBCPP_DISABLE_VISIBILIT>
In file included from ../../third_party/boringssl/src/crypto/fipsmodule/bcm.c:90:
../../third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c:234:15: error: incompatible function pointer types assigning to 'gmult_func' (aka 'void (*)(unsigned char *, const u128 *)') from 'void (uint64_t *, const u128 *)' (aka 'void (unsigned long *, const u128 *)') [-Wincompat>
    *out_mult = gcm_gmult_p8;
              ^ ~~~~~~~~~~~~
../../third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c:235:15: error: incompatible function pointer types assigning to 'ghash_func' (aka 'void (*)(unsigned char *, const u128 *, const unsigned char *, unsigned long)') from 'void (uint64_t *, const u128 *, const uint8_t *, si>
    *out_hash = gcm_ghash_p8;
              ^ ~~~~~~~~~~~~
2 errors generated.

Google dropped support for ppc64le out of their SSL libraries but Raptor is still maintaining boringssl ppc64le support in their patchset. They only test it in Debian though (which AFAIK uses ieee-long-double) and they suspect the issue might relate to something in the compiler around 128 bit types.

Reproducible: Always
Comment 1 darkbasic 2023-08-30 19:06:44 UTC
Created attachment 869063 [details]
chromium-115.build.log.gz

# emerge --info
Portage 3.0.49 (python 3.11.5-final-0, default/linux/ppc64le/17.0/desktop/gnome/systemd/merged-usr, gcc-12, glibc-2.37-r3, 6.4.12-gentoo-dist ppc64le)
=================================================================
System uname: Linux-6.4.12-gentoo-dist-ppc64le-POWER9,_altivec_supported-with-glibc2.37
KiB Mem:    65402456 total,  14925012 free
KiB Swap:   16777212 total,  16378340 free
Timestamp of repository bobwya: Wed, 23 Aug 2023 07:46:58 +0000
Head commit of repository bobwya: 107b0cb81507e3b82d3b85d0525a43e8cc493d0b

Timestamp of repository gentoo: Wed, 30 Aug 2023 17:31:57 +0000
Head commit of repository gentoo: 70214718878d6ab502ad2a3ec0a4d11d90ffb28d

Timestamp of repository guru: Wed, 30 Aug 2023 05:50:03 +0000
Head commit of repository guru: 60584733ba11b2cb28f7e7c2c89185f033456427

Timestamp of repository pf4public: Tue, 29 Aug 2023 23:06:10 +0000
Head commit of repository pf4public: db3a1f5be3066d50d1083b57fbd84efab45a5703

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.40 p5) 2.40.0
ccache version 4.8.2 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.36.1-r3::gentoo
dev-lang/python:           3.10.13::gentoo, 3.11.5::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/ccache:           4.8.2::gentoo
dev-util/cmake:            3.26.5-r2::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/sandbox:          2.37::gentoo
sys-apps/systemd:          253.6::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/gcc:             12.3.1_p20230526::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::gentoo
Repositories:

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

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000
    volatile: False
    sync-git-verify-commit-signature: yes

darkbasic
    location: /var/db/repos/darkbasic
    masters: gentoo
    volatile: False

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

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

ACCEPT_KEYWORDS="ppc64"
ACCEPT_LICENSE="@FREE @FREE unRAR fping freedist Microsoft-vscode SSPL-1"
CBUILD="powerpc64le-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mcpu=power9 -mtune=power9"
CHOST="powerpc64le-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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/php/apache2-php8.1/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-O2 -pipe -mcpu=power9 -mtune=power9"
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 -pipe -mcpu=power9 -mtune=power9"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs 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 -pipe -mcpu=power9 -mtune=power9"
GENTOO_MIRRORS="https://gentoo.mirror.garr.it/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j32"
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 bluetooth branding btrfs bzip2 cairo cdda cdr cli colord crypt cups dbus dri dts dvd dvdr eds encode evo exif flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm grub gstreamer gtk gui iconv icu introspection ipv6 jpeg keyring lcms libnotify mad mng mp3 mp4 mpeg nautilus ncurses networkmanager nls nptl ogg opencl opengl openmp pam pango pcre pdf pipewire png policykit ppc64 ppds pulseaudio qt5 readline screencast sdl seccomp sound spell ssl startup-notification svg systemd test-rust tiff tracker truetype udev udisks unicode upower usb vaapi vorbis vpx vulkan wayland wxwidgets x264 xattr xcb xft xml xv xvid zeroconf 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" CPU_FLAGS_PPC="altivec vsx vsx2 vsx3" 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="php8-1" POSTGRES_TARGETS="postgres13" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="ppc ppc64 i386 x86_64 arm aarch64" QEMU_USER_TARGETS="ppc ppc64 i386 x86_64 arm aarch64" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu 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, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, 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 2 darkbasic 2023-08-30 19:07:14 UTC
Created attachment 869064 [details]
chromium-116.build.log.gz
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-31 06:22:13 UTC
Yeah, I suspect you're right. I'd be very interested in if it works with the new profiles if you can try them out (take a backup first please, see the comments in bug 882815 for how; i'd strongly recommend rebuilding everything after you rebuild gcc/binutils/glibc too.)
Comment 4 Stephan Hartmann (RETIRED) gentoo-dev 2023-08-31 07:17:05 UTC
The error is in their patchset and not in the compiler.

gmult_func is defined as:

typedef void (*gmult_func)(uint8_t Xi[16], const u128 Htable[16]);

But in the patchset gcm_gmult_p8 is:

void gcm_gmult_p8(uint64_t Xi[2], const u128 Htable[16]);
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-31 07:25:36 UTC
removal: https://github.com/google/boringssl/commit/5fdc03f74adfd3d270aa6f64b3f3050c19e52e49#diff-5ded05174f8be4359aeee63a4e1c84b83123cd6dec5e1a12afc9f7a8d1ec6a26L313

upstream: https://github.com/openssl/openssl/blob/9f5102bffc8bb3a9b02a0a5e3c1de4326622fe04/crypto/modes/gcm128.c#L400

Their patchset has (in gcm.c):
```
+#elif defined(GHASH_ASM_PPC64LE)
+  if (CRYPTO_is_PPC64LE_vcrypto_capable()) {
+    gcm_init_p8(out_table, H);
+    *out_mult = gcm_gmult_p8;
+    *out_hash = gcm_ghash_p8;
+    return;
+  }
 #endif
```

which is the same as what it was w/ boringssl before, so I imagine it's been broken on ppc64le for a while, and what actually happened was clang 16 got stabled -> made incompatible-func-ptr-types an error by default and nobody had noticed until now?
Comment 6 darkbasic 2023-08-31 07:42:39 UTC
I use clang 16 since the very first day of the release, so I guess it must not have been a problem before 115 otherwise I would have noticed. Debian doesn't use clang 16 for sure.
Comment 7 Red 2023-09-01 00:58:33 UTC
Same here. www-client/chromium-116.0.5845.140:0/stable::gentoo (kangie PMed me the ebuild). logs and info upcoming


```
Unavailable repository 'steam-overlay' referenced by masters entry in '/var/db/repos/kzd/metadata/layout.conf'
Portage 3.0.49 (python 3.11.4-final-0, default/linux/ppc64le/17.0, gcc-13, glibc-2.37-r3, 6.1.33-gentoorich ppc64le)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.1.33-gentoorich-ppc64le-POWER8E_-raw-,_altivec_supported-with-glibc2.37
KiB Mem:   260348608 total, 231817136 free
KiB Swap:          0 total,         0 free
Timestamp of repository anders-larsson: Wed, 23 Aug 2023 07:46:43 +0000
Head commit of repository anders-larsson: 8bf498aaf0c3df5dcf3512466dd0145d216ff2b4

Timestamp of repository guru: Wed, 30 Aug 2023 05:50:03 +0000
Head commit of repository guru: 60584733ba11b2cb28f7e7c2c89185f033456427

Timestamp of repository holgersson-overlay: Wed, 23 Aug 2023 07:46:45 +0000
Head commit of repository holgersson-overlay: 1873c692c6c82b8fd2624da7cf7f066b5540ef20

Head commit of repository jami-overlay: 93df25fdbf68bd3981e7495038adb42a863c4efe

Timestamp of repository java: Tue, 29 Aug 2023 15:50:42 +0000
Head commit of repository java: 5fea7120c503e86de37a033e11a1971f2ab04e99

Timestamp of repository kzd: Tue, 29 Aug 2023 21:36:24 +0000
Head commit of repository kzd: 47ddc0c107cb3632c82915668dcc7c2f65c6973a

Head commit of repository matoro: 9d9931a772ea4e9f54e86a5d527447247b75e8b2

Timestamp of repository mva: Wed, 23 Aug 2023 07:46:39 +0000
Head commit of repository mva: f5894850db5a1e0fbc6fa135bca06cb3eaf3ff4f

Timestamp of repository qt: Sun, 27 Aug 2023 11:31:29 +0000
Head commit of repository qt: 7bc7e29896da53f248bbf9e6e7218c36efd75785

Timestamp of repository ryans: Wed, 23 Aug 2023 07:46:54 +0000
Head commit of repository ryans: 9958c379f420ec60e1cd77dc788adb48fbd3b69b

Timestamp of repository spark-overlay: Wed, 23 Aug 2023 07:46:55 +0000
Head commit of repository spark-overlay: 21c097d0f84e91e609e4e6954094c709150d5041

Timestamp of repository src_prepare-overlay: Thu, 31 Aug 2023 17:16:51 +0000
Head commit of repository src_prepare-overlay: d997d8e416b5bee18129c5c4c8433680d9cc10f6

Timestamp of repository superposition: Tue, 29 Aug 2023 15:50:49 +0000
Head commit of repository superposition: 5f5d11ea2ad98078199ec675ddf977411c1e6383

Timestamp of repository gentoo: Fri, 01 Sep 2023 00:00:01 +0000
Head commit of repository gentoo: 780796232dbd5a903a4d622808c64a88aa68d1a0
sh dash 0.5.12
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r6::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.10.12::gentoo, 3.11.4::gentoo, 3.12.0_beta4_p1::gentoo
dev-lang/rust:             1.71.0::gentoo
dev-util/cmake:            3.27.1::gentoo
dev-util/meson:            1.2.0::gentoo
sys-apps/baselayout:       9999::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.37::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.39-r4::gentoo, 2.40-r6::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo, 16.0.6::gentoo
sys-devel/gcc:             12.2.1_p20230304::gentoo, 13.2.0::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.4::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::gentoo
Repositories:

crossdev
    location: /var/db/repos/crossdev
    masters: gentoo
    priority: -10
    volatile: False

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

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

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

jami-overlay
    location: /var/db/repos/jami-overlay
    sync-type: git
    sync-uri: https://gitlab.com/Parona/jami-overlay
    masters: gentoo qt
    volatile: True

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

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

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

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

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

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

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

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

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

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

ACCEPT_KEYWORDS="ppc64 ~ppc64"
ACCEPT_LICENSE="*"
CBUILD="powerpc64le-unknown-linux-gnu"
CFLAGS="-O3 -pipe -flto -mcpu=power8 -fallow-store-data-races -fno-math-errno -fgraphite-identity -fipa-pta"
CHOST="powerpc64le-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.9/conf /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O3 -pipe -flto -mcpu=power8 -fallow-store-data-races -fno-math-errno -fgraphite-identity -fipa-pta"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --backtrack=100"
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="-O3 -pipe -flto -mcpu=power8 -fallow-store-data-races -fno-math-errno -fgraphite-identity -fipa-pta"
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="-O3 -pipe -flto -mcpu=power8 -fallow-store-data-races -fno-math-errno -fgraphite-identity -fipa-pta"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j90"
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"
RUSTFLAGS="-C target-cpu=pwr8 -C opt-level=3 -C strip=symbols"
SHELL="/bin/zsh"
USE="X acl aio alsa aot asm bzip2 caps cli crypt distinct-l dri eudev fbcon fortran gdbm gles2 gpm graphite iconv ipv6 ithreads jit jumbo-build kms linuxfb lto lz4 ncurses nptl only-c-locale opengl openmp pam pcre pgo pipewire pipewire-alsa postgres ppc64 readline split-usr ssl test-rust threads unicode vaapi vim vim-syntax vulkan vulkan-overlay wayland x xattr zlib zsh zsh-completions zsh-syntax zstd 🇺🇸" 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" CPU_FLAGS_PPC="altivec vsx vsx2" 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" NGINX_MODULES_HTTP="brotli gunzip gzip gzip-static gzip_static" NGINX_MODULES_MAIL="imap smtp" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_USER_TARGETS="aarch64 arm i386 ppc64le sparc64 x86_64" RUBY_TARGETS="ruby31" VIDEO_CARDS="radeon 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:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, 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, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
```
Comment 9 Timothy Pearson 2023-09-04 17:55:56 UTC
Should be fixed here:

https://salsa.debian.org/chromium-team/chromium/-/commit/f1431a48728a3cdcdc8cd08331a5c9f96748c953

This patch doesn't change functionality, and SSL is still verified to work.  The underlying assembler routine isn't aware of the function call definitions in the first place, and continues to operate on the provided data in the same manner regardless of whether the function call prototype declares a pointer to two 64-bit ints or 16 bytes.

Tested to function identically as before on a Talos II machine with Chromium 116 patch level 140.
Comment 10 darkbasic 2023-09-04 19:03:05 UTC
Thanks! I'm trying it now and I will eventually submit a PR for 115 and 116.

Since that should hopefully lead to a working electron-26+, do you know if there is any ETA for v8_sandbox on ppc64le?
Currently vscode does not work anymore on latest versions of electron due to the lack of v8_sandbox. To be precise it's node-spdlog which gets pulled in by vscode and doesn't work with latest electron.

See https://github.com/microsoft/vscode/issues/182743
and https://github.com/PF4Public/gentoo-overlay/issues/219

I've tried to disable v8_sandbox and fix the symbols mismatch in the headers but I didn't get it working either.

I'm currently patching electron-19 with all kinds of compiler flags and python 3.11 patches to keep it working, but I will most likely be driven away from the Talos 2 as my main workstation if I can't get vscode to compile on modern electron.
Comment 11 Timothy Pearson 2023-09-04 19:49:34 UTC
(In reply to darkbasic from comment #10)
> Thanks! I'm trying it now and I will eventually submit a PR for 115 and 116.

Sounds good.  Let me know if it doesn't fix things, otherwise we should be good to go.

> Since that should hopefully lead to a working electron-26+, do you know if
> there is any ETA for v8_sandbox on ppc64le?

To be quite honest I wasn't aware of the missing support.  Is there a bug open anywhere on it, and what is the easiest way to attempt to compile v8_sandbox?  If I can avoid going down rabbit holes chasing older or wrong versions of the feature that's needed here I can focus more on the porting effort / figuring out why it isn't enabled on ppc64le yet.

Thanks!
Comment 12 darkbasic 2023-09-06 08:50:05 UTC
I'm writing this from chromium-116 on ppc64le, so it seems to be working fine.
 
PR is here: https://github.com/gentoo/gentoo/pull/32637

I get a crash in dmesg but it might be something GPU related:

[   42.382778] ------------[ cut here ]------------
[   42.382804] WARNING: CPU: 17 PID: 2202 at mm/gup.c:1105 __get_user_pages+0x3d0/0x4e0
[   42.382821] Modules linked in: snd_seq_dummy snd_hrtimer snd_seq xt_CHECKSUM 8021q garp mrp xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 ip6table_mangle ip6table_nat ip6table_filter ip6_tables iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_filter ip_tables bridge stp llc overlay binfmt_misc amdgpu rt2800usb rt2x00usb rt2800lib rt2x00lib mac80211 libarc4 gpu_sched drm_suballoc_helper i2c_algo_bit cfg80211 drm_ttm_helper snd_hda_codec_hdmi ttm uvcvideo uvc rfkill videobuf2_vmalloc at24 joydev videobuf2_memops snd_hda_intel videobuf2_v4l2 snd_intel_dspcfg drm_display_helper videobuf2_common snd_usb_audio snd_hda_codec cec videodev snd_usbmidi_lib snd_hda_core ofpart snd_rawmidi crct10dif_vpmsum snd_hwdep snd_seq_device powernv_flash drm_kms_helper ipmi_powernv snd_pcm ipmi_devintf rtc_opal onboard_usb_hub cfbfillrect mtd snd_timer opal_prd syscopyarea ipmi_msghandler i2c_opal mc cfbimgblt sysfillrect sysimgblt cfbcopyarea snd drm_buddy mfd_core soundcore lz4 lz4_compress zram
[   42.382911]  fuse loop vmx_crypto nvme crc32c_vpmsum tg3 nvme_core nvme_common
[   42.383115] CPU: 17 PID: 2202 Comm: chrome_crashpad Not tainted 6.4.14-gentoo-dist #1
[   42.383128] Hardware name: T2P9S01 REV 1.01 POWER9 0x4e1202 opal:skiboot-9858186 PowerNV
[   42.383158] NIP:  c0000000004571d0 LR: c000000000456ea0 CTR: 0000000000000000
[   42.383178] REGS: c000000007957390 TRAP: 0700   Not tainted  (6.4.14-gentoo-dist)
[   42.383199] MSR:  9000000000029033 <SF,HV,EE,ME,IR,DR,RI,LE>  CR: 48802408  XER: 000000b3
[   42.383238] CFAR: c000000000456eb8 IRQMASK: 0 
               GPR00: c000000000456ea0 c000000007957630 c0000000017ac200 c000000059602960 
               GPR04: c00000005546e308 0000000000000001 000000000000000c 00003fffc3daf000 
               GPR08: 00003fffc3daefff 0000000000000100 00003fffc3d8b000 c00000005546e380 
               GPR12: c00000005546e308 c000000ff6789200 0000000000000000 0000000000000000 
               GPR16: 0000000000000000 c00c000001172c40 0000000000000000 0000000000000001 
               GPR20: 0000000000000000 c000000007957808 0000000000000001 0000000000000001 
               GPR24: 0000000000000000 c000000007957810 c000000007957808 c00000000a1ac780 
               GPR28: c000000007957764 fffffffffffffff2 c000000059602960 000000000005100a 
[   42.383426] NIP [c0000000004571d0] __get_user_pages+0x3d0/0x4e0
[   42.383447] LR [c000000000456ea0] __get_user_pages+0xa0/0x4e0
[   42.383468] Call Trace:
[   42.383483] [c000000007957630] [c000000000456ea0] __get_user_pages+0xa0/0x4e0 (unreliable)
[   42.383510] [c000000007957730] [c000000000457474] get_user_pages_remote+0x194/0x4f0
[   42.383545] [c0000000079577e0] [c00000000046a7d4] __access_remote_vm+0x254/0x440
[   42.383581] [c0000000079578a0] [c00000000063b63c] mem_rw.isra.0+0x17c/0x2d0
[   42.383612] [c000000007957920] [c0000000005554b0] vfs_read+0xe0/0x360
[   42.383633] [c0000000079579f0] [c0000000005566d4] sys_pread64+0xe4/0x150
[   42.383654] [c000000007957a50] [c00000000002f848] system_call_exception+0x178/0x320
[   42.383680] [c000000007957e50] [c00000000000cddc] system_call_vectored_common+0x15c/0x2ec
[   42.383704] --- interrupt: 3000 at 0x3fffaf1e6e44
[   42.383714] NIP:  00003fffaf1e6e44 LR: 0000000000000000 CTR: 0000000000000000
[   42.383753] REGS: c000000007957e80 TRAP: 3000   Not tainted  (6.4.14-gentoo-dist)
[   42.383783] MSR:  900000000280f033 <SF,HV,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE>  CR: 44802400  XER: 00000000
[   42.383826] IRQMASK: 0 
               GPR00: 00000000000000b3 00003fffd0b3a5f0 00003fffaf2f6f00 0000000000000007 
               GPR04: 00003fffd0b3a940 0000000000001000 00003fff8da4c8c0 00003fffaf6f7800 
               GPR08: 00003fffaf6f0148 0000000000000000 0000000000000000 0000000000000000 
               GPR12: 0000000000000000 00003fffaf6f7800 aaaaaaaaaaaaaaaa 000000012ffee648 
               GPR16: 000000012f70c88c 00003fffd0b3cca8 00003fffd0b3cca0 00003fffd0b3cc98 
               GPR20: 00003fffaf2f7a88 0000000000000000 00003fffd0b3cd20 0000000000001000 
               GPR24: 00000d6c00b40000 00003fffd0b3a940 00000d6c00480440 00003fff8da4c8c0 
               GPR28: 00003fffd0b3a940 0000000000000007 0000000000000000 00003fff8da4c8c0 
[   42.384022] NIP [00003fffaf1e6e44] 0x3fffaf1e6e44
[   42.384049] LR [0000000000000000] 0x0
[   42.384057] --- interrupt: 3000
[   42.384073] Code: 4bfffdb8 60000000 60000000 60000000 0fe00000 60000000 60000000 60000000 e93e0020 3ba0fff2 71290100 4182fd50 <0fe00000> 60000000 60000000 60000000 
[   42.384105] ---[ end trace 0000000000000000 ]---

I've also managed to compile electron 26 and it works fine as well: https://github.com/PF4Public/gentoo-overlay/pull/250

Regarding the lack of v8_sandbox on ppc64le unfortunately there are no bugs open yet, I wasn't even aware of it until someone else pointed it out to me and I even briefly mistaken it for chromium's sandbox (which is already supported).

The easiest way to reproduce the issue is this: https://github.com/microsoft/node-spdlog/issues/40

vscode makes use of node-spdlog and that's where the crash occurs, making it far easier to reproduce and debug.

But I highly suggest to read this thread: https://github.com/microsoft/vscode/issues/182743

One of vscode developers pointed out that v8_enable_sandbox ends up being disabled on ppc64le since v8_enable_external_code_space is disabled by default and that might be the issue.

You can also quickly skim through this thread: https://github.com/PF4Public/gentoo-overlay/issues/219

It's the least interesting IMO but a couple of comments towards the end might be worth reading.
Comment 13 Larry the Git Cow gentoo-dev 2023-09-14 15:58:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b93031be7df265cd24de0a11bdd6e1425d987e3

commit 8b93031be7df265cd24de0a11bdd6e1425d987e3
Author:     Niccolò Belli <niccolo.belli@linuxsystems.it>
AuthorDate: 2023-09-05 10:45:25 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-09-14 15:58:18 +0000

    www-client/chromium: fix ppc64 patchset for 116
    
    Closes: https://bugs.gentoo.org/913348
    Signed-off-by: Niccolò Belli <niccolo.belli@linuxsystems.it>
    Closes: https://github.com/gentoo/gentoo/pull/32637
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 www-client/chromium/Manifest                       | 1 +
 www-client/chromium/chromium-116.0.5845.140.ebuild | 6 +++++-
 www-client/chromium/chromium-116.0.5845.187.ebuild | 6 +++++-
 3 files changed, 11 insertions(+), 2 deletions(-)
Comment 14 darkbasic 2023-09-14 20:43:42 UTC
Timothy did you have any chance to look why node-spdlog fails to run its test suite?
Comment 15 Timothy Pearson 2023-09-15 19:32:00 UTC
(In reply to darkbasic from comment #14)
> Timothy did you have any chance to look why node-spdlog fails to run its
> test suite?

Sorry, I had my hands full with chromium 117 this week.  I'll start digging into that early next week.
Comment 16 Timothy Pearson 2023-09-22 23:11:19 UTC
(In reply to Timothy Pearson from comment #15)
> (In reply to darkbasic from comment #14)
> > Timothy did you have any chance to look why node-spdlog fails to run its
> > test suite?
> 
> Sorry, I had my hands full with chromium 117 this week.  I'll start digging
> into that early next week.

Just as a quick update here, I am working on adding the missing sandbox support to v8 for ppc64.  This is the fastest route to fixing not only this issue but other subtle incompatibilities that may arise over time, plus with pointer compression it should reduce memory usage on ppc64 for some of the more complex server-side Web applications.
Comment 17 darkbasic 2023-09-23 09:40:32 UTC
Awesome, keep me posted.
Comment 18 Timothy Pearson 2023-10-06 19:03:27 UTC
(In reply to darkbasic from comment #17)
> Awesome, keep me posted.

Took quite a while, but patches are finally ready for review:

https://chromium-review.googlesource.com/c/v8/v8/+/4915604

Tracking bug here:

https://bugs.chromium.org/p/v8/issues/detail?id=14365
Comment 19 darkbasic 2023-10-09 13:22:58 UTC
Thanks!
Would you mind rebasing on top of electron 26 so I can test it with vscode (which is quite picky about the electron version)?
I've tried myself and for the most part it's straightforward enough, but I'm not sure about some parts.
Comment 20 Timothy Pearson 2023-10-09 15:28:57 UTC
Created attachment 872384 [details, diff]
Electron v8 ppc64 sandbox backport
Comment 21 Timothy Pearson 2023-10-09 15:30:17 UTC
(In reply to darkbasic from comment #19)
> Thanks!
> Would you mind rebasing on top of electron 26 so I can test it with vscode
> (which is quite picky about the electron version)?
> I've tried myself and for the most part it's straightforward enough, but I'm
> not sure about some parts.

It looks like Electron 22's v8 comes from Chromiumn 116, and not only predates pointer sandboxing but is also unbuildable on my v8 development box (Debian Sid) due to libc++ errors.

I've attempted a backport in the attached patch, but since I cannot complete the build process it is currently untested.  Can you give it a try and see if it works?

Thanks!
Comment 22 Timothy Pearson 2023-10-09 15:30:49 UTC
(In reply to Timothy Pearson from comment #21)
> (In reply to darkbasic from comment #19)
> > Thanks!
> > Would you mind rebasing on top of electron 26 so I can test it with vscode
> > (which is quite picky about the electron version)?
> > I've tried myself and for the most part it's straightforward enough, but I'm
> > not sure about some parts.
> 
> It looks like Electron 22's v8 comes from Chromiumn 116, and not only
> predates pointer sandboxing but is also unbuildable on my v8 development box
> (Debian Sid) due to libc++ errors.
> 
> I've attempted a backport in the attached patch, but since I cannot complete
> the build process it is currently untested.  Can you give it a try and see
> if it works?
> 
> Thanks!

Electron 26 that is! :)
Comment 23 darkbasic 2023-10-09 16:45:50 UTC
I guess it fails because of the libstdc++ from gcc 13: https://github.com/PF4Public/gentoo-overlay/issues/261#issuecomment-1740873223

If that's the case you can use Chromium's bundled libcxx.
Anyway I'm having a look right now.
Comment 24 Timothy Pearson 2023-10-09 18:16:39 UTC
(In reply to darkbasic from comment #23)
> I guess it fails because of the libstdc++ from gcc 13:
> https://github.com/PF4Public/gentoo-overlay/issues/261#issuecomment-
> 1740873223
> 
> If that's the case you can use Chromium's bundled libcxx.
> Anyway I'm having a look right now.

Could you open up a new bug report on the Electron issues?  We've managed to merge two completely different threads on this report and I'd like to have a clean bug report to forward upstream.

Thanks!
Comment 25 darkbasic 2023-10-09 18:30:53 UTC
> Could you open up a new bug report on the Electron issues?

I would have loved to do so, bug unfortunately Gentoo doesn't have an electron ebuild in tree. I maintain ppc64 electron on the pf4public overlay, so maybe I can open a bug report there?
Comment 26 darkbasic 2023-10-13 20:17:21 UTC
I've made it far (and even managed to get vscode working with some hacks) but unfortunately the v8 sandbox patch makes node segfault while compiling vscode. Here is the PR where I'm trying to get it working: https://github.com/PF4Public/gentoo-overlay/pull/265
I wonder if adding the patch to node-v18.16.1/deps/v8 as well might fix it but unfortunately the patch needs to be rebased against it in order to apply (and it's just a guess).