My system is a build farm for several others systems, thus I can't use -march=native. I think the following configure option could help : > AC_ARG_ENABLE([simd], AS_HELP_STRING([--disable-simd], [Disable SIMD code. (default=no)])) Reproducible: Always $ emerge --info Portage 3.0.28 (python 3.9.7-final-0, default/linux/amd64/17.1/desktop, gcc-11.2.0, glibc-2.33-r7, 5.10.61-gentoo x86_64) ================================================================= System uname: Linux-5.10.61-gentoo-x86_64-Intel-R-_Core-TM-_i5-2500K_CPU_@_3.30GHz-with-glibc2.33 KiB Mem: 16362984 total, 9052696 free KiB Swap: 18874356 total, 18874356 free Timestamp of repository gentoo: Sun, 31 Oct 2021 20:51:32 +0000 Head commit of repository gentoo: 4cc2e2d63044e0c97ef5a60cfa0e6e26ffd23e45 Head commit of repository guru: 6e7a8a71c77d1ecc4720e83a2f3b6a6347a20f9f Head commit of repository steam-overlay: bcdf7b7b1ffb3058a0d924e849a5abf18f364d9c Head commit of repository netfab-overlay: eb3db763b281530726b4c1ad74a1c438ef1dc53f sh bash 5.1_p8 ld GNU ld (Gentoo 2.37_p1 p0) 2.37 distcc 3.4 x86_64-pc-linux-gnu [disabled] app-shells/bash: 5.1_p8::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.0-r3::gentoo dev-lang/python: 2.7.18_p13::gentoo, 3.8.12_p1::gentoo, 3.9.7_p1::gentoo dev-lang/rust-bin: 1.53.0::gentoo dev-util/cmake: 3.20.5::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.44.7::gentoo sys-apps/sandbox: 2.25::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.13.4-r2::gentoo, 1.16.4::gentoo sys-devel/binutils: 2.37_p1::gentoo sys-devel/gcc: 11.2.0::gentoo sys-devel/gcc-config: 2.4::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r7::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git priority: -1000 guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo steam-overlay location: /var/db/repos/steam-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/steam-overlay.git masters: gentoo netfab-overlay location: /var/db/repos/netfab-overlay sync-type: git sync-uri: git://github.com/netfab/overlay.git masters: gentoo priority: 9999 Installed sets: @common-apps, @dev-apps, @games-apps, @portage-apps, @system-apps, @xfce ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mpclmul -mpopcnt -msse4.2 -msse4.1 -mfxsr -fstack-protector-strong -mno-3dnow -mno-sse4a -mno-movbe -mno-aes -mno-sha -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mno-avx -mno-avx2 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite" 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/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mpclmul -mpopcnt -msse4.2 -msse4.1 -mfxsr -fstack-protector-strong -mno-3dnow -mno-sse4a -mno-movbe -mno-aes -mno-sha -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mno-avx -mno-avx2 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--autounmask=y --with-bdeps=y --jobs 3 --load-average 3 --keep-going" 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=x86-64 -mtune=generic -O2 -pipe -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mpclmul -mpopcnt -msse4.2 -msse4.1 -mfxsr -fstack-protector-strong -mno-3dnow -mno-sse4a -mno-movbe -mno-aes -mno-sha -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mno-avx -mno-avx2 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg clean-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mpclmul -mpopcnt -msse4.2 -msse4.1 -mfxsr -fstack-protector-strong -mno-3dnow -mno-sse4a -mno-movbe -mno-aes -mno-sha -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mno-avx -mno-avx2 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite" GENTOO_MIRRORS=" ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://ftp.free.fr/mirrors/ftp.gentoo.org/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/ https://mirrors.soeasyto.com/distfiles.gentoo.org/ http://mirrors.soeasyto.com/distfiles.gentoo.org/ ftp://mirrors.soeasyto.com/distfiles.gentoo.org/ " LANG="fr_FR.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j9" 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" USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd dvdr elogind emboss encode exif ffmpeg flac fortran gdbm gif gnutls gstreamer gtk gtk3 gui hddtemp iconv icu id3tag ipv6 java jpeg lcms libglvnd libnotify libtirpc lm-sensors mad matroska mng mp3 mp4 mpeg multilib ncurses nls nptl nsplugin ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp sox spell split-usr ssl startup-notification svg tcpd theora tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64 32" ADA_TARGET="gnat_2019" 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 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en fr" 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-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia" 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: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Created attachment 748020 [details] zimg-3.0.1 build log
The interesting part : > /var/tmp/portage/media-libs/zimg-3.0.1/work/zimg-release-3.0.1/src/zimg/colorspace/x86/operation_impl_avx.cpp:59:47: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi] > 59 | const __m256 c00 = _mm256_broadcast_ss(matrix + 0); > | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ > In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/immintrin.h:43, > from /var/tmp/portage/media-libs/zimg-3.0.1/work/zimg-release-3.0.1/src/zimg/colorspace/x86/operation_impl_avx.cpp:3: > /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/avxintrin.h: In function ‘void zimg::mm256_store_idxlo_ps(float*, __m256, unsigned int)’: > /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/avxintrin.h:985:1: error: inlining failed in call to ‘always_inline’ ‘void _mm256_maskstore_ps(float*, __m256i, __m256)’: target specific option mismatch
This will really need proper fixing to expose each of the SIMD options as configure options because otherwise --disable-simd won't even work if you put the right stuff in CFLAGS. See e.g. https://github.com/sekrit-twc/zimg/blob/4ad3eff769fcaa10a64083dddb74457e8e46f069/configure.ac#L80.
Unable to install/upgrade-to media-video/handbrake stable 1.4.2-r2 because of this.
(In reply to Fab from comment #4) > Unable to install/upgrade-to media-video/handbrake stable 1.4.2-r2 because > of this. Try building it for now with no -mno* and just a boring -march=x86_64 or similar?
(In reply to Sam James from comment #5) > (In reply to Fab from comment #4) > > Unable to install/upgrade-to media-video/handbrake stable 1.4.2-r2 because > > of this. > > Try building it for now with no -mno* and just a boring -march=x86_64 or > similar? Because of AX_CHECK_COMPILE_FLAG⁽¹⁾, this would build AVX code into media-libs/zimg package. This would crash potentially any reverse dep ⁽²⁾ on any system who do not handle AVX instuctions set. My CPU is having AVX instructions set support, but other gentoo systems on which I deploy tbz2 packages don't. 1. https://github.com/sekrit-twc/zimg/blob/master/configure.ac#L85 2. https://packages.gentoo.org/packages/media-libs/zimg/reverse-dependencies
(In reply to Fab from comment #6) > (In reply to Sam James from comment #5) > > (In reply to Fab from comment #4) > > > Unable to install/upgrade-to media-video/handbrake stable 1.4.2-r2 because > > > of this. > > > > Try building it for now with no -mno* and just a boring -march=x86_64 or > > similar? > Sorry, and --disable-asm in EXTRA_ECONF.
(In reply to Sam James from comment #7) > > (In reply to Sam James from comment #5) > > > > > > Try building it for now with no -mno* and just a boring -march=x86_64 or > > > similar? > > > > Sorry, and --disable-asm in EXTRA_ECONF. I will try this asap and report here, but, where does this option comes from ?
I was able to build media-libs/zimg-3.0.1 with : > > EXTRA_ECONF="--disable-simd" emerge -av1 media-libs/zimg However I hitted another build failure in bug #832201.
(In reply to Fab from comment #9) > I was able to build media-libs/zimg-3.0.1 with : > > > > EXTRA_ECONF="--disable-simd" emerge -av1 media-libs/zimg Still the same with media-libs/zimg-3.0.4.