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

Bug 838373

Summary: sys-devel/clang: compilation of e.g. www-client/firefox-99.0.1 and mail-client/thunderbird fails (error: always_inline function '_mm_crc32_u64' requires target feature 'crc32')
Product: Gentoo Linux Reporter: Greg Kubaryk <greg.kubaryk>
Component: Current packagesAssignee: LLVM support project <llvm>
Status: CONFIRMED ---    
Severity: normal CC: aliaksei.urbanski, andrey.aleksandrovich, dflogeras2, esigra, gentoo, gentoobugs, herrtimson, ionen, jlambrec, joerg.schaible, kernelpanic, krzysztof, maxi_kroeg, mozilla, mplichta, m_gentoobug, pacho, phmagic, rzubaly, sam, tg42, tka
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=835870
https://bugs.gentoo.org/show_bug.cgi?id=837650
https://bugs.gentoo.org/show_bug.cgi?id=908412
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: compressed build.log
compressed build.log with -mno-sse4.2
Patch in /etc/portage/patches/www-client/firefox

Description Greg Kubaryk 2022-04-14 20:21:05 UTC
Created attachment 770783 [details]
compressed build.log

This is a buildchroot for an older laptop; normally it uses ccache/sccache for certain larger packages but I disabled it for the attached build.log with no effect. The sync-uri is an unmodified local rsync mirror. I had held off on filing a bug when 99.0 failed and 99.0.1 was imminent, but no change. (This is low priority for me as I haven't turned on the old laptop in months, but I'm willing to help as required.)

(buildchroot) hex / # emerge --info                                                                                        !!! It seems /run is not mounted. Process management may malfunction.                                                               
Portage 3.0.30 (python 3.9.12-final-0, default/linux/amd64/17.1/desktop, gcc-11.2.1, glibc-2.35-r2, 4.19.142-gentoo x86_64)         
=================================================================                                                                   
System uname: Linux-4.19.142-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1045T_Processor-with-glibc2.35                                      
KiB Mem:    16172000 total,   3069164 free                                                                                          
KiB Swap:   23246548 total,  23156692 free                                                                                          
Timestamp of repository gentoo: Wed, 13 Apr 2022 20:30:01 +0000                                                                     
Head commit of repository gentoo: bc09afe06d4fc9105bbb6240dfe8fe018f5191b3                                                          
sh bash 5.1_p16                                                                                                                     
ld GNU ld (Gentoo 2.38 p3) 2.38                                                                                                     
ccache version 4.6 [disabled]                                                                                                       
app-misc/pax-utils:        1.3.3::gentoo                                                                                            
app-shells/bash:           5.1_p16::gentoo                                                                                          
dev-java/java-config:      2.3.1::gentoo                                                                                            
dev-lang/perl:             5.34.1::gentoo                                                                                           
dev-lang/python:           3.9.12::gentoo, 3.10.4::gentoo                                                                           
dev-lang/rust-bin:         1.60.0::gentoo                                                                                           
dev-util/ccache:           4.6-r1::gentoo                                                                                           
dev-util/cmake:            3.23.1::gentoo                                                                                           
dev-util/meson:            0.61.4-r2::gentoo                                                                                        
sys-apps/baselayout:       2.8::gentoo                                                                                              
sys-apps/openrc:           0.44.10::gentoo                                                                                          
sys-apps/sandbox:          2.29::gentoo                                                                                             
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo                                                                         
sys-devel/automake:        1.16.5::gentoo                                                                                           
sys-devel/binutils:        2.38-r1::gentoo                                                                                          
sys-devel/binutils-config: 5.4.1::gentoo                                                                                            
sys-devel/clang:           14.0.0-r1::gentoo                                                                                        
sys-devel/gcc:             11.2.1_p20220115::gentoo                                                                                 
sys-devel/gcc-config:      2.5-r1::gentoo                                                                                           
sys-devel/libtool:         2.4.7::gentoo                                                                                            
sys-devel/lld:             14.0.0::gentoo                                                                                           
sys-devel/llvm:            13.0.1::gentoo, 14.0.0::gentoo                                                                           
sys-devel/make:            4.3::gentoo                                                                                              
sys-kernel/linux-headers:  5.17::gentoo (virtual/os-headers)                                                                        
sys-libs/glibc:            2.35-r2::gentoo                                                                                          
Repositories:                                                                                                                       
                                                                                                                                    
gentoo                                                                                                                              
    location: /var/db/repos/gentoo                                                                                                  
    sync-type: rsync                                                                                                                
    sync-uri: rsync://192.168.1.151/gentoo-portage                                                                                  
    priority: -1000                                                                                                                 
    sync-rsync-verify-jobs: 1                                                                                                       
    sync-rsync-verify-max-age: 24                                                                                                   
    sync-rsync-verify-metamanifest: no                                                                                              
    sync-rsync-extra-opts:                                                                                                          
                                                                                                                                    
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                                                      
ACCEPT_LICENSE="@FREE"                                                                                                              
CBUILD="x86_64-pc-linux-gnu"                                                                                                        
CFLAGS="-O2 -pipe -march=native"                                                                                                    
CHOST="x86_64-pc-linux-gnu"                                                                                                         
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"                                                                                
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revde
p-rebuild /etc/sandbox.d /etc/terminfo"                                                                                             
CXXFLAGS="-O2 -pipe -march=native"                                                                                                  
DISTDIR="/var/cache/distfiles"                                                                                                      
EMERGE_DEFAULT_OPTS="--verbose-slot-rebuilds=n --usepkg-exclude 'sys-kernel/* virtual/* */*-bin x11-base/xorg-drivers sys-firmware/*
 www-plugins/*' --buildpkg-exclude 'sys-kernel/* virtual/* */*-bin x11-base/xorg-drivers sys-firmware/* www-plugins/*'"             
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT X
AUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"                                                             
FCFLAGS="-O2 -pipe"                                                                                                                 
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if
-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox p
reserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userf
etch userpriv usersandbox usersync xattr"                                                                                           
FFLAGS="-O2 -pipe"                                                                                                                  
GENTOO_MIRRORS="http://mirrors.rit.edu/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo https://gentoo.
osuosl.org/"                                                                                                                        
LANG="en_US.utf8"                                                                                                                   
LDFLAGS="-Wl,-O1 -Wl,--as-needed"                                                                                                   
MAKEOPTS="-j6"                                                                                                                      
PKGDIR="/var/cache/binpkgs"                                                                                                         
PORTAGE_CONFIGROOT="/"                                                                                                              
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --sta
ts --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"                        
PORTAGE_TMPDIR="/var/tmp"                                                                                                           
SHELL="/bin/bash"                                                                                                                   
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 bash-completion bidi branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd
 dvdr elogind encode exif flac fontconfig fortran gbm gdbm gif gpm gtk gtk3 gui iconv icu ipv6 jpeg lcms libglvnd libnotify libtirpc
 mad mmx mmxext mng mp3 mp4 mpeg multilib ncurses nls nptl obex offensive ogg opengl openmp pam pango pcre pdf png policykit ppds pu
lseaudio qt5 readline sdl seccomp spell split-usr sse sse2 ssl startup-notification svg threads tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_co
re 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 e
xpires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif spe
ling 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="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" ELIBC="glibc" GPSD_PROTOCOLS="asht
ech 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="pc" INPUT_DEVICES="evdev synaptics" 
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_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 
ruby27" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, F77
FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINH
OST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, 
STRINGS, STRIP, YACC, YFLAGS
Comment 1 Ionen Wolkens gentoo-dev 2022-04-14 20:33:09 UTC
24:29.71 /var/tmp/portage/www-client/firefox-99.0.1/work/firefox-99.0.1/gfx/skia/skia/src/opts/SkChecksum_opts.h:39:21: error: always_inline function '_mm_crc32_u64' requires target feature 'crc32', but would be inlined into function 'hash_fn' that is compiled without support for 'crc32'
24:29.71                 a = _mm_crc32_u64(a, sk_unaligned_load<uint64_t>(data+ 0));

Get the feeling this is related to what you were running into before with compiler-rt-sanitizers (was it?) and the whole -msse4.2 / -mcrc32 thing (forgot the details, maybe you'll know better).
Comment 2 Greg Kubaryk 2022-04-14 20:39:56 UTC
(In reply to Ionen Wolkens from comment #1)
> Get the feeling this is related to what you were running into before with
> compiler-rt-sanitizers (was it?) and the whole -msse4.2 / -mcrc32 thing
> (forgot the details, maybe you'll know better).

Quite possibly; that was bug 835870.
Comment 3 Ionen Wolkens gentoo-dev 2022-04-14 20:47:41 UTC
(In reply to Greg Kubaryk from comment #2)
> (In reply to Ionen Wolkens from comment #1)
> > Get the feeling this is related to what you were running into before with
> > compiler-rt-sanitizers (was it?) and the whole -msse4.2 / -mcrc32 thing
> > (forgot the details, maybe you'll know better).
> 
> Quite possibly; that was bug 835870.
Ah thanks, didn't know the bug number.
Comment 4 Adrian Bassett 2022-04-14 21:32:46 UTC
(In reply to Ionen Wolkens from comment #1)
> 24:29.71
> /var/tmp/portage/www-client/firefox-99.0.1/work/firefox-99.0.1/gfx/skia/skia/
> src/opts/SkChecksum_opts.h:39:21: error: always_inline function
> '_mm_crc32_u64' requires target feature 'crc32', but would be inlined into
> function 'hash_fn' that is compiled without support for 'crc32'
> 24:29.71                 a = _mm_crc32_u64(a,
> sk_unaligned_load<uint64_t>(data+ 0));
> 
> Get the feeling this is related to what you were running into before with
> compiler-rt-sanitizers (was it?) and the whole -msse4.2 / -mcrc32 thing
> (forgot the details, maybe you'll know better).
So, I'm seeing this same behaviour with firefox-99.0.1, building with llvm+clang:14;  however, firefox-99.0 built OK but that was with llvm+clang:13.

I have seen some comments (but also reservations) that the imminent 14.0.1 llvm+clang bump might help.  But that's not currently keyworded,
Comment 5 Ionen Wolkens gentoo-dev 2022-04-14 22:26:38 UTC
Haven't tried (can't build right now), but for reproducing purposes on non-affected hardware, USE=clang and adding "-march=native -mno-crc32" to C(XX)FLAGS will likely trigger the issue.

Not a "right" fix, but passing -mno-sse4.2 may in theory be a temporary workaround, assuming build system doesn't try to auto-detect force it back on.
Comment 6 Greg Kubaryk 2022-04-15 00:27:25 UTC
Created attachment 770789 [details]
compressed build.log with -mno-sse4.2

tried to use: CFLAGS="$(portageq envvar CFLAGS) -mno-sse4.2" CXXFLAGS="$(portageq envvar CXXFLAGS) -mno-sse4.2" emerge -1 firefox

the change did seem to take, but the error looks quite similar. perhaps a later portion of the line overrides the override.
Comment 7 Greg Kubaryk 2022-04-15 00:31:31 UTC
I see llvm/clang 14.0.1 just got keyworded; when the change hits the rsync mirrors, I'll upgrade and try again without a workaround, will report back.
Comment 8 Ionen Wolkens gentoo-dev 2022-04-15 00:40:36 UTC
(In reply to Greg Kubaryk from comment #6)
> the change did seem to take, but the error looks quite similar. perhaps a
> later portion of the line overrides the override.
Yeah, unfortunately I see:
x86_64-pc-linux-gnu-clang++ -std=gnu++17 -o SkOpts_sse42.o <snip> -march=native -mno-sse4.2 <snip> .deps/SkOpts_sse42.o.pp  -fcolor-diagnostics -O3 -msse4.2

If still compiling the sse42 file and adding -msse4.2 at the end that won't be doing much, oh well.
Comment 9 Greg Kubaryk 2022-04-15 06:15:31 UTC
(In reply to Greg Kubaryk from comment #7)
> I see llvm/clang 14.0.1 just got keyworded; when the change hits the rsync
> mirrors, I'll upgrade and try again without a workaround, will report back.

no changes with 14.0.1
Comment 10 Adrian Bassett 2022-04-15 09:48:38 UTC
(In reply to Greg Kubaryk from comment #9)
> (In reply to Greg Kubaryk from comment #7)
> > I see llvm/clang 14.0.1 just got keyworded; when the change hits the rsync
> > mirrors, I'll upgrade and try again without a workaround, will report back.
> 
> no changes with 14.0.1

OK, I'll save myself the CPU cycles for now :-)
Comment 11 jospezial 2022-04-15 10:24:07 UTC
libreoffice skia has the same problem.
Bug 837650
Comment 12 jospezial 2022-04-20 17:33:41 UTC
If you want to know how clang resolves -march=native on your system:

/usr/lib/llvm/14/bin/clang-14 -E - -march=native '-###'

Full path circumvents ccache. (in the output "-"=disabled "+"=enabled)
Comment 13 Greg Kubaryk 2022-04-20 19:57:48 UTC
(In reply to jospezial from comment #12)
> If you want to know how clang resolves -march=native on your system:
> 
> /usr/lib/llvm/14/bin/clang-14 -E - -march=native '-###'
> 
> Full path circumvents ccache. (in the output "-"=disabled "+"=enabled)

(buildchroot) hex / # /usr/lib/llvm/14/bin/clang-14 -E - -march=native '-###'
clang version 14.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/14/bin
 (in-process)
 "/usr/lib/llvm/14/bin/clang-14" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-E" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "-" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "amdfam10" "-target-feature" "-avx512pf" "-target-feature" "-tsxldtrk" "-target-feature" "+cx16" "-target-feature" "+sahf" "-target-feature" "-tbm" "-target-feature" "-avx512ifma" "-target-feature" "-sha" "-target-feature" "-crc32" "-target-feature" "-fma4" "-target-feature" "-vpclmulqdq" "-target-feature" "+prfchw" "-target-feature" "-bmi2" "-target-feature" "-cldemote" "-target-feature" "-fsgsbase" "-target-feature" "-ptwrite" "-target-feature" "-amx-tile" "-target-feature" "-uintr" "-target-feature" "-gfni" "-target-feature" "+popcnt" "-target-feature" "-widekl" "-target-feature" "-aes" "-target-feature" "-avx512bitalg" "-target-feature" "-movdiri" "-target-feature" "-xsaves" "-target-feature" "-avx512er" "-target-feature" "-avxvnni" "-target-feature" "-avx512fp16" "-target-feature" "-avx512vnni" "-target-feature" "-amx-bf16" "-target-feature" "-avx512vpopcntdq" "-target-feature" "-pconfig" "-target-feature" "-clwb" "-target-feature" "-avx512f" "-target-feature" "-xsavec" "-target-feature" "-clzero" "-target-feature" "-pku" "-target-feature" "+mmx" "-target-feature" "-lwp" "-target-feature" "-rdpid" "-target-feature" "-xop" "-target-feature" "-rdseed" "-target-feature" "-waitpkg" "-target-feature" "-kl" "-target-feature" "-movdir64b" "-target-feature" "+sse4a" "-target-feature" "-avx512bw" "-target-feature" "-clflushopt" "-target-feature" "-xsave" "-target-feature" "-avx512vbmi2" "-target-feature" "+64bit" "-target-feature" "-avx512vl" "-target-feature" "-serialize" "-target-feature" "-hreset" "-target-feature" "-invpcid" "-target-feature" "-avx512cd" "-target-feature" "-avx" "-target-feature" "-vaes" "-target-feature" "-avx512bf16" "-target-feature" "+cx8" "-target-feature" "-fma" "-target-feature" "-rtm" "-target-feature" "-bmi" "-target-feature" "-enqcmd" "-target-feature" "-rdrnd" "-target-feature" "-mwaitx" "-target-feature" "-sse4.1" "-target-feature" "-sse4.2" "-target-feature" "-avx2" "-target-feature" "+fxsr" "-target-feature" "-wbnoinvd" "-target-feature" "+sse" "-target-feature" "+lzcnt" "-target-feature" "-pclmul" "-target-feature" "-prefetchwt1" "-target-feature" "-f16c" "-target-feature" "-ssse3" "-target-feature" "-sgx" "-target-feature" "-shstk" "-target-feature" "+cmov" "-target-feature" "-avx512vbmi" "-target-feature" "-amx-int8" "-target-feature" "-movbe" "-target-feature" "-avx512vp2intersect" "-target-feature" "-xsaveopt" "-target-feature" "-avx512dq" "-target-feature" "+sse2" "-target-feature" "-adx" "-target-feature" "+sse3" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/" "-resource-dir" "/usr/lib/llvm/14/bin/../../../../lib/clang/14.0.1" "-internal-isystem" "/usr/lib/llvm/14/bin/../../../../lib/clang/14.0.1/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir=/" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "-" "-x" "c" "-"
Comment 14 Xavier Forestier 2022-04-28 08:18:09 UTC
I've checked the following file : 
/var/tmp/portage/www-client/firefox-99.0.1/work/firefox-99.0.1/gfx/skia/generate_mozbuild.py
SSE3, 
Lines 56 supposed an Intel architectures implies SSE3,SSE4,AVX... which is wrong on my old CORE2 (or phenom for the bug author) they should propably uses skia/src/opts/SkOpts_ssse3.cpp only : 

if CONFIG['INTEL_ARCHITECTURE']:
    SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3']
    SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += ['-msse4.1']
    SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
    SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
    SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma']
elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
    CXXFLAGS += CONFIG['NEON_FLAGS']
elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
    SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-march=armv8-a+crc']

I'm not sure, but I think we should patch here : CONFIG['INTEL_ARCHITECTURE'] shouldn't hardcode everything (avx, sse4, hsw?...)
Comment 15 Adrian Bassett 2022-04-28 10:34:19 UTC
(In reply to Xavier Forestier from comment #14)
> I've checked the following file : 
> /var/tmp/portage/www-client/firefox-99.0.1/work/firefox-99.0.1/gfx/skia/
> generate_mozbuild.py
> SSE3, 
> Lines 56 supposed an Intel architectures implies SSE3,SSE4,AVX... which is
> wrong on my old CORE2 (or phenom for the bug author) they should propably
> uses skia/src/opts/SkOpts_ssse3.cpp only : 
I have a 'Core2 Duo CPU (E7200)', and /proc/cpuinfo lists the following relevant flags:

mmx, sse, sse2, pni (=sse3), ssse3, and sse4_1

So, it looks like -msse4.1 is OK but that -msse4.2 should be avoided, for this particular processor at least.

(More detailed CPU information is given with cpuid.)

I also don't have AVX (Intel's Advanced Vector Extensions).

I also, fairly obviously, don't have HSW, which stands for Haswell - Core2 processors are definitely not 4th Generation Intel CPUs.

So, yeah, more granularity does look called for.
Comment 16 Xavier Forestier 2022-04-28 18:32:17 UTC
I've commented the SSE4 / AVX things, it compiles but fails at end (linking step ?) :


# /var/tmp/portage/mail-client/thunderbird-91.8.1/work/thunderbird-91.8.1/gfx # diff skia/moz.build.old skia/moz.build
415,418c415,418
<         'skia/src/opts/SkOpts_avx.cpp',
<         'skia/src/opts/SkOpts_hsw.cpp',
<         'skia/src/opts/SkOpts_sse41.cpp',
<         'skia/src/opts/SkOpts_sse42.cpp',
---
>  #       'skia/src/opts/SkOpts_avx.cpp',
>  #       'skia/src/opts/SkOpts_hsw.cpp',
>  #       'skia/src/opts/SkOpts_sse41.cpp',
>  #       'skia/src/opts/SkOpts_sse42.cpp',
421,424c421,424
<     SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += skia_opt_flags
<     SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += skia_opt_flags
<     SOURCES['skia/src/op

it compiles bts/SkOpts_sse41.cpp'].flags += skia_opt_flags
<     SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += skia_opt_flags
---
>  #   SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += skia_opt_flags
>  #   SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += skia_opt_flags
>  #   SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += skia_opt_flags
>  #   SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += skia_opt_flags
454,457c454,457
<     SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += ['-msse4.1']
<     SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
<     SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
<     SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma']
---
> #    SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += ['-msse4.1']
> #    SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
> #    SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
> #    SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma']
490a491,493
> 
> if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
>     CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']

The error msg :

97:50.42 /var/tmp/portage/mail-client/thunderbird-91.8.1/work/thunderbird_build/_virtualenvs/common/bin/python -m mozbuild.action.check_binary --target ../../../dist/bin/js
97:50.42 ../../config/nsinstall -R -m 755 'TestBufferList' '../../dist/bin'
97:50.42 ../../config/nsinstall -R -m 755 'TestCasting' '../../dist/bin'
97:50.43 ../../config/nsinstall -R -m 755 'TestCeilingFloor' '../../dist/bin'
97:50.44 ../../config/nsinstall -R -m 755 'TestCheckedInt' '../../dist/bin'
97:50.44 ../../config/nsinstall -R -m 755 'TestCompactPair' '../../dist/bin'
97:50.45 ../../config/nsinstall -R -m 755 'TestCountPopulation' '../../dist/bin'
97:50.45 ../../config/nsinstall -R -m 755 'TestCountZeroes' '../../dist/bin'
97:50.46 ../../config/nsinstall -R -m 755 'TestDefineEnum' '../../dist/bin'
97:50.46 ../../config/nsinstall -R -m 755 'TestDoublyLinkedList' '../../dist/bin'
97:50.46 ../../config/nsinstall -R -m 755 'TestEndian' '../../dist/bin'
97:50.46 ld.lld: error: undefined hidden symbol: SkOpts::Init_sse41()
97:50.46 >>> referenced by SkOpts.cpp
97:50.46 >>>               /var/tmp/portage/mail-client/thunderbird-91.8.1/work/thunderbird_build/toolkit/library/build/../../../gfx/skia/SkOpts.o:(SkOpts::Init())
97:50.46 ../../config/nsinstall -R -m 755 'TestEnumeratedArray' '../../dist/bin'
97:50.47 ../../config/nsinstall -R -m 755 'TestEnumSet' '../../dist/bin'
97:50.47 ../../config/nsinstall -R -m 755 'TestEnumTypeTraits' '../../dist/bin'
97:50.47 ld.lld: error: undefined hidden symbol: SkOpts::Init_sse42()
97:50.48 >>> referenced by SkOpts.cpp
97:50.48 >>>               /var/tmp/portage/mail-client/thunderbird-91.8.1/work/thunderbird_build/toolkit/library/build/../../../gfx/skia/SkOpts.o:(SkOpts::Init())
97:50.48 ld.lld: error: undefined hidden symbol: SkOpts::Init_avx()
97:50.48 >>> referenced by SkOpts.cpp
97:50.48 >>>               /var/tmp/portage/mail-client/thunderbird-91.8.1/work/thunderbird_build/toolkit/library/build/../../../gfx/skia/SkOpts.o:(SkOpts::Init())
97:50.48 ld.lld: error: undefined hidden symbol: SkOpts::Init_hsw()
97:50.48 >>> referenced by SkOpts.cpp
97:50.48 >>>               /var/tmp/portage/mail-client/thunderbird-91.8.1/work/thunderbird_build/toolkit/library/build/../../../gfx/skia/SkOpts.o:(SkOpts::Init())
97:50.48 >>> referenced by SkOpts.cpp
97:50.48 >>>               /var/tmp/portage/mail-client/thunderbird-91.8.1/work/thunderbird_build/toolkit/library/build/../../../gfx/skia/SkOpts.o:(SkOpts::Init())
97:50.49 ../../config/nsinstall -R -m 755 'TestFastBernoulliTrial' '../../dist/bin'


ps : my q6600 does not handle SSE4.1 : 

model name      : Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
cpu MHz         : 2910.818
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm pti tpr_shadow vnmi flexpriority vpid dtherm
vmx flags       : vnmi flexpriority tsc_offset vtpr vapic
Comment 17 Xavier Forestier 2022-05-02 15:15:10 UTC
Created attachment 776105 [details, diff]
Patch in /etc/portage/patches/www-client/firefox

This patch allows me to compile both thunderbird and firefox on my (quite old) core 2 Q6600 with SSE3 support only (no SSE4 nor AVX).
Comment 18 Xavier Forestier 2022-05-02 15:20:24 UTC
For some reason SK_CPU_SSE_LEVEL is not set correctly, I've try to fix  "skia/include/core/SkPreConfig.h" but it's not the root cause as compilations still fails (later after 90min :'( )
Comment 19 Xavier Forestier 2022-05-03 05:22:05 UTC
I've removed the patch and  changed my /etc/portage/make.conf
from :
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"

to :
CFLAGS="-march=core2 -mtune=core2 -O2 -pipe"
CXXFLAGS="${CFLAGS}"


it fixes the compilation issue (of course adjust to your real CPU model :) ) 

I've already compiled thunderbird successfully, and I'm compiling firefox right now, and it takes some time, but it's exactly the same source code (for this part).
Comment 20 Xavier Forestier 2022-05-03 07:21:32 UTC
(In reply to Xavier Forestier from comment #19)
> I've already compiled thunderbird successfully, and I'm compiling firefox
> right now, and it takes some time, but it's exactly the same source code
> (for this part).

Firefox is compiled successfully too :)
Comment 21 Greg Kubaryk 2022-05-04 01:52:39 UTC
Build failure also present in 100.
Comment 22 Joonas Niilola gentoo-dev 2022-05-04 05:31:06 UTC
I'm still not fully on map whether this is a clang problem, firefox problem or a Gentoo problem.

Wouldn't hurt if someone with these problems report this to upstream, since if they write a working patch, we can include that in our patchset.
Comment 23 jospezial 2022-05-04 09:20:49 UTC
(In reply to Joonas Niilola from comment #22)
> I'm still not fully on map whether this is a clang problem, firefox problem
> or a Gentoo problem.
> 
> Wouldn't hurt if someone with these problems report this to upstream, since
> if they write a working patch, we can include that in our patchset.

Don't forget:

skia is from google.
https://bugs.chromium.org/p/skia/issues/list
Did somebody see same bug in chromium skia?
and
https://bugs.documentfoundation.org/
for libreoffice skia bug


I did not find a related report anywhere upstream yet.

The strange thing is that it only happens with clang-14 and "-march=native".
Right?
Comment 24 Xavier Forestier 2022-05-04 14:34:28 UTC
-march=native : KO
-march=native -mtune:native KO 
-march=native -mtune=core2 (compiling in progress)
-march=core2 -mtune=core2 OK
Comment 25 Xavier Forestier 2022-05-04 18:33:30 UTC
-march=native : KO
-march=native -mtune:native: KO 
-march=native -mtune=core2: KO

-march=core2 : OK !
-march=core2 -mtune=core2: OK !


so the main fact is -march
Comment 26 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-04 01:38:41 UTC
*** Bug 849584 has been marked as a duplicate of this bug. ***
Comment 27 Ionen Wolkens gentoo-dev 2022-06-16 22:04:50 UTC
*** Bug 852650 has been marked as a duplicate of this bug. ***
Comment 28 Joerg Schaible 2022-06-17 07:07:37 UTC
Same for me, build for firefox-91.10.0 and thunderbird-91.10.0 fails, but libreoffice-7.3.3.2 succeeds.

======== %< =========
$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 5
model name      : AMD Athlon(tm) II X4 645 Processor
stepping        : 3
microcode       : 0x10000c8
cpu MHz         : 3100.000
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs null_seg amd_e400 spectre_v1 spectre_v2
bogomips        : 6184.76
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
$ emerge --info
Portage 3.0.30 (python 3.9.12-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-11.3.0, glibc-2.34-r13, 5.15.41-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.15.41-gentoo-x86_64-x86_64-AMD_Athlon-tm-_II_X4_645_Processor-with-glibc2.34
KiB Mem:     8158580 total,   3872276 free
KiB Swap:   12655612 total,  12251132 free
Timestamp of repository gentoo: Wed, 15 Jun 2022 08:18:28 +0000
Head commit of repository gentoo: 8f473d58269729a5ee8230dc387feea89df9fef4

sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1-r3::gentoo
dev-lang/python:           2.7.18_p15::gentoo, 3.9.12::gentoo, 3.10.4::gentoo
dev-lang/rust:             1.60.0::gentoo
dev-util/cmake:            3.22.4::gentoo
dev-util/meson:            0.61.4-r2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           13.0.1::gentoo, 14.0.4::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.4::gentoo
sys-devel/llvm:            13.0.1::gentoo, 14.0.4::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r13::gentoo
Repositories:

gentoo
    location: /mnt/portage/tree/central
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

local
    location: /mnt/portage/tree/local
    masters: gentoo

Installed sets: @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.8/conf /usr/share/themes/oxygen-gtk/gtk-2.0"
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="-O2 -march=native -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"
DISTDIR="/mnt/portage/distfiles/knoepfle"
EMERGE_DEFAULT_OPTS="--autounmask=n --with-bdeps=y"
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"
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 splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.heanet.ie/pub/gentoo/ http://mirror.netcologne.de/gentoo/ http://ftp.cc.uoc.gr/mirrors/linux/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://ftp.klid.dk/gentoo/ ftp://mirror.qubenet.net/mirror/gentoo/ ftp://mirror.cambrium.nl/pub/os/linux/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en en_GB en_US fr"
MAKEOPTS="-j4 -s"
PKGDIR="/mnt/portage/packages/athlon2"
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/portage"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa amd64 bmp branding bzip2 cairo caps cdda cdr cli crypt cups curl dbus declarative dga dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gpm gstreamer gtk gui iconv icu idn jpeg jpeg2k kde kwallet lcms libglvnd libnotify libtirpc mad maildir mmap mmx mmxext mng mp3 mp4 mpeg multilib mysql ncurses nls nptl odbc ogg opengl openmp openssh pam pango pcre pdf plasma png policykit ppds qml qt5 readline sdl seccomp semantic-desktop spell split-usr sse sse2 ssl startup-notification svg syslog threads tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vim-syntax vorbis widgets wxwidgets x264 xattr xcb xml xpm xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2020" ALSA_CARDS="emu10k1x darla20 darla24 emu10k1 gina20 gina24 hdsp hdspm ice1712 indigo indigoio layla20 layla24 mia mixart mona pcxhr rme32 rme96 sb16 sbawe sscape usbusx2y vx222 usb-usx2y" 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" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 3dnow 3dnowext popcnt sse3 sse4a" 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="multiboot pc" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en" 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" RUBY_TARGETS="ruby27" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, 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 29 David Flogeras 2022-06-17 11:00:05 UTC
Me too.

cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 14
model name      : Genuine Intel(R) CPU           T2060  @ 1.60GHz
stepping        : 12
microcode       : 0x59
cpu MHz         : 1514.438
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ht tm pbe nx constant_tsc arch_perfmon bts cpuid aperfmperf pni monitor est tm2 xtpr pdcm dtherm
bugs            : cpu_meltdown spectre_v1 spectre_v2 l1tf mds swapgs itlb_multihit
bogomips        : 3191.96
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 32 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 14
model name      : Genuine Intel(R) CPU           T2060  @ 1.60GHz
stepping        : 12
microcode       : 0x59
cpu MHz         : 800.000
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fdiv_bug        : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ht tm pbe nx constant_tsc arch_perfmon bts cpuid aperfmperf pni monitor est tm2 xtpr pdcm dtherm
bugs            : cpu_meltdown spectre_v1 spectre_v2 l1tf mds swapgs itlb_multihit
bogomips        : 3191.96
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 32 bits virtual
power management:



emerge --info
Portage 3.0.30 (python 3.9.12-final-0, default/linux/x86/17.0/desktop/plasma, gcc-11.3.0, glibc-2.34-r13, 5.15.41-gentoo i686)
=================================================================
System uname: Linux-5.15.41-gentoo-i686-Genuine_Intel-R-_CPU_T2060_@_1.60GHz-with-glibc2.34
KiB Mem:     3097292 total,   1001276 free
KiB Swap:    2097148 total,   1941288 free
Timestamp of repository gentoo: Thu, 16 Jun 2022 06:00:01 +0000
Head commit of repository gentoo: 1b6dc159b05e62a66fae07032e545be66168ad7d
sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1-r3::gentoo
dev-lang/python:           3.9.12::gentoo
dev-lang/rust:             1.60.0::gentoo
dev-util/cmake:            3.22.4::gentoo
dev-util/meson:            0.61.4-r2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           14.0.4::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.4::gentoo
sys-devel/llvm:            14.0.4::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r13::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://192.168.0.10/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

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

Installed sets: @uml
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="@FREE"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="i686-pc-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="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
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 -march=i686 -pipe"
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 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa branding bzip2 cairo cdda cdr cli crypt dbus declarative dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gpm gtk gui iconv icu jpeg kde kwallet lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf plasma png policykit ppds qml qt5 readline sdl seccomp spell split-usr ssl startup-notification svg threads tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 x86 xattr xcb xinerama xml xv xvid zlib" ABI_X86="32" 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="words sheets flow stage" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="sse sse2 sse3 mmx mmxext" 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="pc" INPUT_DEVICES="libinput evdev synaptics" KERNEL="linux" L10N="en" 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" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="intel i915" 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, 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 30 Michal Plichta 2022-06-25 11:21:50 UTC
firefox-101.0.1-r11
-------------------
33:29.70 In file included from /var/tmp/portage/www-client/firefox-101.0.1-r11/work/firefox-101.0.1/gfx/skia/skia/src/opts/SkOpts_sse42.cpp:11:
33:29.70 /var/tmp/portage/www-client/firefox-101.0.1-r11/work/firefox-101.0.1/gfx/skia/skia/src/opts/SkChecksum_opts.h:39:21: error: always_inline function '_mm_crc32_u64' requires target feature 'crc32', but would be inlined into function 'hash_fn' that is compiled without support for 'crc32'
33:29.70                 a = _mm_crc32_u64(a, sk_unaligned_load<uint64_t>(data+ 0));
33:29.70                     ^
33:29.70 /var/tmp/portage/www-client/firefox-101.0.1-r11/work/firefox-101.0.1/gfx/skia/skia/src/opts/SkChecksum_opts.h:40:21: error: always_inline function '_mm_crc32_u64' requires target feature 'crc32', but would be inlined into function 'hash_fn' that is compiled without support for 'crc32'
33:29.70                 b = _mm_crc32_u64(b, sk_unaligned_load<uint64_t>(data+ 8));
33:29.70                     ^
33:29.70 /var/tmp/portage/www-client/firefox-101.0.1-r11/work/firefox-101.0.1/gfx/skia/skia/src/opts/SkChecksum_opts.h:41:21: error: always_inline function '_mm_crc32_u64' requires target feature 'crc32', but would be inlined into function 'hash_fn' that is compiled without support for 'crc32'
33:29.71                 c = _mm_crc32_u64(c, sk_unaligned_load<uint64_t>(data+16));
33:29.71                     ^
33:29.71 /var/tmp/portage/www-client/firefox-101.0.1-r11/work/firefox-101.0.1/gfx/skia/skia/src/opts/SkChecksum_opts.h:45:37: error: always_inline function '_mm_crc32_u32' requires target feature 'crc32', but would be inlined into function 'hash_fn' that is compiled without support for 'crc32'
33:29.71             hash = _mm_crc32_u32(a, _mm_crc32_u32(b, c));
33:29.72                                     ^
33:29.72 /var/tmp/portage/www-client/firefox-101.0.1-r11/work/firefox-101.0.1/gfx/skia/skia/src/opts/SkChecksum_opts.h:45:20: error: always_inline function '_mm_crc32_u32' requires target feature 'crc32', but would be inlined into function 'hash_fn' that is compiled without support for 'crc32'
33:29.72             hash = _mm_crc32_u32(a, _mm_crc32_u32(b, c));
33:29.72                    ^
33:29.72 /var/tmp/portage/www-client/firefox-101.0.1-r11/work/firefox-101.0.1/gfx/skia/skia/src/opts/SkChecksum_opts.h:50:20: error: always_inline function '_mm_crc32_u64' requires target feature 'crc32', but would be inlined into function 'hash_fn' that is compiled without support for 'crc32'
33:29.72             hash = _mm_crc32_u64(hash, sk_unaligned_load<uint64_t>(data));
33:29.72                    ^
33:29.73 /var/tmp/portage/www-client/firefox-101.0.1-r11/work/firefox-101.0.1/gfx/skia/skia/src/opts/SkChecksum_opts.h:57:20: error: always_inline function '_mm_crc32_u64' requires target feature 'crc32', but would be inlined into function 'hash_fn' that is compiled without support for 'crc32'
33:29.73             hash = _mm_crc32_u64(hash, sk_unaligned_load<uint64_t>(data));
33:29.74                    ^
33:29.74 /var/tmp/portage/www-client/firefox-101.0.1-r11/work/firefox-101.0.1/gfx/skia/skia/src/opts/SkChecksum_opts.h:66:22: error: always_inline function '_mm_crc32_u32' requires target feature 'crc32', but would be inlined into function 'hash_fn' that is compiled without support for 'crc32'
33:29.74             hash32 = _mm_crc32_u32(hash32, sk_unaligned_load<uint32_t>(data));
33:29.74                      ^
33:29.74 /var/tmp/portage/www-client/firefox-101.0.1-r11/work/firefox-101.0.1/gfx/skia/skia/src/opts/SkChecksum_opts.h:70:22: error: always_inline function '_mm_crc32_u16' requires target feature 'crc32', but would be inlined into function 'hash_fn' that is compiled without support for 'crc32'
33:29.74             hash32 = _mm_crc32_u16(hash32, sk_unaligned_load<uint16_t>(data));
33:29.74                      ^
33:29.74 /var/tmp/portage/www-client/firefox-101.0.1-r11/work/firefox-101.0.1/gfx/skia/skia/src/opts/SkChecksum_opts.h:74:22: error: always_inline function '_mm_crc32_u8' requires target feature 'crc32', but would be inlined into function 'hash_fn' that is compiled without support for 'crc32'
33:29.75             hash32 = _mm_crc32_u8(hash32, sk_unaligned_load<uint8_t>(data));
33:29.75                      ^
33:29.75 10 errors generated.

----------------------------------
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     E8500  @ 3.16GHz
stepping	: 10
microcode	: 0xa0e
cpu MHz		: 3158.641
cache size	: 6144 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm pti tpr_shadow vnmi flexpriority vpid dtherm
vmx flags	: vnmi flexpriority tsc_offset vtpr vapic
bugs		: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips	: 6317.28
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

-----------------------------------
Portage 3.0.30 (python 3.9.13-final-0, default/linux/amd64/17.1/desktop, gcc-11.3.0, glibc-2.34-r13, 5.15.41-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.15.41-gentoo-x86_64-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8500_@_3.16GHz-with-glibc2.34
KiB Mem:     8079872 total,   3607520 free
KiB Swap:   17835004 total,  15557256 free
Timestamp of repository gentoo: Sat, 25 Jun 2022 01:00:01 +0000
Head commit of repository gentoo: cfc2dad8e08d3822c8086b517c7e1e4c6c67e5c9
Timestamp of repository dotnet: Wed, 22 Jun 2022 16:10:21 +0000
Head commit of repository dotnet: edbf7fbd31057507f1adb36b66fc9c1fb449ecd4

Timestamp of repository guru: Sat, 25 Jun 2022 00:47:39 +0000
Head commit of repository guru: 4be19bbedfc28ab8927fde158ca46f12f47f7e14

Timestamp of repository torbrowser: Wed, 22 Jun 2022 16:10:29 +0000
Head commit of repository torbrowser: 8bf73659f48646f39b3cd1e706ea8eb742e2e9d4

sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
ccache version 4.5.1 [enabled]
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1-r3::gentoo
dev-lang/python:           3.9.13::gentoo, 3.10.5::gentoo
dev-lang/rust:             1.60.0::gentoo
dev-util/ccache:           4.5.1::gentoo
dev-util/cmake:            3.22.4::gentoo
dev-util/meson:            0.61.4-r2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::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.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           14.0.4::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.4::gentoo
sys-devel/llvm:            13.0.1::gentoo, 14.0.4::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r13::gentoo
Repositories:

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

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

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

phoebe
    location: /usr/local/portage
    masters: gentoo

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
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=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
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="-march=native -O2 -pipe -fomit-frame-pointer"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live ccache 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="-march=native -O2 -pipe -fomit-frame-pointer"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en-US pl"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg kde lcms libglvnd libnotify libtirpc lm-sensors mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon png policykit ppds qt5 readline sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg tiff tk truetype udev udisks unicode upower usb vim-syntax vorbis wxwidgets x264 xattr xcb xinerama xml xv xvid zlib" 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="mmx mmxext sse sse2 sse3 sse4_1 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US pl" 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" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="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, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, 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 31 Martin 2022-06-25 18:51:35 UTC
(In reply to Greg Kubaryk from comment #0)
> Created attachment 770783 [details]
> compressed build.log

> CFLAGS="-O2 -pipe -march=native"                                            

See similarly for https://bugs.gentoo.org/837650


For a workaround, "-march=x86-64 -O2 -pipe" works for me,

and also for my old AMD system:

"-march=amdfam10 -mtune=amdfam10 -Os -fomit-frame-pointer -pipe -fstack-protector-strong"


From reading elsewhere, is this a problem with a clash with the flags for "-msse4a" ?

Good luck,
Martin
Comment 32 Martin 2022-06-27 20:14:03 UTC
For my old AMD Phenom II cpu (-march amdfam10).


In /etc/portage/make.conf, using:

CFLAGS="-march=native -mtune=native -Os -fomit-frame-pointer -pipe -fstack-protector-strong"
CXXFLAGS="${CFLAGS}"

gcc compiles an emerge fine, whereas llvm clang-14/rust suffers the emerge failing...


For example for attempting to emerge mail-client/thunderbird including the USE flag "clang":

 * ERROR: mail-client/thunderbird-91.10.0::gentoo failed (compile phase):
 *   (no error message)

Whereas, emerging thunderbird with the clang USE flag set to "-clang" to instead use gcc, completes fine.

Also, setting "-march=amdfam10 -mtune=amdfam10" allows the emerge to succeed for both "clang" and "-clang" for the USE flags.


Hopefully that gives some clues to the fail?

Is there any special reason to be using clang for compiling?


Regards,
Martin
Comment 33 Martin 2022-06-27 23:02:04 UTC
(In reply to Martin from comment #32)
> For my old AMD Phenom II cpu (-march amdfam10).
> 
> 
> In /etc/portage/make.conf, using:
> 
> CFLAGS="-march=native -mtune=native -Os -fomit-frame-pointer -pipe
> -fstack-protector-strong"
> CXXFLAGS="${CFLAGS}"
> 
> gcc compiles an emerge fine, whereas llvm clang-14/rust suffers the emerge
> failing...


To confirm for www-client/firefox-101.0.1-r11:

Using "-march=native -mtune=native" and USE "-clang" to use gcc, emerge completes fine.

> Also, setting "-march=amdfam10 -mtune=amdfam10" allows the emerge to succeed
> for both "clang" and "-clang" for the USE flags.


Using "-march=native -mtune=native" and USE "clang" and the emerge fails:

 * ERROR: www-client/firefox-101.0.1-r11::gentoo failed (compile phase):
 *   (no error message)


> Hopefully that gives some clues to the fail?
> 
> Is there any special reason to be using clang for compiling?

Regards,
Martin
Comment 34 Joonas Niilola gentoo-dev 2022-06-30 08:13:11 UTC
*** Bug 855260 has been marked as a duplicate of this bug. ***
Comment 35 Joonas Niilola gentoo-dev 2022-06-30 08:13:19 UTC
*** Bug 855257 has been marked as a duplicate of this bug. ***
Comment 36 Octavian 2022-07-01 05:58:04 UTC
Is the firefox build better with llvm or gcc? size /speed?
Comment 37 Joonas Niilola gentoo-dev 2022-07-01 07:50:51 UTC
(In reply to Octavian from comment #36)
> Is the firefox build better with llvm or gcc? size /speed?

Upstream focuses more on clang support - but browser benchmarks gives me somewhat equal score between binary built with -clang/+clang. I don't see/feel a difference when using Firefox.
Comment 38 Martin 2022-07-04 13:17:52 UTC
Update for emerging www-client/firefox-102.0:

On an (old) AMD PhenomII

/proc/cpuinfo:

flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt cpb hw_pstate vmmcall npt lbrv svm_lock nrip_save pausefilter
bugs		: tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs null_seg amd_e400 spectre_v1 spectre_v2


Using clang:

FAIL: CFLAGS="-march=native -mtune=native -Os -fomit-frame-pointer -pipe -fstack-protector-strong"

FAIL: CFLAGS="-march=native -mtune=generic -Os -fomit-frame-pointer -pipe -fstack-protector-strong"

Success: CFLAGS="-march=amdfam10 -mtune=amdfam10 -m3dnow -mabm -mcx16 -mfxsr -mlzcnt -mmmx -mpopcnt -mprfchw -msahf -msse -msse2 -msse3 -msse4a --param=l1-cache-line-size=64 --param=l1-cache-size=64 --param=l2-cache-size=512 -Os -fomit-frame-pointer -pipe -fstack-protector-s
trong"

(Also success if only CFLAGS="-march=amdfam10 -mtune=amdfam10" were to be used.)

My impression from running multiple permutations of the compile flags, is that the single fail point for compiling (with the "clang" USE flag) is when CFLAGS is set to use "-march=native"

Hopefully of interest for debug?


Thanks,
Martin
Comment 39 Martin 2022-07-04 18:10:43 UTC
(In reply to Martin from comment #38)
> Update for emerging www-client/firefox-102.0:
> 
> On an (old) AMD PhenomII
...
> Using clang:
> 
> FAIL: CFLAGS="-march=native -mtune=native -Os -fomit-frame-pointer -pipe
> -fstack-protector-strong"
> 
> FAIL: CFLAGS="-march=native -mtune=generic -Os -fomit-frame-pointer -pipe
> -fstack-protector-strong"
> 
> Success: CFLAGS="-march=amdfam10 -mtune=amdfam10 -m3dnow -mabm -mcx16 -mfxsr
> -mlzcnt -mmmx -mpopcnt -mprfchw -msahf -msse -msse2 -msse3 -msse4a
> --param=l1-cache-line-size=64 --param=l1-cache-size=64
> --param=l2-cache-size=512 -Os -fomit-frame-pointer -pipe -fstack-protector-s
> trong"
> 
> (Also success if only CFLAGS="-march=amdfam10 -mtune=amdfam10" were to be
> used.)

Using gcc, emerging www-client/firefox-102.0 completes fine for "-march=native -mtune=native".


There is the exact same story of clang fails/success and gcc success for emerging mail-client/thunderbird-91.11.0.


This is for:

sys-devel/clang-14.0.4

dev-lang/rust-1.60.0

sys-devel/gcc-11.3.0


> My impression from running multiple permutations of the compile flags, is
> that the single fail point for compiling (with the "clang" USE flag) is when
> CFLAGS is set to use "-march=native"


Hopefully of interest for debug?

Thanks,
Martin
Comment 40 Michelangelo Scopelliti 2022-07-21 08:08:25 UTC
It is curious. I tried with ivybridge and a barcelona processors on ~amd64 (gcc-12.1.1_p20220625, clang-14.0.6, no ccache) to see the expanded optimizations (in my make.conf, I have "-march=native -mtune=native -O2 -pipe").

clang -E - -march=native -mtune=native -O2 '-###'
and 
clang -E - -march=native -mtune=ivybridge -O2 '-###'

gave the same result, as
gcc -march=native -mtune=native -O2 -Q --help=target
and
gcc -march=native -mtune=ivybridge -O2 -Q --help=target

(the same, of course, happens on barcelona processor).

Yet, consideration of comment #39 apply.
Comment 41 Martin 2022-07-21 10:36:24 UTC
(In reply to Michelangelo Scopelliti from comment #40)
> It is curious. I tried with ivybridge and a barcelona processors on ~amd64
> (gcc-12.1.1_p20220625, clang-14.0.6, no ccache) to see the expanded
> optimizations (in my make.conf, I have "-march=native -mtune=native -O2
> -pipe").
> 
> clang -E - -march=native -mtune=native -O2 '-###'
> and 
> clang -E - -march=native -mtune=ivybridge -O2 '-###'
> 
> gave the same result, as
> gcc -march=native -mtune=native -O2 -Q --help=target
> and
> gcc -march=native -mtune=ivybridge -O2 -Q --help=target
> 
> (the same, of course, happens on barcelona processor).
> 
> Yet, consideration of comment #39 apply.

In contrast... For an AMD PhenomII sytem, we have:

$ clang -E - -march=native -mtune=native -O2 '-###'
clang version 14.0.4
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/14/bin
 (in-process)
 "/usr/lib/llvm/14/bin/clang-14" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-E" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "-" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=none" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "amdfam10" "-target-feature" "-avx512pf" "-target-feature" "-tsxldtrk" "-target-feature" "+cx16" "-target-feature" "+sahf" "-target-feature" "-tbm" "-target-feature" "-avx512ifma" "-target-feature" "-sha" "-target-feature" "-crc32" "-target-feature" "-fma4" "-target-feature" "-vpclmulqdq" "-target-feature" "+prfchw" "-target-feature" "-bmi2" "-target-feature" "-cldemote" "-target-feature" "-fsgsbase" "-target-feature" "-ptwrite" "-target-feature" "-amx-tile" "-target-feature" "-uintr" "-target-feature" "-gfni" "-target-feature" "+popcnt" "-target-feature" "-widekl" "-target-feature" "-aes" "-target-feature" "-avx512bitalg" "-target-feature" "-movdiri" "-target-feature" "-xsaves" "-target-feature" "-avx512er" "-target-feature" "-avxvnni" "-target-feature" "-avx512fp16" "-target-feature" "-avx512vnni" "-target-feature" "-amx-bf16" "-target-feature" "-avx512vpopcntdq" "-target-feature" "-pconfig" "-target-feature" "-clwb" "-target-feature" "-avx512f" "-target-feature" "-xsavec" "-target-feature" "-clzero" "-target-feature" "-pku" "-target-feature" "+mmx" "-target-feature" "-lwp" "-target-feature" "-rdpid" "-target-feature" "-xop" "-target-feature" "-rdseed" "-target-feature" "-waitpkg" "-target-feature" "-kl" "-target-feature" "-movdir64b" "-target-feature" "+sse4a" "-target-feature" "-avx512bw" "-target-feature" "-clflushopt" "-target-feature" "-xsave" "-target-feature" "-avx512vbmi2" "-target-feature" "+64bit" "-target-feature" "-avx512vl" "-target-feature" "-serialize" "-target-feature" "-hreset" "-target-feature" "-invpcid" "-target-feature" "-avx512cd" "-target-feature" "-avx" "-target-feature" "-vaes" "-target-feature" "-avx512bf16" "-target-feature" "+cx8" "-target-feature" "-fma" "-target-feature" "-rtm" "-target-feature" "-bmi" "-target-feature" "-enqcmd" "-target-feature" "-rdrnd" "-target-feature" "-mwaitx" "-target-feature" "-sse4.1" "-target-feature" "-sse4.2" "-target-feature" "-avx2" "-target-feature" "+fxsr" "-target-feature" "-wbnoinvd" "-target-feature" "+sse" "-target-feature" "+lzcnt" "-target-feature" "-pclmul" "-target-feature" "-prefetchwt1" "-target-feature" "-f16c" "-target-feature" "-ssse3" "-target-feature" "-sgx" "-target-feature" "-shstk" "-target-feature" "+cmov" "-target-feature" "-avx512vbmi" "-target-feature" "-amx-int8" "-target-feature" "-movbe" "-target-feature" "-avx512vp2intersect" "-target-feature" "-xsaveopt" "-target-feature" "-avx512dq" "-target-feature" "+sse2" "-target-feature" "-adx" "-target-feature" "+sse3" "-tune-cpu" "amdfam10" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/home/martin/gentoo/bugs" "-resource-dir" "/usr/lib/llvm/14/bin/../../../../lib/clang/14.0.4" "-internal-isystem" "/usr/lib/llvm/14/bin/../../../../lib/clang/14.0.4/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-O2" "-fdebug-compilation-dir=/home/martin/gentoo/bugs" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "-" "-x" "c" "-"

$ clang -E - -march=amdfam10 -mtune=amdfam10 -O2 '-###'
clang version 14.0.4
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/14/bin
 (in-process)
 "/usr/lib/llvm/14/bin/clang-14" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-E" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "-" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=none" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "amdfam10" "-tune-cpu" "amdfam10" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/home/martin/gentoo/bugs" "-resource-dir" "/usr/lib/llvm/14/bin/../../../../lib/clang/14.0.4" "-internal-isystem" "/usr/lib/llvm/14/bin/../../../../lib/clang/14.0.4/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-O2" "-fdebug-compilation-dir=/home/martin/gentoo/bugs" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "-" "-x" "c" "-"

... Quite different!

Is the clang fail due to the extra assumptions for "native"?...


Regards,
Martin
Comment 42 Zdenek Sojka 2022-07-21 19:29:38 UTC
(In reply to jospezial from comment #23)
> (In reply to Joonas Niilola from comment #22)
> > I'm still not fully on map whether this is a clang problem, firefox problem
> > or a Gentoo problem.
> > 
> > Wouldn't hurt if someone with these problems report this to upstream, since
> > if they write a working patch, we can include that in our patchset.
> 
> Don't forget:
> 
> skia is from google.
> https://bugs.chromium.org/p/skia/issues/list
> Did somebody see same bug in chromium skia?
> and
> https://bugs.documentfoundation.org/
> for libreoffice skia bug
> 
> 
> I did not find a related report anywhere upstream yet.
> 
> The strange thing is that it only happens with clang-14 and "-march=native".
> Right?

I can confirm it fails with www-client/chromium as well:

# uname -a
Linux ntbn61v 5.15.50-gentoo-dist #1 SMP Sun Jun 26 15:23:13 CEST 2022 x86_64 Intel(R) Core(TM)2 Quad CPU Q9000 @ 2.00GHz GenuineIntel GNU/Linux

...

[ebuild     U  ] www-client/chromium-103.0.5060.134:0/stable::gentoo [102.0.5005.115:0/stable::gentoo] USE="X%* js-type-check lto%* official proprietary-codecs suid system-harfbuzz system-icu system-png vaapi (-component-build) -cups -custom-cflags -debug -gtk4 -hangouts (-headless) -kerberos -libcxx -pic -pulseaudio -screencast (-selinux) (-system-ffmpeg) -wayland -widevine" L10N="cs -af -am -ar -bg -bn -ca -da -de -el -en-GB -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -ur -vi -zh-CN -zh-TW" 0 KiB

...

FAILED: obj/skia/skia_opts_sse42/SkOpts_sse42.o
x86_64-pc-linux-gnu-clang++ -MMD -MF obj/skia/skia_opts_sse42/SkOpts_sse42.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 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_ENABLE_SKSL -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_WIN_FONTMGR_NO_SIMULATIONS -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DVK_USE_PLATFORM_XCB_KHR -DSKIA_IMPLEMENTATION=1 -DSK_GAMMA_EXPONENT=1.2 -DSK_GAMMA_CONTRAST=0.2 -DSK_DEFAULT_FONT_CACHE_LIMIT=20971520 -I../.. -Igen -I../../third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/vulkan-deps/vulkan-headers/src/include -msse4.2 -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -flto=thin -fsplit-lto-unit -fwhole-program-vtables -no-canonical-prefixes -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wall -Wno-unused-variable -Wno-c++11-narrowing -Wno-unused-but-set-variable -Wno-misleading-indentation -Wno-missing-field-initializers -Wno-unused-parameter -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-psabi -Wno-ignored-pragma-optimize -Wno-unqualified-std-cast-call -std=c++17 -std=c++17 -Wno-trigraphs -fno-aligned-new -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -Wno-c++17-extensions -O2 -march=native -fno-stack-protector -pipe -Wno-unknown-warning-option -c ../../third_party/skia/src/opts/SkOpts_sse42.cpp -o obj/skia/skia_opts_sse42/SkOpts_sse42.o
In file included from ../../third_party/skia/src/opts/SkOpts_sse42.cpp:11:
../../third_party/skia/src/opts/SkChecksum_opts.h:25:16: error: always_inline function '_mm_crc32_u64' requires target feature 'crc32', but would be inlined into function 'crc32c_8' that is compiled without support for 'crc32'
        return _mm_crc32_u64(seed, v);
               ^
../../third_party/skia/src/opts/SkChecksum_opts.h:22:66: error: always_inline function '_mm_crc32_u32' requires target feature 'crc32', but would be inlined into function 'crc32c_4' that is compiled without support for 'crc32'
    static uint32_t crc32c_4(uint32_t seed, uint32_t v) { return _mm_crc32_u32(seed, v); }
                                                                 ^
../../third_party/skia/src/opts/SkChecksum_opts.h:21:66: error: always_inline function '_mm_crc32_u8' requires target feature 'crc32', but would be inlined into function 'crc32c_1' that is compiled without support for 'crc32'
    static uint32_t crc32c_1(uint32_t seed, uint8_t  v) { return _mm_crc32_u8(seed, v); }
                                                                 ^
3 errors generated.
ninja: build stopped: subcommand failed.
Comment 43 Mike Gilbert gentoo-dev 2022-07-28 02:49:50 UTC
*** Bug 861536 has been marked as a duplicate of this bug. ***
Comment 44 jplx 2022-08-01 01:01:49 UTC
Using the use flag "-clang" allows firefox to compile successfully on my two computers that were failing. I noticed that they do not have the CPU flags (features): pclmul popcnt sse4_2
Other computers that did have those flags had no problem to compile firefox with the clang tool chain.
Comment 45 Kunszt Arpad 2022-08-03 22:47:27 UTC
Using clang firefox failed to compile on my computer using `-march native`. It compiled without any issue using gcc. I have a Ryzen 5 3600 CPU which is not the latest and greatest but not an antique one either.

```
Portage 3.0.30 (python 3.10.5-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-11.3.0, glibc-2.35-r8, 5.15.52-gentoo-syrius x86_64)
=================================================================
System uname: Linux-5.15.52-gentoo-syrius-x86_64-AMD_Ryzen_5_3600_6-Core_Processor-with-glibc2.35
KiB Mem:    32834924 total,  17675656 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 03 Aug 2022 19:15:01 +0000
Head commit of repository gentoo: 5cfab0763f7626a8e5759eee454d69ea4882c55a
Timestamp of repository guru: Tue, 02 Aug 2022 12:01:53 +0000
Head commit of repository guru: de6b4cd8dc0cee9419091ee9e5c03ed06b9b95f3

sh bash 5.1_p16-r1
ld GNU ld (Gentoo 2.38 p4) 2.38
app-misc/pax-utils:        1.3.4::gentoo
app-shells/bash:           5.1_p16-r1::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1-r3::gentoo
dev-lang/python:           2.7.18_p15::gentoo, 3.10.5::gentoo
dev-lang/rust:             1.62.1::gentoo
dev-util/cmake:            3.22.4::gentoo
dev-util/meson:            0.62.2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r2::gentoo, 2.69-r5::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:             11.3.0::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.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r8::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.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

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -mtune=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
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="-O2 -pipe -march=native -mtune=native"
DISTDIR="/usr/portage/distfiles"
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"
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"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="hu_HU.UTF-8"
LC_ALL="hu_HU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="hu"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind encode exif ffmpeg flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg kde kwallet lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf plasma png policykit ppds pulseaudio qml qt5 readline sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg tiff truetype udev udisks unicode upower usb vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64 32" 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 sha sse sse2 sse3 sse4_1 sse4_2 sse4a 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 pc" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en hu" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport" LLVM_TARGETS="AMDGPU X86" LUA_SINGLE_TARGET="lua5-4" 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" USERLAND="GNU" VIDEO_CARDS="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, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LD, LEX, LFLAGS, LIBTOOL, 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 46 Cecil Curry 2022-08-18 05:43:31 UTC
I can confirm that Clang under older processors is the culprit. It might be advisable for Firefox ebuilds to at least strip the "+" from the "clang" USE flag. Clang breaks Firefox, so that certainly shouldn't be the default.

Until upstream Clang or Firefox resolves their critical breakage, Firefox ebuilds should arguably also:

* If older processors are trivial to detect, emit a pre-package warning when "clang" is enabled under older processors.
* Else, mask "clang" entirely for Firefox.
Comment 47 Zdenek Sojka 2022-10-08 18:11:36 UTC
This still happens to me with www-client/firefox-102.3.0[clang,pgo,lto], where -march=native resolves to:
# resolve-march-native 
-march=core2 -mcx16 -mfxsr -mmmx -msahf -msse -msse2 -msse3 -msse4.1 -mssse3 -mxsave --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=3072
Comment 48 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-23 08:35:07 UTC
*** Bug 882491 has been marked as a duplicate of this bug. ***
Comment 49 Thomas 2022-11-23 14:36:49 UTC
The problem still occurs with firefox 102.5 and clang 15, cf. 882491.
Unsetting clang and using gcc is a viable workaround for the issue.
Comment 50 Joonas Niilola gentoo-dev 2022-11-23 14:43:13 UTC
So, again... has this been reported upstream? There's very little we can do to fix it on ebuild-side. I don't know whether it's a firefox or a clang/llvm issue but since it seems to affect libreoffice too and works with gcc, I'd maybe start by reporting it to llvm/clang.
Comment 51 Thomas 2022-11-23 14:57:38 UTC
(In reply to Joonas Niilola from comment #50)
> whether it's a firefox or a clang/llvm issue

It is a firefox issue, or, more precise, a skia issue.

The firefox build wants clang to inline a function which cannot be inlined, if certain instructions are not available.  Clang's error message seems valid.  (Whatever gcc does in the same situation...)

However, this is only triggered if -march=native is smuggled into CFLAGS, which is quite specific for gentoo.

So i suspect upstream might decline this with the valid point "don't use -march=native, then".

BTW: someone might "confirm" this issue. ;-)
Comment 52 jospezial 2022-11-24 21:23:57 UTC
The big question is: Is it possibly fixed already by google?

If you look at
https://github.com/google/skia/branches/all
latest release branch there is 109
it looks as the commit only go to main branch and then they create m(release) branch from it which is then unmaintained.
Recent tags are CanvasKit only
Don't know what CanvasKit is.

Is the firefox major version the skia/chrome version?
chrome in gentoo is binary only?
chromium skia=chrome version?
libreoffice git master branch still uses failing m103 which uses even older opts files.

Somebody with these failing CPUs could checkout that latest source and try compiling it with latest clang (live/release).
Comment 53 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-29 21:57:36 UTC
*** Bug 888904 has been marked as a duplicate of this bug. ***
Comment 54 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-29 21:57:52 UTC
*** Bug 850757 has been marked as a duplicate of this bug. ***
Comment 55 jospezial 2023-02-01 03:33:36 UTC
Please check if you can reproduce the error with newer versions.
And then see since which version it is probably fixed.

libreoffice master branch has been updated to skia-m111

compiled with sys-devel/clang-15.0.7-r1
Comment 56 Joonas Niilola gentoo-dev 2023-02-01 04:44:54 UTC
(In reply to jospezial from comment #55)
> Please check if you can reproduce the error with newer versions.
> And then see since which version it is probably fixed.
> 
> libreoffice master branch has been updated to skia-m111
> 
> compiled with sys-devel/clang-15.0.7-r1

Unfortunately it looks like firefox is still bundling the old skia (version 78 IIRC). I'll try to request an update and see how that goes.
Comment 57 Larry the Git Cow gentoo-dev 2023-06-06 19:21:16 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39cfe283ccf6455b9781e4ac8ac15c9cf9937ed6

commit 39cfe283ccf6455b9781e4ac8ac15c9cf9937ed6
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2023-06-06 19:12:21 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2023-06-06 19:15:33 +0000

    www-client/firefox: add 114.0
    
     - enable 'valgrind' use flag,
     - include couple upstream skia patches from the upcoming 115 release,
     - increase ulimit in the ebuild when using mold linker and 'lto' use flag so
       the build does not fail.
    
    Bug: https://bugs.gentoo.org/838373
    Closes: https://bugs.gentoo.org/700934
    Closes: https://bugs.gentoo.org/905780
    Closes: https://bugs.gentoo.org/906509
    Closes: https://bugs.gentoo.org/907485
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-client/firefox/Manifest             |  101 +++
 www-client/firefox/firefox-114.0.ebuild | 1445 +++++++++++++++++++++++++++++++
 2 files changed, 1546 insertions(+)
Comment 58 Matt Whitlock 2023-12-29 10:01:04 UTC
This has begun afflicting www-client/chromium as well, beginning at version 120, which started forcing compilation using Clang instead of GCC.
Comment 59 Alexey Charkov 2024-01-01 20:46:31 UTC
Still present in version 115.6.0 on Core2 Q9450 with -march=native in CXXFLAGS. Changing -march=native to -march=core2 helps (at the cost of losing SSE4.1 instructions, but not sure if they were relevant here anyway).

Same for Chromium 120.0.6099.129
Comment 60 thunderrd 2024-01-08 08:26:46 UTC
I confirm that the build fails on QX650 as well, changing to -march=Core2 resulted in identical error.

After talking to Sam on IRC, I am going to try -march=native -mno-sse4.2 at his suggestion, will report back.
Comment 61 thunderrd 2024-01-08 08:27:27 UTC
(In reply to thunderrd from comment #60)
> I confirm that the build fails on QX9650 as well, changing to -march=Core2
> resulted in identical error.
> 
> After talking to Sam on IRC, I am going to try -march=native -mno-sse4.2 at
> his suggestion, will report back.
Comment 62 thunderrd 2024-01-08 12:49:23 UTC
Have attempted the above -march=native -mno-sse4.2 to emerge www-client/chromium-120.0.6099.199

Build still fails identically on this version, I guess I will have to wait for progress on this bug.
Comment 63 Matt Whitlock 2024-01-08 19:04:39 UTC
(In reply to thunderrd from comment #60)
> I confirm that the build fails on QX650 as well, changing to -march=Core2
> resulted in identical error.
> 
> After talking to Sam on IRC, I am going to try -march=native -mno-sse4.2 at
> his suggestion, will report back.

The correct argument is -march=core2 (all lowercase), but I'm not sure whether case matters.

CFLAGS="${CFLAGS} -march=core2"
CXXFLAGS="${CXXFLAGS} -march=core2"

I succeeded in building www-client/chromium-120.0.6099.129 on a Core 2 Q6600 with those flags.
Comment 64 thunderrd 2024-01-10 07:52:08 UTC
(In reply to Matt Whitlock from comment #63)
 
> The correct argument is -march=core2 (all lowercase), but I'm not sure
> whether case matters.
> 
> CFLAGS="${CFLAGS} -march=core2"
> CXXFLAGS="${CXXFLAGS} -march=core2"
> 
> I succeeded in building www-client/chromium-120.0.6099.129 on a Core 2 Q6600
> with those flags.

I wanted to report that using your two lines in a per-package env file made it possible to build chromium successfully with my QX9650 processor.

It wasn't the case issue [that was a just a typo on my part in the comment here] but seemingly it was that I had not set the CXXFLAGS, only CFLAGS.

Thanks for the hint, maybe it will help others with older processors.
Comment 65 Andrey Aleksandrovich 2024-02-23 14:36:41 UTC
Same here with firefox-115.7.0 and core 2 duo.