zlib fails to build on s390x on oracular with gcc 14

Bug #2075567 reported by Frank Heimes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Triaged
Critical
bugproxy
gcc-14 (Ubuntu)
New
Undecided
Unassigned
zlib (Ubuntu)
Triaged
Critical
Simon Chopin

Bug Description

Rebuilding zlib for s390x on oracular fails to build, probably due to gcc 14 usage (since it became more strict).

Full build log can be found here:
https://launchpadlibrarian.net/741961061/buildlog_ubuntu-oracular-s390x.zlib_1%3A1.3.dfsg-3.1ubuntu4_BUILDING.txt.gz

erroneous lines are:

D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DHAVE_IFUNC -DHAVE_S390X_VX -march=z13 -mzarch -c -o crc32-vx.o contrib/s390/crc32-vx.c
contrib/s390/crc32-vx.c: In function ‘crc32_le_vgfm_16’:
contrib/s390/crc32-vx.c:91:52: error: incompatible type for argument 3 of ‘__builtin_s390_vgfmag’
   91 | v1 = (uv2di)vec_gfmsum_accum_128(r2r1, v1, part1);
      | ^~~~~
      | |
      | uv16qi {aka __vector(16) unsigned char}
contrib/s390/crc32-vx.c:91:52: note: expected ‘__int128 unsigned’ but argument is of type ‘uv16qi’ {aka ‘__vector(16) unsigned char’}
contrib/s390/crc32-vx.c:92:52: error: incompatible type for argument 3 of ‘__builtin_s390_vgfmag’
   92 | v2 = (uv2di)vec_gfmsum_accum_128(r2r1, v2, part2);
      | ^~~~~
      | |
      | uv16qi {aka __vector(16) unsigned char}
contrib/s390/crc32-vx.c:92:52: note: expected ‘__int128 unsigned’ but argument is of type ‘uv16qi’ {aka ‘__vector(16) unsigned char’}
contrib/s390/crc32-vx.c:93:52: error: incompatible type for argument 3 of ‘__builtin_s390_vgfmag’
   93 | v3 = (uv2di)vec_gfmsum_accum_128(r2r1, v3, part3);
      | ^~~~~
      | |
      | uv16qi {aka __vector(16) unsigned char}
contrib/s390/crc32-vx.c:93:52: note: expected ‘__int128 unsigned’ but argument is of type ‘uv16qi’ {aka ‘__vector(16) unsigned char’}
contrib/s390/crc32-vx.c:94:52: error: incompatible type for argument 3 of ‘__builtin_s390_vgfmag’
   94 | v4 = (uv2di)vec_gfmsum_accum_128(r2r1, v4, part4);
      | ^~~~~
      | |
      | uv16qi {aka __vector(16) unsigned char}
contrib/s390/crc32-vx.c:94:52: note: expected ‘__int128 unsigned’ but argument is of type ‘uv16qi’ {aka ‘__vector(16) unsigned char’}
contrib/s390/crc32-vx.c:105:48: error: incompatible type for argument 3 of ‘__builtin_s390_vgfmag’
  105 | v1 = (uv2di)vec_gfmsum_accum_128(r4r3, v1, (uv16qi)v2);
      | ^~~~~~~~~~
      | |
      | __vector(16) unsigned char
contrib/s390/crc32-vx.c:105:48: note: expected ‘__int128 unsigned’ but argument is of type ‘__vector(16) unsigned char’
contrib/s390/crc32-vx.c:106:48: error: incompatible type for argument 3 of ‘__builtin_s390_vgfmag’
  106 | v1 = (uv2di)vec_gfmsum_accum_128(r4r3, v1, (uv16qi)v3);
      | ^~~~~~~~~~
      | |
      | __vector(16) unsigned char
contrib/s390/crc32-vx.c:106:48: note: expected ‘__int128 unsigned’ but argument is of type ‘__vector(16) unsigned char’
contrib/s390/crc32-vx.c:107:48: error: incompatible type for argument 3 of ‘__builtin_s390_vgfmag’
  107 | v1 = (uv2di)vec_gfmsum_accum_128(r4r3, v1, (uv16qi)v4);
      | ^~~~~~~~~~
      | |
      | __vector(16) unsigned char
contrib/s390/crc32-vx.c:107:48: note: expected ‘__int128 unsigned’ but argument is of type ‘__vector(16) unsigned char’
contrib/s390/crc32-vx.c:114:52: error: incompatible type for argument 3 of ‘__builtin_s390_vgfmag’
  114 | v1 = (uv2di)vec_gfmsum_accum_128(r4r3, v1, (uv16qi)v2);
      | ^~~~~~~~~~
      | |
      | __vector(16) unsigned char
contrib/s390/crc32-vx.c:114:52: note: expected ‘__int128 unsigned’ but argument is of type ‘__vector(16) unsigned char’
contrib/s390/crc32-vx.c:161:46: error: incompatible type for argument 3 of ‘__builtin_s390_vgfmag’
  161 | v1 = (uv2di)vec_gfmsum_accum_128(r5, v1, (uv16qi)v2);
      | ^~~~~~~~~~
      | |
      | __vector(16) unsigned char
contrib/s390/crc32-vx.c:161:46: note: expected ‘__int128 unsigned’ but argument is of type ‘__vector(16) unsigned char’
contrib/s390/crc32-vx.c:192:52: error: incompatible type for argument 3 of ‘__builtin_s390_vgfmag’
  192 | v2 = (uv2di)vec_gfmsum_accum_128(crc_poly, v2, (uv16qi)v1);
      | ^~~~~~~~~~
      | |
      | __vector(16) unsigned char
contrib/s390/crc32-vx.c:192:52: note: expected ‘__int128 unsigned’ but argument is of type ‘__vector(16) unsigned char’
make[1]: *** [Makefile:180: crc32-vx.o] Error 1

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
assignee: nobody → bugproxy (bugproxy)
Changed in zlib (Ubuntu):
assignee: bugproxy (bugproxy) → nobody
Changed in ubuntu-z-systems:
importance: Undecided → High
Simon Chopin (schopin)
Changed in zlib (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Simon Chopin (schopin)
status: New → Triaged
Revision history for this message
Simon Chopin (schopin) wrote :

Frank, can you confirm that you got in touch with the upstream author about it?

I probably could "fix" it by sprinkling casts all over the place, which could be wildly unsafe depending on the exact properties of __int128, or by actually using a local __int128 variable and memcpy it or something like that, which might destroy performance? (I recall something like that being a problem in some glibc routines on ARM where moving data from SIMD registers was *really* slow on the Pis)

As you see, I'm in much doubt so knowledge from the people who wrote the patch (and own the hardware) would be greatly appreciated!

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

Hi Simon, not yet, but I'm pushing for this ...

Changed in ubuntu-z-systems:
importance: High → Critical
status: New → Triaged
bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-208475 severity-high targetmilestone-inin---
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2024-08-07 12:48 EDT-------
Thanks Ilya for your quick analysis, finding out that this is a compiler issue. Stefan will send a patch to the GCC mailing list.
We will post a link here once it's available.

Simon Chopin (schopin)
tags: added: ftbfs update-excuse
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.