Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 855392 - app-admin/mcelog-183 -- variable ‘cputype’ has initializer but incomplete type
Summary: app-admin/mcelog-183 -- variable ‘cputype’ has initializer but incomplete type
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ben Kohler
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: parallel-make
  Show dependency tree
 
Reported: 2022-06-30 19:00 UTC by Gary E. Miller
Modified: 2022-09-26 15:17 UTC (History)
2 users (show)

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


Attachments
build log (app-admin:mcelog-183:20220630-172723.log,34.73 KB, text/plain)
2022-06-30 19:01 UTC, Gary E. Miller
Details
successful build.log (build.log,17.21 KB, text/plain)
2022-06-30 19:36 UTC, Ben Kohler
Details
build.log -184 fail (app-admin:mcelog-184:20220702-184921.log,34.73 KB, text/plain)
2022-07-02 18:50 UTC, Gary E. Miller
Details
build log 187 -j3 (app-admin:mcelog-187:20220812-185215.log,27.80 KB, text/plain)
2022-08-12 19:03 UTC, Gary E. Miller
Details
buid log 187 -j1 (app-admin:mcelog-187:20220812-190419.log,27.22 KB, text/plain)
2022-08-12 19:06 UTC, Gary E. Miller
Details
successful -j1 build.log on 187 (build.log,17.25 KB, text/plain)
2022-08-12 19:42 UTC, Ben Kohler
Details
v188, -j3, (app-admin:mcelog-188:20220815-175911.log,33.84 KB, text/plain)
2022-08-15 18:12 UTC, Gary E. Miller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gary E. Miller 2022-06-30 19:00:39 UTC
Fails to emerge:

x86_64-pc-linux-gnu-gcc -c -O2 -pipe -march=native  -Wall -Wextra -Wno-missing-f
ield-initializers -Wno-unused-parameter -Wstrict-prototypes -Wformat-security -W
missing-declarations -Wdeclaration-after-statement  -o mcelog.o mcelog.c
mcelog.c:63:6: error: variable ‘cputype’ has initializer but incomplete type
   63 | enum cputype cputype = CPU_GENERIC;
      |      ^~~~~~~

dilbert ~ # emerge -pqv '=app-admin/mcelog-183::gentoo'
[ebuild     U ] app-admin/mcelog-183 [182] USE="(-selinux)" 

dilbert ~ # emerge --info '=app-admin/mcelog-183::gentoo'
Portage 3.0.30 (python 3.10.5-final-0, default/linux/amd64/17.1/desktop, gcc-12.1.1, glibc-2.35-r7, 5.18.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.18.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-8750H_CPU_@_2.20GHz-with-glibc2.35
KiB Mem:    32722268 total,   8131268 free
KiB Swap:   32767996 total,  32766204 free
Timestamp of repository gentoo: Thu, 30 Jun 2022 16:45:01 +0000
Head commit of repository gentoo: 22422f80d5d28b5943c3af78791baf66a856a665
Head commit of repository brother-overlay: 843fdeb30008cbbe6361ef47a127d3489a0e66a7

sh bash 5.1_p16
ld GNU ld (Gentoo 2.38 p4) 2.38
app-misc/pax-utils:        1.3.4::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-lang/perl:             5.36.0::gentoo
dev-lang/python:           2.7.18_p15::gentoo, 3.9.13::gentoo, 3.10.5::gentoo, 3.11.0_beta3::gentoo
dev-lang/rust:             1.61.0-r1::gentoo
dev-util/cmake:            3.23.2::gentoo
dev-util/meson:            0.62.2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.45.1::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r2::gentoo, 2.71-r1::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/clang:           14.0.6::gentoo
sys-devel/gcc:             11.3.0::gentoo, 12.1.1_p20220625::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.6::gentoo
sys-devel/llvm:            14.0.6::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.18-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r7::gentoo
Repositories:

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

brother-overlay
    location: /var/lib/layman/brother-overlay
    sync-type: git
    sync-uri: https://github.com/stefan-langenmaier/brother-overlay.git
    masters: gentoo
    priority: 50

guru
    location: /var/lib/layman/guru
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git
    masters: gentoo
    priority: 50

vifino-overlay
    location: /var/lib/layman/vifino-overlay
    sync-type: laymansync
    sync-uri: https://github.com/vifino/vifino-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/brother/scanner/brscan4/brsanenetdevice4.cfg /usr/lib64/libreoffice/program/sofficerc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps=y --backtrack=15"
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 -march=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live candy clean-logs 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 sfperms unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3 -l3"
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 acpi adns aio alsa alsa-plugin amd64 appindicator blake2 bluetooth bluray bpf branding bs2b bzip2 cairo calf capstone cdda cdr chromecast cli corefonts cpudetection cron crypt cups curl dav1d dbus dri dri3 drm dts dv dvb dvd dvdr elogind encode equalizer exif extra faac faad fdk fdt ffmpeg ffmpegthumbnailer fingerprint flac fontconfig fontforge fortran fuse gbm gdal gdbm gif gimp gles2 glib gpg gpm gstreamer gtk gtk3 gui harfbuzz hddtemp http2 iconv icu introspection io-uring ipp_autosetup ipv6 jemalloc jpeg keybinder ladspa lastfm lcms libcanberra libglvnd libmpeg2 libmpv libnotify libtirpc lm_sensors lto lv2 lz4 lzma lzo mad matroska md5sum mda-lv2 mng mp3 mp4 mpeg mtp multilib ncurses nfs nfsv41 nls nptl nvenc offensive ogg openal opengl openmp opus pam pango pcap pcre pdf pgo plugins png policykit postproc ppds projectm pulseaudio pvr python qml qt5 readline realtime rtc rtmp rubberband screencast sctp sdl sdl-image seccomp sftp slirp sna snappy snmp sox spandsp spell spice split-usr sqlite ssh ssl startup-notification svg theora threads tiff tools truetype twolame udev udisks unicode update_drivedb upnp upower usb usbredir uxa v4l vaapi vde vdpau vdr vim vim-syntax virgl vlc vmaf vorbis vpx webp wg-quick wxwidgets x264 x265 xa xattr xcb xinerama xml xrandr xv xvid zamaudio zeroconf zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2020" 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_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" INPUT_DEVICES="roccat_savu libinput joystick" KERNEL="linux" L10N="en en-US" 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_9" PYTHON_TARGETS="python3_9 python3_10" RUBY_TARGETS="ruby26 ruby27 ruby31" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="intel i965 nvidia iris nouveau" 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, LEX, 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 1 Gary E. Miller 2022-06-30 19:01:35 UTC
Created attachment 789020 [details]
build log

build log
Comment 2 Ben Kohler gentoo-dev 2022-06-30 19:17:24 UTC
Hmm I'm not able to reproduce this yet, but it would seem that the generated cputype.h file isn't ready/populated when it's needed by mcelog.c.

Can you try with MAKEOPTS="-j1" and see if it works? I've tried with -j3 and -j4 here and cannot get it to fail, but I do still suspect a parallel make issue.
Comment 3 Gary E. Miller 2022-06-30 19:29:18 UTC
No change with  MAKEOPTS="-j1"

Note that I am using gcc x86_64-pc-linux-gnu-12.1.1.  That has been "interessting", even Linus complained about this version of gcc.
Comment 4 Ben Kohler gentoo-dev 2022-06-30 19:36:47 UTC
Created attachment 789023 [details]
successful build.log

I don't think gcc-12 is to blame here.  Take a look at my successful log here and you can see a call "cmp cputype.tmp cputype.h || mv cputype.tmp cputype.h" which actually populates cputype.h immediately before mcelog.c is compiled.

I do not see such a line in your log, so your cputype.h is still an empty file from the earlier "touch cputype.h" call.

This is brand new logic in the Makefile, starting in 183, so I suspect there is some bug in the Makefile code.
Comment 5 Gary E. Miller 2022-06-30 19:56:25 UTC
I can confirm that I have a cputype.tmp, but an empty cputype.h.

I see the Makefile rules:

cputype.tmp lookup_intel_cputype.tmp: FORCE
        ./mkcputype


cputype.h: cputype.tmp
        cmp cputype.tmp cputype.h || mv cputype.tmp cputype.h

And:

.depend: ${SRC}
        touch cputype.h
        ${CC} -MM -I. ${SRC} > .depend.X && mv .depend.X .depend

Can't imagine why anyone would do that...

Been a long time since I touched a Makefile.

I emerged a few times, and it intermitently fails/succeeds.  Maybe make does not always realize that cputype.tmp is newer than cputype.h?  The times are the same:

# ls -l ./mcelog-183/cputype*
-rw-r--r-- 1 portage portage    0 Jun 30 12:54 ./mcelog-183/cputype.h
-rw-r--r-- 1 portage portage 1909 Jun 27 17:20 ./mcelog-183/cputype.table
-rw-r--r-- 1 portage portage  805 Jun 30 12:54 ./mcelog-183/cputype.tmp
Comment 6 Larry the Git Cow gentoo-dev 2022-07-01 15:57:19 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1961f280cedc37559b898cd63622b7c4c2f3024d

commit 1961f280cedc37559b898cd63622b7c4c2f3024d
Author:     Ben Kohler <bkohler@gentoo.org>
AuthorDate: 2022-07-01 15:56:16 +0000
Commit:     Ben Kohler <bkohler@gentoo.org>
CommitDate: 2022-07-01 15:56:19 +0000

    app-admin/mcelog: add 184
    
    Bug: https://bugs.gentoo.org/855392
    
    Signed-off-by: Ben Kohler <bkohler@gentoo.org>

 app-admin/mcelog/Manifest          |  1 +
 app-admin/mcelog/mcelog-184.ebuild | 51 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
Comment 7 Ben Kohler gentoo-dev 2022-07-01 15:57:37 UTC
Can you test 184 and see if it builds reliably now?
Comment 8 Gary E. Miller 2022-07-01 18:27:23 UTC
(In reply to Ben Kohler from comment #7)
> Can you test 184 and see if it builds reliably now?

I just did "eix-sync" and don't see 184 yet.  I'll try Saturday.
Comment 9 Gary E. Miller 2022-07-01 20:40:21 UTC
-184 has the same intermittent build problem.
Comment 10 Ben Kohler gentoo-dev 2022-07-02 11:53:48 UTC
Can you post a fresh build.log? I'm still not able to reproduce this.  Upstream did add a new (Makefile) dependency so I wonder if it's better but still not quite right.
Comment 11 Gary E. Miller 2022-07-02 18:49:51 UTC
It happens most often (hal the time?) on one host: Intel Core i7-8750H CPU @ 2.20GHz
Comment 12 Gary E. Miller 2022-07-02 18:50:36 UTC
Created attachment 789650 [details]
build.log -184 fail

build.log -184 fail
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-02 19:37:26 UTC
Could you share a log of it with j1 too? I'll try diff it with mine then
Comment 14 Ben Kohler gentoo-dev 2022-07-07 14:21:58 UTC
Yes please try with -j1, I'm still completely unable to reproduce this error.
Comment 15 Ben Kohler gentoo-dev 2022-08-09 10:56:54 UTC
Can you see if 187 works better? There's another fix related to this new cputype.h compilation
Comment 16 Gary E. Miller 2022-08-12 19:02:08 UTC
(In reply to Ben Kohler from comment #15)
> Can you see if 187 works better? There's another fix related to this new
> cputype.h compilation

mcelog 187 still fails with -j3
Comment 17 Ben Kohler gentoo-dev 2022-08-12 19:03:06 UTC
Can you try with -j1?
Comment 18 Gary E. Miller 2022-08-12 19:03:25 UTC
Created attachment 799463 [details]
build log 187 -j3

build log mcelog version 187, with -j3
Comment 19 Gary E. Miller 2022-08-12 19:05:31 UTC
(In reply to Ben Kohler from comment #17)
> Can you try with -j1?

Also fails with -j1.  Sorry, I had forgotten about this since emerge gave up trying to build this for me.
Comment 20 Gary E. Miller 2022-08-12 19:06:37 UTC
Created attachment 799465 [details]
buid log 187 -j1

build log, version 187, with -j1
Comment 21 Ben Kohler gentoo-dev 2022-08-12 19:42:10 UTC
Created attachment 799469 [details]
successful -j1 build.log on 187

I'm attaching my successful -j1 log.  For some reason yours is missing the "cmp lookup_intel_cputype.c lookup_intel_cputype.tmp || mv lookup_intel_cputype.tmp lookup_intel_cputype.c" call between the 2 mkcputype calls.
Comment 22 Gary E. Miller 2022-08-12 19:49:49 UTC
(In reply to Ben Kohler from comment #21)
> Created attachment 799469 [details]
> successful -j1 build.log on 187
> 
> I'm attaching my successful -j1 log.  For some reason yours is missing the
> "cmp lookup_intel_cputype.c lookup_intel_cputype.tmp || mv
> lookup_intel_cputype.tmp lookup_intel_cputype.c" call between the 2
> mkcputype calls.

Yeah, looks like a makefile problem.
Comment 23 Gary E. Miller 2022-08-12 19:59:11 UTC
Here is a Makfile fragment:

```
cputype.tmp lookup_intel_cputype.tmp: FORCE
        ./mkcputype

cputype.h: cputype.tmp
        cmp cputype.tmp cputype.h || mv cputype.tmp cputype.h

```

I have a fast 6 core CPU, so I could see a race there.
Comment 24 Gary E. Miller 2022-08-12 20:07:50 UTC
I set PORTAGE_NICENESS="20", no change.

Then I added pid-sandbox to FEATURES, and I can compile.

Before my FEATURES were:

FEATURES="parallel-fetch -strict -sandbox clean-logs candy usersandbox"

Setting FEATURE="" also fails.

Setting just FEATURE="pid-sandbox" works.
Comment 25 Gary E. Miller 2022-08-12 20:11:56 UTC
(In reply to Gary E. Miller from comment #24)
> I set PORTAGE_NICENESS="20", no change.
> 
> Then I added pid-sandbox to FEATURES, and I can compile.
> 
> Before my FEATURES were:
> 
> FEATURES="parallel-fetch -strict -sandbox clean-logs candy usersandbox"
> 
> Setting FEATURE="" also fails.
> 
> Setting just FEATURE="pid-sandbox" works.

This also works: FEATURES="-sandbox"
Comment 26 Ben Kohler gentoo-dev 2022-08-12 20:23:34 UTC
I'm a bit confused as to what combinations of features work or don't work.  Your original emerge --info shows sandbox off and pid-sandbox on, and it didn't work there, right?
Comment 27 Gary E. Miller 2022-08-12 21:01:00 UTC
(In reply to Ben Kohler from comment #26)
> I'm a bit confused as to what combinations of features work or don't work. 
> Your original emerge --info shows sandbox off and pid-sandbox on, and it
> didn't work there, right?

For version 187.

Fails:

FEATURES="parallel-fetch -strict -sandbox clean-logs candy usersandbox"

FEATURE="" also fails.

Works:

FEATURE="pid-sandbox"

FEATURES="parallel-fetch -strict -sandbox clean-logs candy usersandbox pid-sandbox"

FEATURES="-sandbox"

Current "emerge --info"

```
 dilbert ~ # emerge --info
Portage 3.0.34 (python 3.10.6-final-0, default/linux/amd64/17.1/desktop, gcc-12.1.1, glibc-2.35-r8, 5.19.0-gentoo x86_64)
=================================================================
System uname: Linux-5.19.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-8750H_CPU_@_2.20GHz-with-glibc2.35
KiB Mem:    32719824 total,   9343544 free
KiB Swap:   32767996 total,  32767996 free
Timestamp of repository gentoo: Fri, 12 Aug 2022 16:45:01 +0000
Head commit of repository gentoo: 028fa963292020e1d939758a20ab6310d9eb3688
Head commit of repository brother-overlay: 843fdeb30008cbbe6361ef47a127d3489a0e66a7

sh bash 5.1_p16-r1
ld GNU ld (Gentoo 2.38 p4) 2.38
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r1::gentoo
dev-lang/perl:             5.36.0::gentoo
dev-lang/python:           2.7.18_p15::gentoo, 3.9.13_p4::gentoo, 3.10.6_p2::gentoo, 3.11.0_rc1::gentoo
dev-lang/rust:             1.62.1::gentoo
dev-util/cmake:            3.24.0::gentoo
dev-util/meson:            0.63.0::gentoo
sys-apps/baselayout:       2.8-r2::gentoo
sys-apps/openrc:           0.45.2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r2::gentoo, 2.71-r1::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/clang:           14.0.6-r1::gentoo
sys-devel/gcc:             12.1.1_p20220625::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.6::gentoo
sys-devel/llvm:            14.0.6-r2::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.19::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.us.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-jobs: 1

brother-overlay
    location: /var/lib/layman/brother-overlay
    sync-type: git
    sync-uri: https://github.com/stefan-langenmaier/brother-overlay.git
    masters: gentoo
    priority: 50

guru
    location: /var/lib/layman/guru
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git
    masters: gentoo
    priority: 50

vifino-overlay
    location: /var/lib/layman/vifino-overlay
    sync-type: laymansync
    sync-uri: https://github.com/vifino/vifino-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/brother/scanner/brscan4/brsanenetdevice4.cfg /usr/lib64/libreoffice/program/sofficerc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps=y --backtrack=15"
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 -march=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live candy clean-logs 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 sfperms unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3 -l3"
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 acpi adns aio alsa alsa-plugin amd64 appindicator blake2 bluetooth bluray bpf branding bs2b bzip2 cairo calf capstone cdda cdr chromecast cli corefonts cpudetection cron crypt cups curl dav1d dbus dri dri3 drm dts dv dvb dvd dvdr elogind encode equalizer exif extra faac faad fdk fdt ffmpeg ffmpegthumbnailer fingerprint flac fontconfig fontforge fortran fuse gbm gdal gdbm gif gimp gles2 glib gpg gpm gstreamer gtk gtk3 gui harfbuzz hddtemp http2 iconv icu introspection io-uring ipp_autosetup ipv6 jemalloc jpeg keybinder ladspa lastfm lcms libcanberra libglvnd libmpeg2 libmpv libnotify libtirpc lm_sensors lto lv2 lz4 lzma lzo mad matroska md5sum mda-lv2 mng mp3 mp4 mpeg mtp multilib ncurses nfs nfsv41 nls nptl nvenc offensive ogg openal opengl openmp opus pam pango pcap pcre pdf pgo plugins png policykit postproc ppds projectm pulseaudio pvr python qml qt5 readline realtime rtc rtmp rubberband screencast sctp sdl sdl-image seccomp sftp slirp sna snappy snmp sox spandsp spell spice split-usr sqlite ssh ssl startup-notification svg theora threads tiff tools truetype twolame udev udisks unicode update_drivedb upnp upower usb usbredir uxa v4l vaapi vde vdpau vdr vim vim-syntax virgl vlc vmaf vorbis vpx webp wg-quick wxwidgets x264 x265 xa xattr xcb xinerama xml xrandr xv xvid zamaudio zeroconf zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2020" 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_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" INPUT_DEVICES="roccat_savu libinput joystick" KERNEL="linux" L10N="en en-US" 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 python3_9" RUBY_TARGETS="ruby27 ruby31" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="intel i965 nvidia iris nouveau" 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, LEX, 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 28 Gary E. Miller 2022-08-12 21:15:11 UTC
(In reply to Ben Kohler from comment #26)
> Your original emerge --info shows sandbox off and pid-sandbox on,

Here is the first emege --info:

```
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live candy clean-logs 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 sfperms unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
```

"sandbox" is always on unless turned off.  So the original "emerge --info" did not show sandbox on or off, so it was on.

> and it
> didn't work there, right?

Correct, but that was then, that version (183) is not even in portage anymore.

RIght now I only care about 187.
Comment 29 Ben Kohler gentoo-dev 2022-08-15 12:56:09 UTC
We're hoping that this is finally fixed in 188, can you try there?

"v188
Fix generation of cputype files
      Use a grouped rule to indicate to make that the same command generates
both files, instead of rerunning the rule multiple times which causes
all kind of races in parallel builds.

Also use the correct input dependency for the source file"
Comment 30 Gary E. Miller 2022-08-15 18:12:47 UTC
Created attachment 799757 [details]
v188, -j3,

Still no joy.
Comment 31 Gary E. Miller 2022-08-15 18:15:35 UTC
Version 188 still fails for me.  build log uploaded.

FEATURES="parallel-fetch -strict -sandbox clean-logs candy usersandbox  pid-sandbox"


dilbert /usr/src/linux # emerge --info
Portage 3.0.34 (python 3.10.6-final-0, default/linux/amd64/17.1/desktop, gcc-12.1.1, glibc-2.35-r8, 5.19.0-gentoo x86_64)
=================================================================
System uname: Linux-5.19.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-8750H_CPU_@_2.20GHz-with-glibc2.35
KiB Mem:    32719824 total,  14706060 free
KiB Swap:   32767996 total,  32767996 free
Timestamp of repository gentoo: Mon, 15 Aug 2022 17:15:01 +0000
Head commit of repository gentoo: a8198c79fc6110783daef4414105f5018c512045
Head commit of repository brother-overlay: 843fdeb30008cbbe6361ef47a127d3489a0e66a7

sh bash 5.1_p16-r1
ld GNU ld (Gentoo 2.38 p4) 2.38
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r1::gentoo
dev-lang/perl:             5.36.0::gentoo
dev-lang/python:           2.7.18_p15::gentoo, 3.9.13_p4::gentoo, 3.10.6_p2::gentoo, 3.11.0_rc1::gentoo
dev-lang/rust:             1.62.1::gentoo
dev-util/cmake:            3.24.0::gentoo
dev-util/meson:            0.63.0::gentoo
sys-apps/baselayout:       2.8-r2::gentoo
sys-apps/openrc:           0.45.2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r2::gentoo, 2.71-r1::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/clang:           14.0.6-r1::gentoo
sys-devel/gcc:             12.1.1_p20220625::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.6::gentoo
sys-devel/llvm:            14.0.6-r2::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.19::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.us.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

brother-overlay
    location: /var/lib/layman/brother-overlay
    sync-type: git
    sync-uri: https://github.com/stefan-langenmaier/brother-overlay.git
    masters: gentoo
    priority: 50

guru
    location: /var/lib/layman/guru
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git
    masters: gentoo
    priority: 50

vifino-overlay
    location: /var/lib/layman/vifino-overlay
    sync-type: laymansync
    sync-uri: https://github.com/vifino/vifino-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/brother/scanner/brscan4/brsanenetdevice4.cfg /usr/lib64/libreoffice/program/sofficerc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps=y --backtrack=15"
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 -march=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live candy clean-logs 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 sfperms unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3 -l3"
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 acpi adns aio alsa alsa-plugin amd64 appindicator blake2 bluetooth bluray bpf branding bs2b bzip2 cairo calf capstone cdda cdr chromecast cli corefonts cpudetection cron crypt cups curl dav1d dbus dri dri3 drm dts dv dvb dvd dvdr elogind encode equalizer exif extra faac faad fdk fdt ffmpeg ffmpegthumbnailer fingerprint flac fontconfig fontforge fortran fuse gbm gdal gdbm gif gimp gles2 glib gpg gpm gstreamer gtk gtk3 gui harfbuzz hddtemp http2 iconv icu introspection io-uring ipp_autosetup ipv6 jemalloc jpeg keybinder ladspa lastfm lcms libcanberra libglvnd libmpeg2 libmpv libnotify libtirpc lm_sensors lto lv2 lz4 lzma lzo mad matroska md5sum mda-lv2 mng mp3 mp4 mpeg mtp multilib ncurses nfs nfsv41 nls nptl nvenc offensive ogg openal opengl openmp opus pam pango pcap pcre pdf pgo plugins png policykit postproc ppds projectm pulseaudio pvr python qml qt5 readline realtime rtc rtmp rubberband screencast sctp sdl sdl-image seccomp sftp slirp sna snappy snmp sox spandsp spell spice split-usr sqlite ssh ssl startup-notification svg theora threads tiff tools truetype twolame udev udisks unicode update_drivedb upnp upower usb usbredir uxa v4l vaapi vde vdpau vdr vim vim-syntax virgl vlc vmaf vorbis vpx webp wg-quick wxwidgets x264 x265 xa xattr xcb xinerama xml xrandr xv xvid zamaudio zeroconf zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2020" 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_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" INPUT_DEVICES="roccat_savu libinput joystick" KERNEL="linux" L10N="en en-US" 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 python3_9" RUBY_TARGETS="ruby27 ruby31" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="intel i965 nvidia iris nouveau" 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, LEX, 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 32 Gary E. Miller 2022-08-15 18:31:29 UTC
For version 188, different than for 187:

Fails:

FEATURES="parallel-fetch -strict -sandbox clean-logs candy -usersandbox"

FEATURES="parallel-fetch -strict -sandbox clean-logs candy usersandbox pid-sandbox"

FEATURES="-sandbox"

FEATURES="sandbox"

FEATURES="pid-sandbox"

FEATURES=""

Works:

FEATURES="parallel-fetch -strict -sandbox clean-logs candy usersandbox"

No FEATURES= in make.conf
Comment 33 Gary E. Miller 2022-08-15 18:35:06 UTC
Correction:

(In reply to Gary E. Miller from comment #32)
> For version 188, different than for 187:

Fails:

FEATURES="sandbox"

Works:

FEATURES="-sandbox"
Comment 34 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-15 18:51:15 UTC
The sandbox stuff isn't likely relevant, it's just introducing a tiny delay which changes the race.

Can you share a new build.log please?