s390-tools FTBFS with GCC 12

Bug #1986670 reported by Graham Inggs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
Skipper Bug Screeners
s390-tools (Ubuntu)
Fix Released
High
Lukas Märdian

Bug Description

I've copied what I hope is the relevant part of the log below.

gcc -I ../../include -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -fno-pie -Os -g -I../..//zipl/boot -I../..//zipl/include -I../..//include -DENABLE_SCLP_ASCII=1 -DS390_TOOLS_RELEASE=2.20.0-build-20220816 -fno-builtin -ffreestanding -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -fno-stack-protector -fexec-charset=IBM1047 -m64 -mpacked-stack -mstack-size=4096 -mstack-guard=128 -msoft-float -Wall -Wformat-security -Wextra -Werror -c stage3a.c -o stage3a.o
In file included from stage3a.c:14:
In function ‘__test_facility’,
    inlined from ‘test_facility’ at ../../include/boot/s390.h:428:9,
    inlined from ‘start’ at stage3a.c:42:7:
../../include/boot/s390.h:418:17: error: array subscript 0 is outside array bounds of ‘void[0]’ [-Werror=array-bounds]
  418 | return (*ptr & (0x80 >> (nr & 7))) != 0;
      | ^~~~
cc1: all warnings being treated as errors

Tags: s390x
Revision history for this message
Frank Heimes (fheimes) wrote :

Just for the records, that happens on kinetic with s390-tools 2.20.0-0ubuntu4.

tags: added: s390x
Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Frank Heimes (fheimes)
Changed in s390-tools (Ubuntu):
importance: Undecided → High
Changed in ubuntu-z-systems:
importance: Undecided → High
Revision history for this message
Frank Heimes (fheimes) wrote :

Looks like this issues was already upstream reported:
https://github.com/ibm-s390-linux/s390-tools/issues/130
and was fixed with:
https://github.com/ibm-s390-linux/s390-tools/commit/9e620058184cfdf026241b953bfbb095256198a0

So the upcoming v2.23 should properly build with gcc 12.1.

Revision history for this message
Lukas Märdian (slyon) wrote :

Thanks for the investigation @fheimes!

I've integrated the upstream fix, to have a buildable version in Kinetic.

Uploaded s390-tools & s390-tools-signed.

Changed in s390-tools (Ubuntu):
assignee: nobody → Lukas Märdian (slyon)
status: New → In Progress
Revision history for this message
Frank Heimes (fheimes) wrote :

Oh great @slyon!

In addition (and in preparation for the upcoming s390-tools v2.23, that is planned to be the target release for kinetic), I've created a snapshot release (2.22.0+20220816.1ffd767-0ubuntu1) of the latest s390-tools (since 2.23 is not released yet) and was also able to build it with gcc-12 (proposed enabled in PPA):
https://launchpad.net/~fheimes/+archive/ubuntu/lp1986670

Revision history for this message
Frank Heimes (fheimes) wrote :

Work on the general update of kinetic/s390-tools to 2.23 has started and is tracked here:
https://bugs.launchpad.net/bugs/1986991

Changed in ubuntu-z-systems:
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package s390-tools - 2.20.0-0ubuntu5

---------------
s390-tools (2.20.0-0ubuntu5) kinetic; urgency=medium

  * d/p/9e62005-genprotimg-boot-disable-Warray-bounds-for-now.patch:
    Fix FTBFS with GCC-12 using upstream commit 9e62005 (LP: #1986670)

 -- Lukas Märdian <email address hidden> Wed, 17 Aug 2022 12:13:49 +0200

Changed in s390-tools (Ubuntu):
status: In Progress → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.