🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.ports.s390
Article #37

Re: gmpfrxx-mkii FTBFS on s309x

#37
From: Rafael Laboissière
Date: Sat, 14 Nov 2026 07:40
36 lines
4178 bytes
* Pranav P <pranavp1729@gmail.com> [2026-11-13 22:46]:

> On Fri, 2026-11-13 at 16:47 +0100, Rafael Laboissière wrote:
>>> Thanks for this suggestion. I tested this solution on an s390x
>>> Debian porterbox and it worked. I uploaded version 1.5.0+ds-2 to
>>> unstable with the fix [1]. Let us see how the s390x autobuilder
>>> behaves.
>
> I don't think that it is a proper solution. I am still looking into
> this. When I was reading the disassembly, I saw that an ag instruction
> happens in the following way:
>
> ag %r3,0(%r11)
>
> while the value of register r11 was 0. This was causing a null pointer
> dereference (value at address 0 + 0) and causing the segfault. The
> value for register r11 was loaded from r2 which is an argument register
> (as well as the return register) according the s390x abi.
>
> But for the code compiled with O0, r2 was loaded with the right value
> (in the code compiled with O2 `lghi r2, 0` was done to zero out r2
> before doing a function call with the brasl instruction). There is a
> chance that this is because of an undefined behaviour. It's just a
> guess and I am not sure.
>
> I will update any findings as soon as I find any.

Thank you for this complementary information.

As Peter Blackman pointed out in this thread, this appears to be a compiler bug. He also mentioned a similar issue with the flam3 package that was fixed by adding -fno-finite-math-only to CFLAGS. Perhaps we could find a similar interim solution for gmpfrxx-mkii on s390x instead of using the aggressive -O0 solution.

Best,

Rafael

P.S.: I uploaded version 1.5.0+ds-3 of the gmpfrxx-mkii package using DEB_CXXFLAGS_MAINT_APPEND in debian/rules instead of setting CXXFLAGS directly.
Technical Details
Message-ID: <NZgwF-bNjJ-3@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod
References: <NXWA1-b2Zc-9@gated-at.bofh.it> <NY2YN-b6vh-3@gated-at.bofh.it> <NYbfH-bbm5-1@gated-at.bofh.it> <NYZFv-bDEN-7@gated-at.bofh.it> <NYZFv-bDEN-9@gated-at.bofh.it> <NYZFv-bDEN-5@gated-at.bofh.it> <NZ20F-bF1O-5@gated-at.bofh.it> <NZ6nD-bHp3-5@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod
From: Rafael Laboissière <rafael@debian.org>
Newsgroups: linux.debian.ports.s390
Subject: Re: gmpfrxx-mkii FTBFS on s309x
Date: Sat, 14 Nov 2026 08:40:01 +0100
Message-ID: <NZgwF-bNjJ-3@gated-at.bofh.it>
References: <NXWA1-b2Zc-9@gated-at.bofh.it> <NY2YN-b6vh-3@gated-at.bofh.it> <NYbfH-bbm5-1@gated-at.bofh.it> <NYZFv-bDEN-7@gated-at.bofh.it> <NYZFv-bDEN-9@gated-at.bofh.it> <NYZFv-bDEN-5@gated-at.bofh.it> <NZ20F-bF1O-5@gated-at.bofh.it> <NZ6nD-bHp3-5@gated-at.bofh.it>
X-Original-To: Pranav P <pranavp1729@gmail.com>
X-Mailbox-Line: From debian-s390-request@lists.debian.org  Sat Nov 14 07:30:23 2026
Old-Return-Path: <rafael@debian.org>
X-Amavis-Spam-Status: No, score=-4.401 tagged_above=-10000 required=5.3
 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3] autolearn=unavailable autolearn_force=no
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Organization: Debian GNU/Linux
X-Content-Language: en-us
X-Position: 1496
X-Debian-User: rafael
X-Mailing-List: <debian-s390@lists.debian.org> archive/latest/6146
List-ID: <debian-s390.lists.debian.org>
List-URL: <https://lists.debian.org/debian-s390/>
List-Archive: https://lists.debian.org/msgid-search/avgKPW7CjwsOuU7p@laboissiere.net
Approved: robomod@news.nic.it
Lines: 36
Sender: robomod@news.nic.it
X-Original-Cc: Maho Nakata <maho.nakata@gmail.com>,
	"debian-science@lists.debian.org" <debian-science@lists.debian.org>,
	"debian-s390@lists.debian.org" <debian-s390@lists.debian.org>
X-Original-Date: Sat, 14 Nov 2026 08:14:05 +0100
X-Original-Message-ID: <avgKPW7CjwsOuU7p@laboissiere.net>
X-Original-References: <avM8_vgi4vslpzbs@laboissiere.net>
 <PAXPR05MB878483829C858431BA870CC382722@PAXPR05MB8784.eurprd05.prod.outlook.com>
 <avQZrr0iSR18m2Xy@laboissiere.net>
 <CO1PR15MB4841AB3B26C960DE9503CCA2A0712@CO1PR15MB4841.namprd15.prod.outlook.com>
 <CO1PR15MB48414C526303D2316C558E20A0702@CO1PR15MB4841.namprd15.prod.outlook.com>
 <avcOPuLebbKKljtY@laboissiere.net>
 <avcxFFQvsg9u_rh8@laboissiere.net>
 <0800adb7ace37f22a19622ee217030806df742a7.camel@gmail.com>