Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 835870 - sys-libs/compiler-rt-sanitizers-14.0.0 compile error (scudo_crc32.cpp:20:10: error: always_inline function '_mm_crc32_u32' requires target feature 'crc32', but would be inlined into function 'computeHardwareCRC32' that is compiled without support for 'crc
Summary: sys-libs/compiler-rt-sanitizers-14.0.0 compile error (scudo_crc32.cpp:20:10: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-24 02:02 UTC by jospezial
Modified: 2022-07-15 12:24 UTC (History)
10 users (show)

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


Attachments
build.log (build.log,952.04 KB, text/plain)
2022-03-24 02:04 UTC, jospezial
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2022-03-24 02:02:04 UTC
[805/1182] /usr/lib/llvm/14/bin/x86_64-pc-linux-gnu-clang++  -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/..  -DNDEBUG -march=native -mtune=native -O2 -pipe -Wall -std=c++14 -Wno-unused-parameter  -m32 -fno-lto -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -fbuiltin -fno-rtti -Wno-format -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -MD -MT lib/scudo/CMakeFiles/clang_rt.scudo_minimal-i386.dir/scudo_allocator.cpp.o -MF lib/scudo/CMakeFiles/clang_rt.scudo_minimal-i386.dir/scudo_allocator.cpp.o.d -o lib/scudo/CMakeFiles/clang_rt.scudo_minimal-i386.dir/scudo_allocator.cpp.o -c /var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/scudo_allocator.cpp
[806/1182] /usr/lib/llvm/14/bin/x86_64-pc-linux-gnu-clang++  -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/..  -DNDEBUG -march=native -mtune=native -O2 -pipe -Wall -std=c++14 -Wno-unused-parameter  -m32 -fno-lto -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -fbuiltin -fno-rtti -Wno-format -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -msse4.2 -MD -MT lib/scudo/CMakeFiles/clang_rt.scudo_minimal-i386.dir/scudo_crc32.cpp.o -MF lib/scudo/CMakeFiles/clang_rt.scudo_minimal-i386.dir/scudo_crc32.cpp.o.d -o lib/scudo/CMakeFiles/clang_rt.scudo_minimal-i386.dir/scudo_crc32.cpp.o -c /var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/scudo_crc32.cpp
FAILED: lib/scudo/CMakeFiles/clang_rt.scudo_minimal-i386.dir/scudo_crc32.cpp.o 
/usr/lib/llvm/14/bin/x86_64-pc-linux-gnu-clang++  -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/..  -DNDEBUG -march=native -mtune=native -O2 -pipe -Wall -std=c++14 -Wno-unused-parameter  -m32 -fno-lto -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -fbuiltin -fno-rtti -Wno-format -fno-omit-frame-pointer -DGWP_ASAN_HOOKS -msse4.2 -MD -MT lib/scudo/CMakeFiles/clang_rt.scudo_minimal-i386.dir/scudo_crc32.cpp.o -MF lib/scudo/CMakeFiles/clang_rt.scudo_minimal-i386.dir/scudo_crc32.cpp.o.d -o lib/scudo/CMakeFiles/clang_rt.scudo_minimal-i386.dir/scudo_crc32.cpp.o -c /var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/scudo_crc32.cpp
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/scudo_crc32.cpp:20:10: error: always_inline function '_mm_crc32_u32' requires target feature 'crc32', but would be inlined into function 'computeHardwareCRC32' that is compiled without support for 'crc32'
  return CRC32_INTRINSIC(Crc, Data);
         ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/scudo_crc32.h:27:27: note: expanded from macro 'CRC32_INTRINSIC'
#  define CRC32_INTRINSIC FIRST_32_SECOND_64(_mm_crc32_u32, _mm_crc32_u64)
                          ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/../sanitizer_common/sanitizer_platform.h:132:36: note: expanded from macro 'FIRST_32_SECOND_64'
#  define FIRST_32_SECOND_64(a, b) (a)
                                   ^
1 error generated.
ninja: build stopped: subcommand failed.
 * ERROR: sys-libs/compiler-rt-sanitizers-14.0.0::gentoo failed (compile phase):
 *   ninja -v -j1 -l0 failed
 * 
 * Call stack:
 *     ebuild.sh, line  127:  Called src_compile
 *   environment, line 3555:  Called cmake_src_compile
 *   environment, line 1518:  Called cmake_build
 *   environment, line 1487:  Called eninja
 *   environment, line 2007:  Called die
 * The specific snippet of code:
 *       "$@" || die "${nonfatal_args[@]}" "${*} failed"
Comment 1 jospezial 2022-03-24 02:04:39 UTC
Created attachment 767667 [details]
build.log

emerge --info
Portage 3.0.30 (python 3.10.3-final-0, default/linux/amd64/17.1, gcc-11.2.1, glibc-2.34-r10, 5.17.0 x86_64)
=================================================================
System uname: Linux-5.17.0-x86_64-AMD_Athlon-tm-_II_X2_240_Processor-with-glibc2.34
KiB Mem:     4028692 total,   1524580 free
KiB Swap:   11010040 total,  10650116 free
Timestamp of repository poly-c: Wed, 23 Mar 2022 15:34:08 +0000
Head commit of repository poly-c: fa0b606af08e3bcde14b509988f9ae498f42e036

Head commit of repository gentoo: af9fb3ef2ab6f8d2681773ddb8f854a6599e6f9a

Timestamp of repository FireBurn: Sat, 12 Mar 2022 13:34:36 +0000
Head commit of repository FireBurn: 65450caf29d6205ad3e8f79ded866b349f4436e0

Timestamp of repository gamerlay: Fri, 25 Feb 2022 16:08:04 +0000
Head commit of repository gamerlay: f2c6c50e27fd7baa912ad0d1ad908ec610affb21

Timestamp of repository gerislay: Fri, 18 Mar 2022 01:49:35 +0000
Head commit of repository gerislay: 487894817847c5083c2d41161a952494ba3df448

Timestamp of repository java: Tue, 01 Mar 2022 10:07:07 +0000
Head commit of repository java: 63b139bd43dd4d9d5d5b404dbbe8a7a59fa36a89

Head commit of repository kde: 11c2922924cd4851bdb70e59e0c2dd66ec9bedd9

Head commit of repository netfab-overlay: cdf89191a519b53f28c2fefae9aa646b286bef9a

Timestamp of repository pg_overlay: Wed, 23 Mar 2022 14:19:14 +0000
Head commit of repository pg_overlay: 7f312642876d730a3041f0b645de0535e845c513

Timestamp of repository qt: Mon, 21 Mar 2022 10:19:13 +0000
Head commit of repository qt: 5fdbf4ffc8e65d6e7388e83b7587e7d5e7d02883

Timestamp of repository seden: Tue, 22 Mar 2022 07:34:07 +0000
Head commit of repository seden: 436b114c6339e2b89f5a03aba18aaa799da7b30d

Timestamp of repository stefantalpalaru: Wed, 16 Mar 2022 23:49:01 +0000
Head commit of repository stefantalpalaru: 6b01bef5bd13da98ba2c11de361aadefd80720c0

Timestamp of repository wine: Sat, 12 Mar 2022 02:59:28 +0000
Head commit of repository wine: d64a321cab57e9501539b4b465f88d5d5366aefa

sh bash 5.1_p16
ld GNU ld (Gentoo 2.38 p3) 2.38
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::gentoo
dev-lang/python:           3.9.11::gentoo, 3.10.3::gentoo
dev-lang/rust-bin:         1.59.0::gentoo
dev-util/ccache:           4.5.1::gentoo
dev-util/cmake:            3.22.3::gentoo
dev-util/meson:            0.61.3::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        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:           13.0.1::gentoo, 14.0.0::gentoo
sys-devel/gcc:             11.2.1_p20220115::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/lld:             13.0.1::gentoo
sys-devel/llvm:            13.0.1::gentoo, 14.0.0::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.16::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r10::gentoo
Repositories:

poly-c
    location: /var/db/repos/poly-c
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/poly-c.git
    masters: gentoo
    priority: -1001

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/gentoo.git
    priority: -1000

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

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

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

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

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/kde.git
    masters: gentoo

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

overlay_jl
    location: /usr/local/portage
    masters: gentoo
    priority: 0

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

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

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

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

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -mtune=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=y --autounmask-write=y --keep-going --quiet-build=y --verbose-conflicts"
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 -mtune=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance 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 -mtune=native -O2 -pipe"
GENTOO_MIRRORS="http://ftp.halifax.rwth-aachen.de/gentoo/ https://mirrors.dotsrc.org/gentoo/ https://mirror.leaseweb.com/gentoo/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="64bit X Xaw3d a52 aac aacplus aacs aalib ace acl acpi activefilter admin aften alsa ambisonics amd64 ap apm apng archive arping audacious audiofile automount avif bash bazaar bdplus binary-drivers bluray boost btrfs bzip2 cairo ccache cdda cddb cdio cdr cdrom charconv chm chroot cjk clang cli client colordiff colorpicker colors compress corefonts cpio cpufreq_bench cpuload crypt css cue cups curl custom-modes d3d9 dav1d dbus declarative dga dhcp dom doom doomsday dri dri3 drm dts duktape dump dv dvb dvd dvdnav eap eap-sim eap-tls ebook egl elogind encode enscript epub equalizer exif extensions extras faac faad farstream fat fax fbcon fdformat fdk ffmpeg fftw firefox flac fluidsynth fontconfig foomatic foomaticdb fortran freedoom ftp fuse gadu gd gegl geoip gif git glamor gpg gphoto2 graphite grub gstreamer gtk gtk3 gtk4 gui gzip haptic hddtemp hdf hdf5 heretic hexen hid highlight history hpcups hpijs http http2 hwdb iconv icu id3tag idn imagemagick initramfs inotify introspection ipc ipod ipv6 jack jbootstrap jit jpeg jpeg2k kde kdenlive keyfinder ladspa lame lcms legacy-systray lensfun libaom libass libcanberra libdrm libglvnd libinput libkms libmpv libnotify librtmp libsamplerate libssh2 libtirpc libv4l libwww lightdm live lm-sensors lm_sensors logrotate lua lv2 lximage lz4 lzma lzo mad magic man matroska md5sum meanwhile melt mercurial metalink midi mikmod mime minizip mixer mjpeg mmap mms mng mobi mod modern-top modplug mono mount mouse mozilla mp3 mp4 mpeg mpeg2 mplayer mtp multilib multimedia multislot musepack musicbrainz nano-syntax ncat ncurses ndiff network networkmonitor newnet nls nmap-update normalize nowlistening nping nptl ntfs ntfsprogs ntp nvidia nvram obex ocr odbc odf offload ogg ogm openal opencl opengl openh264 openmp openssl opus osdmenu otr p2p pam pango panorama parse-clocks pcap pci pcre pcre16 pdf pdfimport phonon pipes pkcs11 plasma plugins pm-utils png policykit postproc postscript powermanagement ppds printsupport privacy projectm pulseaudio pvr python qalculate qml qrcode qt5 qtkeychain quicktime radio rar raw readline recording reiser4 reiserfs remote-access replaygain rtc rtmp rubberband sbsms scanner screensaver scripttools sdl seccomp secure-delete sensors serial serialport sftp sha512 shorten shout skins slang smi sndfile sockets sound soundtouch source-highlight speech speex spell split-usr sql sqlite sqlite3 squashfs ssh ssl staging startup-notification statistics statusnotifier stk stream subtitles sudo svg symlink sync-plugin-portage syslog sysstat system-ffmpeg system-harfbuzz system-icu system-jpeg system-jsoncpp system-libvpx system-sqlite sysv-utils szip taglib text texteffect tftp tftpd themes theora threads thumbnail tiff timidity tracepath traceroute translator truetype twolame udev udf udisks unicode update_drivedb upower urlpicpreview usb utils v4l v4l2 vaapi vala vamp vdpau vector-icons video videos virtualbox vkd3d vnc vorbis vpx vroot vst vulkan vulkaninfo wad wav wavpack wayland webgl webp webpresence widgets winbind winpopup wmf worldclock wps wxwidgets x264 x265 xattr xcb xcomposite xfs xine xinerama xkb xml xmp xorg xosd xpm xrandr xscreensaver xv xvid yahoo zenmap zip zlib zstd zvbi" 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 popcnt sse sse2 sse3 sse4a" CURL_SSL="openssl" 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="de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9 python3_10" RUBY_TARGETS="ruby30 ruby31" USERLAND="GNU" VIDEO_CARDS="radeon amdgpu radeonsi" 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, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-03-25 08:59:46 UTC
Could you expand -march=native for your CPU?  E.g.:

https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide#Expand_-march.3Dnative.2C_exact_gcc_version_and_other_system-specific_options
Comment 3 Mantas 2022-03-25 19:46:48 UTC
Same error on my machine.

arch=sandybridge; for t in param target; do cmd="gcc -Q -O2 -march=$arch --help=$t"; diff -U0 <(LANG=C $cmd) <(LANG=C $cmd -march=native); done

--- /dev/fd/63	2022-03-25 21:41:13.029363239 +0200
+++ /dev/fd/62	2022-03-25 21:41:13.029363239 +0200
@@ -85,2 +85,2 @@
-  --param=l1-cache-size=      		64
-  --param=l2-cache-size=      		512
+  --param=l1-cache-size=      		32
+  --param=l2-cache-size=      		6144
--- /dev/fd/63	2022-03-25 21:41:13.133364220 +0200
+++ /dev/fd/62	2022-03-25 21:41:13.134364229 +0200
@@ -27 +27 @@
-  -march=                     		sandybridge
+  -march=                     		core2
@@ -29 +29 @@
-  -mavx                       		[enabled]
+  -mavx                       		[disabled]
@@ -31,2 +31,2 @@
-  -mavx256-split-unaligned-load 	[enabled]
-  -mavx256-split-unaligned-store 	[enabled]
+  -mavx256-split-unaligned-load 	[disabled]
+  -mavx256-split-unaligned-store 	[disabled]
@@ -64 +64 @@
-  -mcrc32                     		[enabled]
+  -mcrc32                     		[disabled]
@@ -131 +131 @@
-  -mpclmul                    		[enabled]
+  -mpclmul                    		[disabled]
@@ -135 +135 @@
-  -mpopcnt                    		[enabled]
+  -mpopcnt                    		[disabled]
@@ -165 +165 @@
-  -msse4                      		[enabled]
+  -msse4                      		[disabled]
@@ -167 +167 @@
-  -msse4.2                    		[enabled]
+  -msse4.2                    		[disabled]
@@ -185 +185 @@
-  -mtune=                     		sandybridge
+  -mtune=                     		core2
@@ -198 +198 @@
-  -mxsave                     		[enabled]
+  -mxsave                     		[disabled]
@@ -200 +200 @@
-  -mxsaveopt                  		[enabled]
+  -mxsaveopt                  		[disabled]
Comment 4 Mantas 2022-03-25 19:53:02 UTC
(In reply to Mantas from comment #3)
> Same error on my machine.
> 
> arch=sandybridge; for t in param target; do cmd="gcc -Q -O2 -march=$arch
> --help=$t"; diff -U0 <(LANG=C $cmd) <(LANG=C $cmd -march=native); done
> 
> --- /dev/fd/63	2022-03-25 21:41:13.029363239 +0200
> +++ /dev/fd/62	2022-03-25 21:41:13.029363239 +0200
> @@ -85,2 +85,2 @@
> -  --param=l1-cache-size=      		64
> -  --param=l2-cache-size=      		512
> +  --param=l1-cache-size=      		32
> +  --param=l2-cache-size=      		6144
> --- /dev/fd/63	2022-03-25 21:41:13.133364220 +0200
> +++ /dev/fd/62	2022-03-25 21:41:13.134364229 +0200
> @@ -27 +27 @@
> -  -march=                     		sandybridge
> +  -march=                     		core2
> @@ -29 +29 @@
> -  -mavx                       		[enabled]
> +  -mavx                       		[disabled]
> @@ -31,2 +31,2 @@
> -  -mavx256-split-unaligned-load 	[enabled]
> -  -mavx256-split-unaligned-store 	[enabled]
> +  -mavx256-split-unaligned-load 	[disabled]
> +  -mavx256-split-unaligned-store 	[disabled]
> @@ -64 +64 @@
> -  -mcrc32                     		[enabled]
> +  -mcrc32                     		[disabled]
> @@ -131 +131 @@
> -  -mpclmul                    		[enabled]
> +  -mpclmul                    		[disabled]
> @@ -135 +135 @@
> -  -mpopcnt                    		[enabled]
> +  -mpopcnt                    		[disabled]
> @@ -165 +165 @@
> -  -msse4                      		[enabled]
> +  -msse4                      		[disabled]
> @@ -167 +167 @@
> -  -msse4.2                    		[enabled]
> +  -msse4.2                    		[disabled]
> @@ -185 +185 @@
> -  -mtune=                     		sandybridge
> +  -mtune=                     		core2
> @@ -198 +198 @@
> -  -mxsave                     		[enabled]
> +  -mxsave                     		[disabled]
> @@ -200 +200 @@
> -  -mxsaveopt                  		[enabled]
> +  -mxsaveopt                  		[disabled]

arch=core2; for t in param target; do cmd="gcc -Q -O2 -march=$arch --help=$t"; diff -U0 <(LANG=C $cmd) <(LANG=C $cmd -march=native); done

--- /dev/fd/63	2022-03-25 21:52:21.837668135 +0200
+++ /dev/fd/62	2022-03-25 21:52:21.837668135 +0200
@@ -85,2 +85,2 @@
-  --param=l1-cache-size=      		64
-  --param=l2-cache-size=      		512
+  --param=l1-cache-size=      		32
+  --param=l2-cache-size=      		6144
--- /dev/fd/63	2022-03-25 21:52:21.849668248 +0200
+++ /dev/fd/62	2022-03-25 21:52:21.849668248 +0200
@@ -125 +125 @@
-  -mno-sse4                   		[enabled]
+  -mno-sse4                   		[disabled]
@@ -166 +166 @@
-  -msse4.1                    		[disabled]
+  -msse4.1                    		[enabled]
Comment 5 jospezial 2022-03-25 20:07:58 UTC
LANG="C" gcc -march=native -Q --help=target
The following options are target specific:
  -m128bit-long-double                  [enabled]
  -m16                                  [disabled]
  -m32                                  [disabled]
  -m3dnow                               [enabled]
  -m3dnowa                              [enabled]
  -m64                                  [enabled]
  -m80387                               [enabled]
  -m8bit-idiv                           [disabled]
  -m96bit-long-double                   [disabled]
  -mabi=                                sysv
  -mabm                                 [enabled]
  -maccumulate-outgoing-args            [disabled]
  -maddress-mode=                       long
  -madx                                 [disabled]
  -maes                                 [disabled]
  -malign-data=                         compat
  -malign-double                        [disabled]
  -malign-functions=                    0
  -malign-jumps=                        0
  -malign-loops=                        0
  -malign-stringops                     [enabled]
  -mamx-bf16                            [disabled]
  -mamx-int8                            [disabled]
  -mamx-tile                            [disabled]
  -mandroid                             [disabled]
  -march=                               amdfam10
  -masm=                                att
  -mavx                                 [disabled]
  -mavx2                                [disabled]
  -mavx256-split-unaligned-load         [disabled]
  -mavx256-split-unaligned-store        [disabled]
  -mavx5124fmaps                        [disabled]
  -mavx5124vnniw                        [disabled]
  -mavx512bf16                          [disabled]
  -mavx512bitalg                        [disabled]
  -mavx512bw                            [disabled]
  -mavx512cd                            [disabled]
  -mavx512dq                            [disabled]
  -mavx512er                            [disabled]
  -mavx512f                             [disabled]
  -mavx512ifma                          [disabled]
  -mavx512pf                            [disabled]
  -mavx512vbmi                          [disabled]
  -mavx512vbmi2                         [disabled]
  -mavx512vl                            [disabled]
  -mavx512vnni                          [disabled]
  -mavx512vp2intersect                  [disabled]
  -mavx512vpopcntdq                     [disabled]
  -mavxvnni                             [disabled]
  -mbionic                              [disabled]
  -mbmi                                 [disabled]
  -mbmi2                                [disabled]
  -mbranch-cost=<0,5>                   2
  -mcall-ms2sysv-xlogues                [disabled]
  -mcet-switch                          [disabled]
  -mcld                                 [disabled]
  -mcldemote                            [disabled]
  -mclflushopt                          [disabled]
  -mclwb                                [disabled]
  -mclzero                              [disabled]
  -mcmodel=                             [default]
  -mcpu=                      
  -mcrc32                               [disabled]
  -mcx16                                [enabled]
  -mdispatch-scheduler                  [disabled]
  -mdump-tune-features                  [disabled]
  -menqcmd                              [disabled]
  -mf16c                                [disabled]
  -mfancy-math-387                      [enabled]
  -mfentry                              [disabled]
  -mfentry-name=              
  -mfentry-section=           
  -mfma                                 [disabled]
  -mfma4                                [disabled]
  -mforce-drap                          [disabled]
  -mforce-indirect-call                 [disabled]
  -mfp-ret-in-387                       [enabled]
  -mfpmath=                             sse
  -mfsgsbase                            [disabled]
  -mfunction-return=                    keep
  -mfused-madd                          -ffp-contract=fast
  -mfxsr                                [enabled]
  -mgeneral-regs-only                   [disabled]
  -mgfni                                [disabled]
  -mglibc                               [enabled]
  -mhard-float                          [enabled]
  -mharden-sls=                         none
  -mhle                                 [disabled]
  -mhreset                              [disabled]
  -miamcu                               [disabled]
  -mieee-fp                             [enabled]
  -mincoming-stack-boundary=            0
  -mindirect-branch-cs-prefix           [disabled]
  -mindirect-branch-register            [disabled]
  -mindirect-branch=                    keep
  -minline-all-stringops                [disabled]
  -minline-stringops-dynamically        [disabled]
  -minstrument-return=                  none
  -mintel-syntax                        -masm=intel
  -mkl                                  [disabled]
  -mlarge-data-threshold=<number>       65536
  -mlong-double-128                     [disabled]
  -mlong-double-64                      [disabled]
  -mlong-double-80                      [enabled]
  -mlwp                                 [disabled]
  -mlzcnt                               [enabled]
  -mmanual-endbr                        [disabled]
  -mmemcpy-strategy=          
  -mmemset-strategy=          
  -mmitigate-rop                        [disabled]
  -mmmx                                 [enabled]
  -mmovbe                               [disabled]
  -mmovdir64b                           [disabled]
  -mmovdiri                             [disabled]
  -mmpx                                 [disabled]
  -mms-bitfields                        [disabled]
  -mmusl                                [disabled]
  -mmwait                               [enabled]
  -mmwaitx                              [disabled]
  -mneeded                              [disabled]
  -mno-align-stringops                  [disabled]
  -mno-default                          [disabled]
  -mno-fancy-math-387                   [disabled]
  -mno-push-args                        [disabled]
  -mno-red-zone                         [disabled]
  -mno-sse4                             [enabled]
  -mnop-mcount                          [disabled]
  -momit-leaf-frame-pointer             [disabled]
  -mpc32                                [disabled]
  -mpc64                                [disabled]
  -mpc80                                [disabled]
  -mpclmul                              [disabled]
  -mpcommit                             [disabled]
  -mpconfig                             [disabled]
  -mpku                                 [disabled]
  -mpopcnt                              [enabled]
  -mprefer-avx128                       -mprefer-vector-width=128
  -mprefer-vector-width=                none
  -mpreferred-stack-boundary=           0
  -mprefetchwt1                         [disabled]
  -mprfchw                              [enabled]
  -mptwrite                             [disabled]
  -mpush-args                           [enabled]
  -mrdpid                               [disabled]
  -mrdrnd                               [disabled]
  -mrdseed                              [disabled]
  -mrecip                               [disabled]
  -mrecip=                    
  -mrecord-mcount                       [disabled]
  -mrecord-return                       [disabled]
  -mred-zone                            [enabled]
  -mregparm=                            6
  -mrtd                                 [disabled]
  -mrtm                                 [disabled]
  -msahf                                [enabled]
  -mserialize                           [disabled]
  -msgx                                 [disabled]
  -msha                                 [disabled]
  -mshstk                               [disabled]
  -mskip-rax-setup                      [disabled]
  -msoft-float                          [disabled]
  -msse                                 [enabled]
  -msse2                                [enabled]
  -msse2avx                             [disabled]
  -msse3                                [enabled]
  -msse4                                [disabled]
  -msse4.1                              [disabled]
  -msse4.2                              [disabled]
  -msse4a                               [enabled]
  -msse5                                -mavx
  -msseregparm                          [disabled]
  -mssse3                               [disabled]
  -mstack-arg-probe                     [disabled]
  -mstack-protector-guard-offset= 
  -mstack-protector-guard-reg= 
  -mstack-protector-guard-symbol= 
  -mstack-protector-guard=              tls
  -mstackrealign                        [disabled]
  -mstringop-strategy=                  [default]
  -mstv                                 [enabled]
  -mtbm                                 [disabled]
  -mtls-dialect=                        gnu
  -mtls-direct-seg-refs                 [enabled]
  -mtsxldtrk                            [disabled]
  -mtune-ctrl=                
  -mtune=                               amdfam10
  -muclibc                              [disabled]
  -muintr                               [disabled]
  -mvaes                                [disabled]
  -mveclibabi=                          [default]
  -mvect8-ret-in-mem                    [disabled]
  -mvpclmulqdq                          [disabled]
  -mvzeroupper                          [enabled]
  -mwaitpkg                             [disabled]
  -mwbnoinvd                            [disabled]
  -mwidekl                              [disabled]
  -mx32                                 [disabled]
  -mxop                                 [disabled]
  -mxsave                               [disabled]
  -mxsavec                              [disabled]
  -mxsaveopt                            [disabled]
  -mxsaves                              [disabled]

  Known assembler dialects (for use with the -masm= option):
    att intel

  Known ABIs (for use with the -mabi= option):
    ms sysv

  Known code models (for use with the -mcmodel= option):
    32 kernel large medium small

  Valid arguments to -mfpmath=:
    387 387+sse 387,sse both sse sse+387 sse,387

  Known choices for mitigation against straight line speculation with -mharden-sls=:
    all indirect-jmp none return

  Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options):
    keep thunk thunk-extern thunk-inline

  Known choices for return instrumentation with -minstrument-return=:
    call none nop5

  Known data alignment choices (for use with the -malign-data= option):
    abi cacheline compat

  Known vectorization library ABIs (for use with the -mveclibabi= option):
    acml svml

  Known address mode (for use with the -maddress-mode= option):
    long short

  Known preferred register vector length (to use with the -mprefer-vector-width= option):
    128 256 512 none

  Known stack protector guard (for use with the -mstack-protector-guard= option):
    global tls

  Valid arguments to -mstringop-strategy=:
    byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop vector_loop

  Known TLS dialects (for use with the -mtls-dialect= option):
    gnu gnu2

  Known valid arguments for -march= option:
    i386 i486 i586 pentium lakemont pentium-mmx winchip-c6 winchip2 c3 samuel-2 c3-2 nehemiah c7 esther i686 pentiumpro pentium2 pentium3 pentium3m pentium-m pentium4 pentium4m prescott nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client rocketlake icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel geode k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp x86-64 x86-64-v2 x86-64-v3 x86-64-v4 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 btver1 btver2 generic native

  Known valid arguments for -mtune= option:
    generic i386 i486 pentium lakemont pentiumpro pentium4 nocona core2 nehalem sandybridge haswell bonnell silvermont goldmont goldmont-plus tremont knl knm skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake rocketlake intel geode k6 athlon k8 amdfam10 bdver1 bdver2 bdver3 bdver4 btver1 btver2 znver1 znver2 znver3
Comment 6 jospezial 2022-03-25 20:12:38 UTC
In file included from /var/tmp/portage/app-office/libreoffice-9999/work/libreoffice-9999/workdir/UnpackedTarball/skia/src/opts/SkOpts_sse42.cpp:11:
/var/tmp/portage/app-office/libreoffice-9999/work/libreoffice-9999/workdir/UnpackedTarball/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);
               ^
/var/tmp/portage/app-office/libreoffice-9999/work/libreoffice-9999/workdir/UnpackedTarball/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); }
                                                                 ^
/var/tmp/portage/app-office/libreoffice-9999/work/libreoffice-9999/workdir/UnpackedTarball/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); }
Comment 7 Adrian Bassett 2022-03-25 20:15:40 UTC
Same problem here and same architecture (core2) as in comment #4 (my CFLAGS specifying -march=native and -mtune=core2)
Comment 8 Stephen Mollett 2022-03-27 08:56:53 UTC
Also on a Phenom II X6 1090T (same arch - barcelona/amdfam10) as the original report).

It looks like it's trying to unconditionally use CRC32 instructions even when the target doesn't support them. It already compiled fine on my other system, which is an FX-9590 (bdver2) and does have the crc32 target feature.
Comment 9 Adrian Bassett 2022-03-27 09:50:11 UTC
(In reply to Adrian Bassett from comment #7)
> Same problem here and same architecture (core2) as in comment #4 (my CFLAGS
> specifying -march=native and -mtune=core2)

Removing these two flags, i.e. leaving -march and -mtune unset but not changing any of the other CFLAGS options, allows compiler-rt-sanitizers-14.0.0 to compile and install OK.

Now wondering what the implications of having a mismatch of CFLAGS as between different constituent parts of llvm/clang as a whole might be, though.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-03-27 16:55:41 UTC
I'm afraid I can't reproduce with various values of -march.
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-03-31 08:21:01 UTC
So in the end it turned out that newer compilers require -mcrc32 to build the code using these intrinsics, while scudo passed (older) -msse4.2.  I'll backport the fix to Gentoo when I get it reviewed upstream.
Comment 12 jospezial 2022-03-31 20:27:58 UTC
Hello Michał,
Thank you for your work.
I see your patch is now in llvm-project main.
Do we wait until a upstream backport to branch 14 or do we add the patch to gentoo until next release?
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-03-31 21:26:45 UTC
(In reply to jospezial from comment #12)
> Hello Michał,
> Thank you for your work.
> I see your patch is now in llvm-project main.
> Do we wait until a upstream backport to branch 14 or do we add the patch to
> gentoo until next release?

Both (i.e. Gentoo 14.0.0-r1 and upstream 14.0.1) but let's wait until tomorrow in case this causes some problems.
Comment 14 Larry the Git Cow gentoo-dev 2022-04-02 16:29:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c3fdd7708d216311b7f12b404b24b720c710433

commit 6c3fdd7708d216311b7f12b404b24b720c710433
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2022-04-02 16:14:15 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-04-02 16:29:45 +0000

    sys-libs/compiler-rt-sanitizers: Backport crc32 build fix to 14.0.0
    
    Closes: https://bugs.gentoo.org/835870
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-libs/compiler-rt-sanitizers/Manifest                             | 2 +-
 sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 15 Adrian Bassett 2022-04-02 18:08:20 UTC
(In reply to Adrian Bassett from comment #9)
> (In reply to Adrian Bassett from comment #7)
> > Same problem here and same architecture (core2) as in comment #4 (my CFLAGS
> > specifying -march=native and -mtune=core2)
> 
> Removing these two flags, i.e. leaving -march and -mtune unset but not
> changing any of the other CFLAGS options, allows
> compiler-rt-sanitizers-14.0.0 to compile and install OK.
Just confirming that the updated ebuild with the associated patch allows for emerging this update without needing to modify the CFLAGS, thanks!
Comment 16 jospezial 2022-04-02 22:01:09 UTC
fixed for emerging compiler-rt-sanitizers.
Still have the libreoffice skia error.
Comment 17 emacsray 2022-04-13 07:41:57 UTC
I am not unsure we should apply the compiler-rt scudo change to use -mcrc32. It may break GCC builds. See https://reviews.llvm.org/D122789#3446865

```
% clang -m32 -march=i686 -msse4.2 -c a.c  # seems to compile fine
% gcc -m32 -march=i686 -msse4.2 -c a.c
% gcc -m32 -march=i686 -mcrc32 -c a.c
In file included from a.c:1:
a.c: In function ‘computeHardwareCRC32’:
/usr/lib/gcc/x86_64-linux-gnu/11/include/smmintrin.h:839:1: error: inlining failed in call to ‘always_inline’ ‘_mm_crc32_u32’: target specific option mismatch
  839 | _mm_crc32_u32 (unsigned int __C, unsigned int __V)
      | ^~~~~~~~~~~~~
a.c:3:69: note: called from here
    3 | uint32_t computeHardwareCRC32(uint32_t Crc, uint32_t Data) { return _mm_crc32_u32(Crc, Data); }
      |                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~
```

Please give such a small, standalone test with just relevant options like -m32/-msse4.2, so we can better get what's wrong. mgorny suspected ccache problem ;-/