Created attachment 670175 [details] libffi-3.3-r2:20201106-101601.log.gz Running /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/complex.exp ... FAIL: libffi.complex/cls_align_complex_float.c (test for excess errors) Running /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.go/go.exp ... === libffi Summary === # of expected passes 776 # of unexpected failures 1 make[2]: *** [Makefile:449: check-DEJAGNU] Error 1 make[2]: Leaving directory '/var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite' make[1]: *** [Makefile:526: check-am] Error 2 make[1]: Leaving directory '/var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite' make: *** [Makefile:1347: check-recursive] Error 1 * ERROR: dev-libs/libffi-3.3-r2::gentoo failed (test phase): * Make check failed. See above for details. In /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite/libffi.log I get: FAIL: libffi.complex/cls_align_complex_float.c (test for excess errors) Excess errors: In file included from /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex_float.c:10: /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex.inc: In function ‘cls_struct_align_fn’: /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex.inc:13:1: note: the ABI of passing structure with complex float member has changed in GCC 4.4 13 | { | ^ # emerge --info =dev-libs/libffi-3.3-r2 emerge --info =dev-libs/libffi-3.3-r2 Portage 3.0.8 (python 3.7.9-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.3.0, glibc-2.32-r2, 5.4.72-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.4.72-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1100T_Processor-with-gentoo-2.7 KiB Mem: 16138360 total, 7061792 free KiB Swap: 12550140 total, 12334076 free Timestamp of repository gentoo: Fri, 06 Nov 2020 07:45:01 +0000 Head commit of repository gentoo: 959ad173563bf849fbed9e9454d0561472a0cde5 sh dash 0.5.11.2 ld GNU gold (Gentoo 2.34 p6 2.34.0) 1.16 distcc 3.3.3 x86_64-pc-linux-gnu [enabled] ccache version 3.7.12 [disabled] app-shells/bash: 5.0_p18::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.30.3::gentoo dev-lang/python: 2.7.18-r4::gentoo, 3.7.9::gentoo, 3.8.5::gentoo dev-util/ccache: 3.7.12::gentoo dev-util/cmake: 3.17.4-r1::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.16.1-r1::gentoo sys-devel/binutils: 2.34-r2::gentoo sys-devel/gcc: 9.3.0-r1::gentoo sys-devel/gcc-config: 2.3.2::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes x-portage location: /usr/local/portage masters: gentoo priority: 0 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=7" 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="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=7" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--keep-going y --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 -frecord-gcc-switches -march=amdfam10 -flto=7" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs cgroup compress-build-logs config-protect-if-modified distcc distlocks ebuild-locks ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=7" GENTOO_MIRRORS="http://mirrors.soeasyto.com/distfiles.gentoo.org/ http://mirrors.evowise.com/gentoo/ http://gentoo.modulix.net/gentoo/ https://mirrors.soeasyto.com/distfiles.gentoo.org/ https://mirrors.evowise.com/gentoo/" LANG="it_IT.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -flto=7" LINGUAS="it it_IT" MAKEOPTS="-j12 -l6" 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" USE="X a52 aac aalib acl acpi activities adns alsa amd64 ao audiofile bash-completion bluetooth branding brotli bzip2 cairo caps cdda cddb cdparanoia cdr cli crypt css cups curl dbus declarative dga djvu dri dts dvd dvdr emboss encode exif expat fbcon ffmpeg fftw flac fontconfig fortran ftp gd gdbm geoip gif gimp gmp gnutls gphoto2 gpm graphviz gtk gui handbook iconv icu idn imagemagick imlib introspection ipv6 java javascript jbig jemalloc jpeg jpeg2k kde kipi kwallet lame lcms libass libglvnd libnotify libsamplerate libtirpc lm_sensors lua lzma lzo mad mmap mng mp3 mp4 mpeg mplayer multilib musicbrainz ncurses nls nptl nsplugin offensive ogg openal opengl openmp pam pango pcre pdf phonon plasma png policykit postscript ppds pulseaudio qml qt5 rdesktop readline recode samba sctp sdl seccomp sndfile sockets speex spell split-usr sqlite sqlite3 ssl startup-notification svg symlink syslog systemd sysvipc taglib telemetry test theora threads tidy tiff truetype udev udisks unicode upower usb vaapi vala vdpau vim-syntax vnc vorbis wavpack wayland widgets win32codecs wmf wxwidgets x264 xattr xcb xine xml xpm xscreensaver xv xvid yahoo zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel virmidi" 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" CAMERAS="kodak ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" CURL_SSL="gnutls" 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" KERNEL="linux" L10N="it en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7" RUBY_TARGETS="ruby25" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= dev-libs/libffi-3.3-r2::gentoo was built with the following: USE="-debug -pax_kernel -static-libs -test" ABI_X86="(64) -32 (-x32)" CFLAGS="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=7 -fno-lto" CXXFLAGS="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=7 -fno-lto" FEATURES="assume-digests distlocks unmerge-logs strict config-protect-if-modified usersandbox pid-sandbox preserve-libs usersync merge-sync sfperms unmerge-orphans distcc binpkg-dostrip multilib-strict binpkg-docompress parallel-fetch news protect-owned xattr binpkg-logs unknown-features-warn split-log cgroup sandbox split-elog compress-build-logs network-sandbox ipc-sandbox userfetch qa-unresolved-soname-deps userpriv ebuild-locks" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -flto=7 -fno-lto" # emerge -1pqv =dev-libs/libffi-3.3-r2 [ebuild R ] dev-libs/libffi-3.3-r2 USE="test* -debug -pax_kernel -static-libs" ABI_X86="(64) -32 (-x32)"
1. Is it a failure that happens every time you run testsuite? 2. Does it fail for you without -march=amdfam10 in compiler flags?
(In reply to Sergei Trofimovich from comment #1) > 1. Is it a failure that happens every time you run testsuite? Yes, every single time. > 2. Does it fail for you without -march=amdfam10 in compiler flags? No idea, but it happens also on my other system with -march=skylake
(In reply to Paolo Pedroni from comment #2) > > 2. Does it fail for you without -march=amdfam10 in compiler flags? > > No idea, but it happens also on my other system with -march=skylake Can you try it? Something like: # CFLAGS="-O2 -pipe -frecord-gcc-switches -flto=7" \ CXXFLAGS="-O2 -pipe -frecord-gcc-switches -flto=7" \ LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -flto=7 -fno-lto" \ emerge -v1 libffi
On a coffeelake machine I tried the following and it did not exhibit failures: # CFLAGS="-O2 -pipe -frecord-gcc-switches -flto=7 -march=skylake" CXXFLAGS="-O2 -pipe -frecord-gcc-switches -flto=7 -march=skylake" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -flto=7" MAKEOPTS='-j9 RUNTESTFLAGS="complex.exp"' PORTAGE_TMPDIR=/tmp/p ebuild /usr/portage/dev-libs/libffi/libffi-3.3-r2.ebuild clean test
Can you attach both libffi.sum and libffi.log from a $WORKDIR after test failures?
Created attachment 670727 [details] libffi.log (In reply to Sergei Trofimovich from comment #3) > (In reply to Paolo Pedroni from comment #2) > Can you try it? Something like: > > # CFLAGS="-O2 -pipe -frecord-gcc-switches -flto=7" \ > CXXFLAGS="-O2 -pipe -frecord-gcc-switches -flto=7" \ > LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu > -Wl,--sort-common -flto=7 -fno-lto" \ > emerge -v1 libffi Still failing. :-/ Attaching requested files.
Created attachment 670730 [details] libffi.sum
I can confirm the same test failure on the SkyLake i5 with and without -march=skylake in CFLAGS and CXXFLAGS
Aha, the log is useful. .sum file reports that test run was successful: FAIL: libffi.complex/cls_align_complex_float.c (test for excess errors) PASS: libffi.complex/cls_align_complex_float.c execution test but the generated warnings were unexpected: """ Executing on host: x86_64-pc-linux-gnu-gcc /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex_float.c -I/var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite/../include -I/var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/../include -I/var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite/../include/.. -L/var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite/../.libs -lffi -lm -o ./cls_align_complex_float.exe (timeout = 300) spawn -ignore SIGHUP x86_64-pc-linux-gnu-gcc /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex_float.c -I/var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite/../include -I/var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/../include -I/var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite/../include/.. -L/var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite/../.libs -lffi -lm -o ./cls_align_complex_float.exe In file included from /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex_float.c:10: /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex.inc: In function ‘cls_struct_align_fn’: /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex.inc:13:1: note: the ABI of passing structure with complex float member has changed in GCC 4.4 13 | { | ^ FAIL: libffi.complex/cls_align_complex_float.c (test for excess errors) Excess errors: In file included from /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex_float.c:10: /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex.inc: In function ‘cls_struct_align_fn’: /var/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex.inc:13:1: note: the ABI of passing structure with complex float member has changed in GCC 4.4 13 | { | ^ """ I think it tells us that warning 'note' not filtered out as insignificant by dejagnu. I'll check if I get the warning and will try to figure out how normally dejagnu ignores those.
For comparison my libffi.log contains extra CFLAGS your build misses: """ x86_64-pc-linux-gnu-gcc /tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/libffi.complex/cls_align_complex_float.c -W -Wall -Wno-psabi -O2 -I/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite/../include -I/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3/testsuite/../include -I/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite/../include/.. -L/tmp/portage/dev-libs/libffi-3.3-r2/work/libffi-3.3-abi_x86_64.amd64/testsuite/../.libs -lffi -lm -o ./cls_align_complex_float.exe """ -Wno-psabi would inhibit the warning, but lack of -O2 is also concerning. That means the test coverage lacks optimised code. Let's see where your build decided to ignore the flags.
-Wno-psabi is set in testsuite/lib/libffi.exp as: proc run-many-tests { testcases extra_flags } { global compiler_vendor global env switch $compiler_vendor { ... "gnu" { set common "-W -Wall -Wno-psabi" ... } default { ... set optimizations { "" } } } ... $compiler_vendor is set in testsuite/lib/libffi.exp as: testsuite/lib/libffi.exp: set tmp [grep "$blddirffi/config.log" "^ax_cv_c_compiler_vendor.*$"] regexp -- {^[^=]*=(.*)$} $tmp nil compiler_vendor m4/ax_compiler_vendor.m4 defines compiler vendor definition is long but straightforward. I wonder what vendor was detected for you. Can you upload 'config.log' from ${WORKDIR} as well?
Created attachment 670936 [details] config.log (In reply to Sergei Trofimovich from comment #11) > m4/ax_compiler_vendor.m4 defines compiler vendor definition is long but > straightforward. I wonder what vendor was detected for you. > > Can you upload 'config.log' from ${WORKDIR} as well? Here it is.
(In reply to Paolo Pedroni from comment #12) > Here it is. Aha! Your config.log uses single-quote string quotation: ax_cv_c_compiler_vendor='gnu' Mine does not have any: ax_cv_c_compiler_vendor=gnu That explains mis-detection. That is probably because your default shell is dash. Reproduced locally on '/bin/sh -> dash'.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b64f44870960b1d321a911135687e332ab5d8ac5 commit b64f44870960b1d321a911135687e332ab5d8ac5 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-11-11 19:36:51 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-11-11 19:37:12 +0000 dev-libs/libffi: fix vendor detection on 'dash' shell Reported-by: Paolo Pedroni Closes: https://bugs.gentoo.org/753299 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> .../files/libffi-3.3-compiler-vendor-quote.patch | 33 ++++++++++++++++++++++ dev-libs/libffi/libffi-3.3-r2.ebuild | 1 + 2 files changed, 34 insertions(+)
Proposed fix upstream as https://github.com/libffi/libffi/pull/594.