bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

max_align_t on RHEL 7.1 s390x


From: Sergio Durigan Junior
Subject: max_align_t on RHEL 7.1 s390x
Date: Wed, 29 Aug 2018 14:04:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi there,

I've just updated GDB's gnulib copy using a recent commit, and now I'm
noticing a few errors when compiling things on a RHEL 7.1 s390x system.
Here's what I'm getting

  In file included from 
../../../../binutils-gdb/gdb/gnulib/import/scratch_buffer.h:9:0,
                   from ../../../../binutils-gdb/gdb/gnulib/import/glob.c:87:
  ../../../../binutils-gdb/gdb/gnulib/import/malloc/scratch_buffer.h:69:3: 
error: unknown type name max_align_t
     max_align_t __space[(1023 + sizeof (max_align_t)) / sizeof (max_align_t)];
     ^
  ../../../../binutils-gdb/gdb/gnulib/import/malloc/scratch_buffer.h:69:39: 
error: max_align_t undeclared here (not in a function)
     max_align_t __space[(1023 + sizeof (max_align_t)) / sizeof (max_align_t)];
                                         ^
  ../../../../binutils-gdb/gdb/gnulib/import/glob.c: In function glob_in_dir:
  ../../../../binutils-gdb/gdb/gnulib/import/glob.c:1413:15: error: for loop 
initial declarations are only allowed in C99 mode
                 for (size_t i = 0; i < cur; ++i)
                 ^
  ../../../../binutils-gdb/gdb/gnulib/import/glob.c:1413:15: note: use option 
-std=c99 or -std=gnu99 to compile your code
  ../../../../binutils-gdb/gdb/gnulib/import/glob.c:1438:15: error: for loop 
initial declarations are only allowed in C99 mode
                 for (size_t i = 0; i < cur; ++i)
                 ^
  make[8]: *** [glob.o] Error 1
  make[8]: *** Waiting for unfinished jobs....
  In file included from 
../../../../binutils-gdb/gdb/gnulib/import/scratch_buffer.h:9:0,
                   from 
../../../../binutils-gdb/gdb/gnulib/import/malloc/scratch_buffer_grow.c:23:
  ../../../../binutils-gdb/gdb/gnulib/import/malloc/scratch_buffer.h:69:3: 
error: unknown type name max_align_t
     max_align_t __space[(1023 + sizeof (max_align_t)) / sizeof (max_align_t)];
     ^
  ../../../../binutils-gdb/gdb/gnulib/import/malloc/scratch_buffer.h:69:39: 
error: max_align_t undeclared here (not in a function)
     max_align_t __space[(1023 + sizeof (max_align_t)) / sizeof (max_align_t)];

Two issues here: unknown 'max_align_t' and C99-style loop.  The latter
should be easy to fix; would you like a patch for that?

The issue with max_align_t doesn't make much sense to me.  Things were
working until the update, and by examining the diff I see that the
following commit was the only one touching max_align_t:

  commit 3ba4dbaefe671991083ff46a2714ff256adf75a1
  Author: Bruno Haible <address@hidden>
  Date:   Fri Sep 8 10:02:47 2017 +0200

      stddef: Avoid conflict with system-defined max_align_t.

The commit that introduced malloc/scratch_buffer.h was:

  commit ba153ed1edb23bf14f21b9892ff169f10d39911f
  Author: Bruno Haible <address@hidden>
  Date:   Sat Aug 18 21:35:11 2018 +0200

      scratch_buffer: Fix include file.

Initially, I don't see anything wrong with it.  Any ideas?

Unfortunately, these errors are happening on a buildslave that is part
of our BuildBot:

  https://gdb-build.sergiodj.net/builders/RHEL-s390x-m64/

This means that I'm not able to log into the machine and test things
freely.  However, I'm able to submit patches to be tested, so let me
know if you want me to do that.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]