[strace/strace] 5.4 FTBFS: fetch_struct_stat64.c:58:16: error: storage size of ‘buf’ isn’t known (#114)

Thomas Deutschmann notifications at github.com
Sat Nov 30 13:57:48 UTC 2019


strace-5.4 fails to build from source with the following FLAGS:

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

Error is:
```
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
```

Building previous version (5.3) with same flags works.

Bisect revealed the following bad commit 7e4c052fb29c6838b483d2c0adf9da45b3f01ee1:
```
commit 7e4c052fb29c6838b483d2c0adf9da45b3f01ee1
Author: Eugene Syromyatnikov
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

 Makefile.am       | 16 ++++++++++------
 bootstrap         |  4 +++-
 configure.ac      |  6 ++++++
 m4/mpers.m4       | 33 +++++++++++++++++++++++++++++----
 tests/Makefile.am |  1 +
 5 files changed, 49 insertions(+), 11 deletions(-)
```

Downstream-Bug: https://bugs.gentoo.org/701516

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/strace/strace/issues/114
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20191130/d0999a8e/attachment.html>


More information about the Strace-devel mailing list