s390-tools v2.34.0 FTBFS on oracular/s390x

Bug #2077055 reported by Frank Heimes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
In Progress
High
Frank Heimes
s390-tools (Ubuntu)
In Progress
High
Frank Heimes
s390-tools-signed (Ubuntu)
In Progress
High
Frank Heimes

Bug Description

The (currently) latest s390-tools version 2.34.0 for oracular fails to build on s390x:
https://launchpad.net/ubuntu/+source/s390-tools/2.34.0-0ubuntu1
https://launchpadlibrarian.net/743774862/buildlog_ubuntu-oracular-s390x.s390-tools_2.34.0-0ubuntu1_BUILDING.txt.gz
https://ubuntu-archive-team.ubuntu.com/proposed-migration/update_excuses.html#s390-tools
The builds on other architectures (amd64, arm64 and ppc64el) are not affected (but are very small subsets anyway).

It builds successful on noble:
https://launchpad.net/~fheimes/+archive/ubuntu/lp2073786/+sourcepub/16396042/+listing-archive-extra
https://launchpadlibrarian.net/743599188/buildlog_ubuntu-noble-s390x.s390-tools_2.34.0-0ubuntu2.24.04.1_BUILDING.txt.gz

and even built successful when a test build was done (prior to the upload) on Aug, 1st:
https://launchpad.net/~fheimes/+archive/ubuntu/lp2073786/+sourcepub/16300146/+listing-archive-extra
https://launchpadlibrarian.net/741871514/buildlog_ubuntu-oracular-s390x.s390-tools_2.34.0-0ubuntu1_BUILDING.txt.gz

A new/updated package in the oracular archive that must have landed between 2024-08-01 and 2024-08-12 seem to have caused this build failure.

The error is the build log is:
...
gcc -E -Wp,-MD,.stage3b.lds.d,-MT,stage3b.lds -I../..//zipl/boot -I../..//zipl/include -I../..//include -P -C -o stage3b.lds stage3b.lds.S
gcc -E -Wp,-MD,.stage3b_reloc.lds.d,-MT,stage3b_reloc.lds -I../..//zipl/boot -I../..//zipl/include -I../..//include -P -C -o stage3b_reloc.lds stage3b_reloc.lds.S
gcc -no-pie -Wl,--no-warn-rwx-segments -Wl,-T,stage3a.lds -Wl,--build-id=none -m64 -static -nostdlib stage3a.o head.o stage3a_init.o libc.o ebcdic.o ebcdic_conv.o sclp.o entry.o -o stage3a.elf
/usr/bin/ld: Heap section doesn't conform to the described memory layout
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:77: stage3a.elf] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/genprotimg/boot'
make[3]: *** [Makefile:20: all-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/genprotimg'
make[2]: *** [Makefile:56: genprotimg] Error 2
...

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

Initial suspicion was that it could have been caused by gcc v14,
but all builds are with gcc-14, however, slightly different versions:
14-20240412-0ubuntu1 (noble)
14.1.0-5ubuntu1 (oracular, no FTBFS)
14.2.0-2ubuntu1 (oracular, FTBFS)

But the error msg seems to point to the linker (/usr/bin/ld), hence checking binutils:
2.42.90.20240720-2ubuntu1 (noble)
2.42-4ubuntu2 (oracular, no FTBFS)
2.43-2ubuntu1 (oracular, FTBFS)

Since there is a new version (2.43), looks like it's worth to follow the binutils path...
I've build and uploaded older binutils into a PPA and rebuild the s390-tools in the same, but no luck.
I used the same 2.42.90.20240720-2ubuntu1 that was used during the successful test build, but still failed to build:
https://launchpadlibrarian.net/744104131/buildlog_ubuntu-oracular-s390x.s390-tools_2.34.0-0ubuntu2.24.10.1_BUILDING.txt.gz

Changed in s390-tools (Ubuntu):
importance: Undecided → High
Changed in ubuntu-z-systems:
importance: Undecided → High
assignee: nobody → Frank Heimes (fheimes)
status: New → Triaged
Changed in s390-tools (Ubuntu):
status: New → Triaged
Revision history for this message
Frank Heimes (fheimes) wrote :

I've now looked a bit closer at the code that is build when things break,
and remembered the issues with builtins we have at LP#2075567 (caused by aligning the gcc builtins to the llvm ones).
This is meanwhile fixed by IBM:
https://bugs.launchpad.net/ubuntu/+source/zlib/+bug/2075567/comments/4

Since it's not upstream accepted yet, I'm picking two patches myself:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e8a7142a697c5d2673adea33ba23af82a89c9559
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a247088adaf122116919235f4a40189506139495
and building a patched gcc:
https://launchpad.net/~fheimes/+archive/ubuntu/lp2073786/+sourcepub/16399725/+listing-archive-extra
(seems to be a bit tricky, since the d/patch handling is different and several rules files exist, but let's see)

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

Update: a few hours ago the above two patches were accepted (upstream):
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git

With that the commits can (and will) be picked up for oracular.
So it's planned to have a new official gcc-14 build over the weekend (which would solve the zlib issue, and let's see for s390-tools issue).

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

Turns out that my gcc 14 rebuild in PPA didn't pulled in my patch, so started another build... (the handling of quilt patches is a bit different in gcc).

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

Meanwhile I created an upstream issue on top:
https://github.com/ibm-s390-linux/s390-tools/issues/174
asking the maintainers for their opinion as well.

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

The patched gcc 14 build meanwhile completed.
Using it solved the zlib issue (LP#2075567), but unfortunately not the s390-tools 2.34.0 issue.

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

After a discussion with Marc Hartmayer,
on discarding *(.note.GNU-stack) for the bootloader tools
and after fixing another (but unrelated) rust issue,
I think I have now a package that should build.
It already built locally for me, now trying in PPA (-proposed enabled):
https://launchpad.net/~fheimes/+archive/ubuntu/lp2077055

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

The test build in PPA was successful - preparing the debdiff(s) ...

Changed in s390-tools-signed (Ubuntu):
importance: Undecided → High
status: New → In Progress
Changed in s390-tools (Ubuntu):
status: Triaged → In Progress
Changed in ubuntu-z-systems:
status: Triaged → In Progress
Revision history for this message
Frank Heimes (fheimes) wrote :
Changed in s390-tools-signed (Ubuntu):
assignee: nobody → Frank Heimes (fheimes)
Revision history for this message
Frank Heimes (fheimes) wrote :

I will create a PR with the changes soon (probably two, since the patches that I had to create to get the build fixed are not related to each other)...

Frank Heimes (fheimes)
tags: added: update-excuse-oracular
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.