| Summary: | dev-libs/libsodium-1.0.8 build failure: ‘__builtin_ia32_aeskeygenassist128’ needs isa option -m32 -maes | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Robin Bankhead <gentoo> |
| Component: | Current packages | Assignee: | Sam James <sam> |
| Status: | RESOLVED TEST-REQUEST | ||
| Severity: | normal | CC: | eva, ted, xmw |
| Priority: | Normal | Keywords: | NeedPatch |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| See Also: | https://bugs.gentoo.org/show_bug.cgi?id=702554 | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
build log
build.log |
||
|
Description
Robin Bankhead
2016-01-25 18:42:08 UTC
Could you please report this issue upstream? https://github.com/jedisct1/libsodium Thanks! Looks like commit https://github.com/jedisct1/libsodium/commit/17248540e3e66296d52ef719b9825b68f63c1dbd might be a solution ? Created attachment 426436 [details] build.log No, this is no solution Portage 2.2.27 (python 2.7.11-final-0, default/linux/amd64/13.0/developer, gcc-5.3.0, glibc-2.22-r2, 4.1.15-gentoo-r1-headless.0 x86_64) ================================================================= System uname: Linux-4.1.15-gentoo-r1-headless.0-x86_64-Intel_Core_2_Duo_P9xxx_-Penryn_Class_Core_2-with-gentoo-2.2 KiB Mem: 7974892 total, 993696 free KiB Swap: 2097148 total, 2079840 free sh bash 4.3_p42-r2 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 distcc 3.2rc1 x86_64-pc-linux-gnu [disabled] ccache version 3.2.4 [enabled] app-shells/bash: 4.3_p42-r2::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.22.1::gentoo dev-lang/python: 2.7.11-r2::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo dev-util/ccache: 3.2.4::gentoo dev-util/cmake: 3.4.3::gentoo dev-util/pkgconfig: 0.29::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.20.5::gentoo sys-apps/sandbox: 2.10-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.10.3::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.9.3::gentoo, 5.3.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r2::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.22-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: git://git.gentoo.org/repo/gentoo.git priority: -1000 ceres location: /etc/portage/overlay masters: gentoo priority: 0 fslmude location: /var/lib/layman/fslmude sync-type: git sync-uri: git+ssh://git@git.fs.lmu.de/roots/fslmude-repository.git masters: gentoo priority: 50 gamerlay location: /var/lib/layman/gamerlay sync-type: git sync-uri: git://git.gentoo.org/proj/gamerlay.git masters: gentoo priority: 50 java location: /var/lib/layman/java sync-type: git sync-uri: git://anongit.gentoo.org/proj/java.git masters: gentoo priority: 50 lorem_ipsum location: /var/lib/layman/lorem_ipsum sync-type: git sync-uri: git://github.com/lorem-ipsum/ebuilds.git masters: gentoo priority: 50 proaudio location: /var/lib/layman/proaudio masters: gentoo priority: 50 sunrise location: /var/lib/layman/sunrise masters: gentoo priority: 50 xmw location: /var/lib/layman/xmw sync-type: git sync-uri: git://anongit.gentoo.org/dev/xmw.git masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=core2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/bin/trivdm /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb /var/spool/munin-async/.ssh" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=core2" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS=" --buildpkg y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg ccache collision-protect compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-log strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="https://lore.xmw.de/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" PKGDIR="/var/cache/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" USE="X a52 aac acl acpi alsa amd64 berkdb bluray branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx djvu dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jack jbig jpeg jpeg2k lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 raw readline sdl seccomp session snmp spell sse sse2 ssl ssse3 startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vim-syntax vorbis wxwidgets x264 xattr xcb xml xv xvid zlib zsh-completion" ABI_X86="64" ALSA_CARDS="intel-hda" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en en_US en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 python3_5" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="i965 intel nvidia radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON There are non-optional configure check whether or not -mmmx, -msse2, -msse3, -mssse3, -msse4.1, -mavx, -mavx2, -maes, and -mpclmul work and the result is stored in HAVE_WMMINTRIN_H et al. I have a i7 build box/vm and cross compile for core2duo. Due this constellation, -msse4.1 works as gcc flag on the build box during src_configure, my supplied CFLAGS=-no-sse4.1 during src_compile prevent the compiler from accepting the respective #ifdefined HAVE_WMMINTRIN_H code segments. This needs a proper fix, CPU_FLAGS_X86 and overrides of HAVE_WMMINTRIN_H. I fixed aesni and sse4.1 for now. commit faf6a5dea44a39636633495e64450175b369e419 Author: Michael Weber <xmw@gentoo.org> Date: Fri Jun 17 14:36:26 2016 +0200 dev-libs/libsodium: Add IUSE="cpu_flags_x86_sse4_1 cpu_flags_x86_aes" Package-Manager: portage-2.2.28 dev-libs/libsodium/files/libsodium-1.0.10-cpuflags.patch dev-libs/libsodium/libsodium-1.0.10.ebuild @Michael, thanks for your contribution. I usually have no problem with other developers touching packages I maintain, but I expect them to cooperate with upstream if they apply patches on a distribution-level. I don't want to maintain extra patches downstream and therefore ask you to take action to get this patch upstream. Otherwise, it might be possible that the patch will be dropped in a future version bump, if it does not apply cleanly anymore. What is pending here with libsodium-1.0.18? libsodium-1.0.18 configure overrides CFLAGS set in the environment. When CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse no-aes no-sse2 no-sse3 no-ssse3 no-sse4 no-sse4.1 no-sse4.2 no-avx", configure still enables some of the disabled flags.
This results in a build failure on an Athlon i686 cpu without SS2 etc. extensions.
The build error log states:
In file included from /u4/tmp/portage/dev-libs/libsodium-1.0.18/work/libsodium-1.0.18/src/libsodium/include/sodium/private/sse2_64_32.h:14,
from /u4/tmp/portage/dev-libs/libsodium-1.0.18/work/libsodium-1.0.18/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c:8:
/u4/tmp/portage/dev-libs/libsodium-1.0.18/work/libsodium-1.0.18/src/libsodium/include/sodium/private/sse2_64_32.h: In function â<80><98>sodium__mm_set_epi64xâ<80><99>:
/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/include/emmintrin.h:602:1: error: inlining failed in call to always_inline â<80><98>_mm_set_epi32â<80>
<99>: target specific option mismatch
602 | _mm_set_epi32 (int __q3, int __q2, int __q1, int __q0)
| ^~~~~~~~~~~~~
In file included from /u4/tmp/portage/dev-libs/libsodium-1.0.18/work/libsodium-1.0.18/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c:8:
/u4/tmp/portage/dev-libs/libsodium-1.0.18/work/libsodium-1.0.18/src/libsodium/include/sodium/private/sse2_64_32.h:24:12: note: called from here
24 | return _mm_set_epi32(x1.as32[1], x1.as32[0], x0.as32[1], x0.as32[0]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is a similar bug and fix in bugs.gentoo.org/702554
Please try libsodium-1.0.18_p20210508? Eh, sorry but this bug lasted longer than the affected hardware did :( Current available CPUs if any help for testing: Intel(R) Xeon(R) E-2224 CPU @ 3.40GHz Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz They seem to have every instruction known to man so probably will not be helpful here (if I understand the nature of the issue correctly) but just let me know. |