Subject: bug#76644: closed (Re: bug#76644: 1.13 fails to build on s390x: alignas gone)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 28 Feb 2025 22:14:03 +0000

Your bug report

#76644: 1.13 fails to build on s390x: alignas gone

which was filed against the gzip package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
76644: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76644
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#76644: 1.13 fails to build on s390x: alignas gone
From: Paul Eggert <[email-masked]>
To: Andreas Hasenack <[email-masked]>
Cc: [email-masked]
Date: Fri, 28 Feb 2025 14:13:02 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks for the bug report. This appears to be the same as the following 
issue reported by Sarah-Julia Kriesch, and you can see a fix there:

https://bugs.gnu.org/66709

For now, I'll merge the two bug reports.

Subject: 1.13 fails to build on s390x: alignas gone
From: Andreas Hasenack <[email-masked]>
To: [email-masked]
Date: Fri, 28 Feb 2025 11:24:22 -0300
List-Id: <debbugs-submit.debbugs.gnu.org>

We are getting this build failure[1] on s390x in dfltcc.c:

gcc -DHAVE_CONFIG_H -I. -I.. -I./lib -I../lib -Wdate-time
-D_FORTIFY_SOURCE=3 -DDFLTCC -DDFLTCC_LEVEL_MASK=0x7e -g -O2
-Werror=implicit-function-declaration -mbackchain
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects
-fstack-protector-strong -Wformat -Werror=format-security
-fno-stack-clash-protection
-fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/gzip-1.13-1ubuntu3~ppa1
-Wall -MT dfltcc.o -MD -MP -MF $depbase.Tpo -c -o dfltcc.o ../dfltcc.c
&&\
mv -f $depbase.Tpo $depbase.Po
../dfltcc.c:87:17: error: expected declaration specifiers or '...'
before numeric constant
   87 | char alignas (8) aligned;
      | ^
../dfltcc.c:88:1: warning: no semicolon at end of struct or union
   88 | };
      | ^
../dfltcc.c:139:17: error: expected declaration specifiers or '...'
before numeric constant
  139 | char alignas (8) aligned;
      | ^
../dfltcc.c:140:1: warning: no semicolon at end of struct or union
  140 | };
      | ^
make[3]: *** [Makefile:1946: dfltcc.o] Error 1

Looks like 1.13 did some refactoring for C23 support, but dfltcc.c is
still using the "alignas" keyword without an #ifdef. Since that file
is only used when building on s390x, that's where we are seeing this
error.

./gzip.c-   let's do that.  */
./gzip.c:#if defined HAVE_C_ALIGNASOF || defined alignas
./gzip.c:# define BUFFER_ALIGNED alignas (4096)
./gzip.c-#else
--
./dfltcc.c-  struct dfltcc_qaf_param af;
./dfltcc.c:  char alignas (8) aligned;
./dfltcc.c-};
--
./dfltcc.c-  struct dfltcc_param_v0 param;
./dfltcc.c:  char alignas (8) aligned;
./dfltcc.c-};

1. https://bugs.launchpad.net/ubuntu/+source/gzip/+bug/2100598/comments/2