Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 701516 - dev-util/strace-5.4 fails to build
Summary: dev-util/strace-5.4 fails to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://github.com/strace/strace/issu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-30 06:52 UTC by Patrick Lauer
Modified: 2019-12-05 17:41 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2019-11-30 06:52:25 UTC
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H   -I./linux/x86_64 -I./linux/x86_64 -I./linux -I./linux -I. -I.     -DIN_MPERS -DMPERS_IS_m32 -I./mpers-m32  -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Woverride-init -Wsign-compare -Wtype-limits -Wwrite-strings   -O2 -pipe -march=native -flto=4 -fuse-linker-plugin -c -o libmpers_m32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo './'`ipc_shmctl.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H   -I./linux/x86_64 -I./linux/x86_64 -I./linux -I./linux -I. -I.     -DIN_MPERS -DMPERS_IS_m32 -I./mpers-m32  -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Woverride-init -Wsign-compare -Wtype-limits -Wwrite-strings   -O2 -pipe -march=native -flto=4 -fuse-linker-plugin -c -o libmpers_m32_a-loop.o `test -f 'loop.c' || echo './'`loop.c
fetch_struct_stat64.c: In function ‘m32_fetch_struct_stat64’:
fetch_struct_stat64.c:58:16: error: storage size of ‘buf’ isn’t known
   58 |  struct_stat64 buf;
      |                ^~~
fetch_struct_stat64.c:58:16: warning: unused variable ‘buf’ [-Wunused-variable]
make[2]: *** [Makefile:2983: libmpers_m32_a-fetch_struct_stat64.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/dev-util/strace-5.4/work/strace-5.4'
make[1]: *** [Makefile:7494: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-util/strace-5.4/work/strace-5.4'
make: *** [Makefile:2321: all] Error 2
rm ioctlsort0 ioctlsort1 ioctlsort0.o ioctls_all2.h ioctlsort1.o ioctls_all1.h ioctls_all0.h ioctlsort2.o ioctlsort2
 * ERROR: dev-util/strace-5.4::gentoo failed (compile phase):
 *   emake failed

Portage 2.3.80 (python 3.6.9-final-0, default/linux/amd64/17.0, gcc-9.2.0, glibc-2.30-r3, 5.2.13-gentoo x86_64)
=================================================================
System uname: Linux-5.2.13-gentoo-x86_64-AMD_FX-tm-8350_Eight-Core_Processor-with-gentoo-2.6
KiB Mem:    32928272 total,  16476216 free
KiB Swap:          0 total,         0 free
sh bash 5.0_p11
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          5.0_p11::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.6.9::gentoo
dev-util/cmake:           3.16.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.32-r1::gentoo, 2.33.1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.3-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r3::gentoo
Repositories:

gentoo
    location: /home/me/code/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: no

adjust
    location: /home/me/code/adjust/gentoo-overlay
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -flto=4 -fuse-linker-plugin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 -march=native -flto=4 -fuse-linker-plugin"
DISTDIR="/chroot/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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 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 sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/etc/X11/xinit/xinitrc.d/80-dbus /usr/bin/dbus-launch"
LANG="en_US.utf8"
LDFLAGS="-O2 -flto=4"
MAKEOPTS="-j8"
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 acl alsa amd64 apng berkdb bzip2 cli crypt cups cxx dri ffmpeg fortran gdbm glamor gmp gpo iconv icu ipv6 lapack libtirpc minizip multilib ncurses nls nptl opencl opengl openmp pam pcre pgo readline seccomp split-usr sqlite ssl tcpd truetype udev unicode vdpau vulkan xattr xvmc zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 f16c fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" 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 keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="radeon r600 radeonsi amdgpu" 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, EMERGE_DEFAULT_OPTS, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Ionen Wolkens gentoo-dev 2019-11-30 08:00:59 UTC
I've having strange behavior trying to build this.

CFLAGS unset / -O2 / -O2 -g: all builds fine
-O2 -g0: fails (same error)
-O2 -flto: fails

I'd like to say it's a LTO issue but that -g0 fails is just strange (while debug symbols get stripped either way, I use -g0 system-wide to cancel out potential -g and have smaller files during building phase).
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2019-11-30 13:52:39 UTC
Confirmed for

  CFLAGS="-O2 -pipe -march=native -flto=4 -fuse-linker-plugin"
  LDFLAGS="-O2 -flto=4"

Bisect revealed:

> 7e4c052fb29c6838b483d2c0adf9da45b3f01ee1 is the first bad commit
> commit 7e4c052fb29c6838b483d2c0adf9da45b3f01ee1
> Author: Eugene Syromyatnikov <evgsyr@gmail.com>
> Date:   Fri Feb 23 23:24:40 2018 +0100
> 
>     Add support for per-mpers compiler settings
> 
>     As some very special architectures require a separate compiler
>     in order to compile binaries for additional supported personalities,
>     we have to introduce such support.
> 
>     * Makefile.am (mpers_CPPFLAGS): Move $(strace_CPPFLAGS) ...
>     (mpers_sh_opts): ... here.
>     (mpers-m%.stamp:): Use $(mpers_CC) instead of $(CC) for compiler,
>     pass $(mpers_CC_FLAGS) in quotes as it might be empty or contain spaces.
>     ($(mpers_m32_targets)): Add @CFLAGS_FOR_M32@ to mpers_CC_FLAGS, set
>     mpers_CPPFLAGS and mpers_CC.
>     ($(mpers_mx32_targets)): Add @CFLAGS_FOR_MX32@ to mpers_CC_FLAGS, set
>     mpers_CPPFLAGS and mpers_CC.
>     * bootstrap (m_upper): Derive uppercase personality name.
>     Set CC for mpers Makefile.am, add @CFLAGS_FOR_{M32,MX32}@ to
>     MPERS_CC_FLAGS definition.
>     * configure.ac: Derive default values for
>     {CC,CPP,CFLAGS,CPPFLAGS}_FOR_{M32,MX32} from the respective CC, CPP,
>     CFLAGS, and CPPFLAGS values.
>     * m4/mpers.m4 (AC_DEFUN([st_MPERS])): Use
>     {CC,CPP,CFLAGS,CPPFLAGS}_FOR_<$1> as CC, CPP, CFLAGS, and CPPFLAGS,
>     respectively.  Enclose MPERS_CFLAGS in quotes in mpers.sh call.  Provide
>     information about compiler in the AC_CACHE_CHECK message.
>     * tests/Makefile.am (CC): New variable.
> 
>     Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
> 
>  Makefile.am       | 16 ++++++++++------
>  bootstrap         |  4 +++-
>  configure.ac      |  6 ++++++
>  m4/mpers.m4       | 33 +++++++++++++++++++++++++++++----
>  tests/Makefile.am |  1 +
>  5 files changed, 49 insertions(+), 11 deletions(-)
Comment 3 Ionen Wolkens gentoo-dev 2019-12-05 13:33:16 UTC
Fixed upstream but until next version it has a proposed workaround for 5.4 of:

export CFLAGS_FOR_M32= CFLAGS_FOR_MX32=

Which appears to work for me with proper flags being used (only needs to be set during configure phase).
Comment 4 Larry the Git Cow gentoo-dev 2019-12-05 17:41:53 UTC
The bug has been closed via the following commit(s):

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

commit a306a8927c38add6a043238c426add96cc66fb7f
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-12-05 17:41:33 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-12-05 17:41:45 +0000

    dev-util/strace: do not copy CFLAGS to CFLAGS_FOR_{M32,MX32}
    
    Closes: https://bugs.gentoo.org/701516
    Package-Manager: Portage-2.3.80, Repoman-2.3.19
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 .../files/strace-5.4-fix-LTO-CFLAGS-handling.patch | 24 ++++++++++++++++++++++
 dev-util/strace/strace-5.4.ebuild                  |  8 +++++++-
 2 files changed, 31 insertions(+), 1 deletion(-)