🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: gmpfrxx-mkii FTBFS on s309x

#28
From: Rafael Laboissière
Date: Tue, 10 Nov 2026 23:00
36 lines
3859 bytes
* Ed . <ej_zg@hotmail.com> [2026-11-10 16:49]:

> Hi Rafael,
>
> I tried to look at the log and it says "log file not found!". As you say, if it just says "segfault", I'm not missing much.
>
> The way to dig into this would be to run a qemu and emulated an s390x, running Debian, and use gdb to get a stack-trace. Warning: that emulation can be kind of slow.

I built the package on a s390x Debian porterbox. This the gdb session:

$ gdb ./obj-s390x-linux-gnu/tests/test_mpz_arithmetic
(gdb) run
Starting program: /home/rafael/PKGS/gmpfrxx-mkii/gmpfrxx-mkii/obj-s390x-linux-gnu/tests/test_mpz_arithmetic
Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/s390x-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x000003fff7cd9788 in __cxa_begin_catch () from /usr/lib/s390x-linux-gnu/libstdc++.so.6
(gdb) backtrace
#0  0x000003fff7cd9788 in __cxa_begin_catch () from /usr/lib/s390x-linux-gnu/libstdc++.so.6
#1  0x000002aa00002090 in gmpxx::mpz_class::mpz_class<gmpfrxx_mkII::detail::binary_expr<gmpfrxx_mkII::detail::div_op, gmpfrxx_mkII::detail::object_leaf<gmpxx::mpz_class>, gmpfrxx_mkII::detail::object_leaf<gmpxx::mpz_class>, gmpxx::mpz_class>, void> (this=0x3ffffff9ef8, expr=...) at ./include/gmpfrxx_mkII/detail/zq_impl.hpp:2774
#2  operator() (__closure=<optimized out>) at ./tests/test_mpz_arithmetic.cpp:101
#3  (anonymous namespace)::require_domain_error<(anonymous namespace)::check_division_by_zero_throws()::<lambda()> > (function=...) at ./tests/test_mpz_arithmetic.cpp:59
#4  (anonymous namespace)::check_division_by_zero_throws () at ./tests/test_mpz_arithmetic.cpp:100
#5  main () at ./tests/test_mpz_arithmetic.cpp:392

I submitted this backtrace to Gemini, who recommended adding some compiler flags:

export CXXFLAGS="-fexceptions -fasynchronous-unwind-tables"

The package then built correctly.

I am not an expert on this matter, and as usual, I am skeptical of AI debugging. Could someone confirm that this would be a reasonable fix?

Best 

Rafael
Technical Details
Message-ID: <NY2YN-b6vh-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
References: <NXWA1-b2Zc-9@gated-at.bofh.it> <NY2YN-b6vh-3@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!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: Wed, 11 Nov 2026 00:00:01 +0100
Message-ID: <NY2YN-b6vh-1@gated-at.bofh.it>
References: <NXWA1-b2Zc-9@gated-at.bofh.it> <NY2YN-b6vh-3@gated-at.bofh.it>
X-Original-To: "Ed ." <ej_zg@hotmail.com>
X-Mailbox-Line: From debian-s390-request@lists.debian.org  Tue Nov 10 22:51:30 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
Organization: Debian GNU/Linux
X-Content-Language: en-us
X-Position: -268
X-Debian-User: rafael
X-Mailing-List: <debian-s390@lists.debian.org> archive/latest/6132
List-ID: <debian-s390.lists.debian.org>
List-URL: <https://lists.debian.org/debian-s390/>
List-Archive: https://lists.debian.org/msgid-search/avOcPVQUFMiQwB5U@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-s390@lists.debian.org
X-Original-Date: Tue, 10 Nov 2026 23:35:41 +0100
X-Original-Message-ID: <avOcPVQUFMiQwB5U@laboissiere.net>
X-Original-References: <avM8_vgi4vslpzbs@laboissiere.net>
 <PAXPR05MB878483829C858431BA870CC382722@PAXPR05MB8784.eurprd05.prod.outlook.com>