[From nobody Thu Jun 18 16:09:07 2026
Received: (at submit) by bugs.debian.org; 30 Aug 2025 11:05:38 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-106.1 required=4.0 tests=BAYES_00,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FOURLA,FROMDEVELOPER,
 MD5_SHA1_SUM,SPF_HELO_NONE,SPF_NONE,UNPARSEABLE_RELAY,
 USER_IN_DKIM_WELCOMELIST autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 121; hammy, 150; neutral, 286; spammy,
 0. spammytokens:
 hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
 0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
 0.000-+--H*RT:311, 0.000-+--H*RT:108
Return-path: &lt;ntyni@debian.org&gt;
Received: from stravinsky.debian.org ([2001:41b8:202:deb::311:108]:46898)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;ntyni@debian.org&gt;) id 1usJOs-002UEe-0q
 for submit@bugs.debian.org; Sat, 30 Aug 2025 11:05:38 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; 
 s=smtpauto.stravinsky;
 h=X-Debian-User:Content-Transfer-Encoding:Content-Type
 :MIME-Version:Message-ID:Subject:To:From:Date:Reply-To:Cc:Content-ID:
 Content-Description:In-Reply-To:References;
 bh=NAMg5paL0mF+ULoFW1uS6uzJM9zdc2G5agT/MAsVZMU=; b=eaavKMz6/PlfuexiBLnatHp+pC
 LZMoNXaxyqdQmi7LgT50IpIDOcr/1pqHSR4nWkWlO/QemvPjVSLgNp+8Kt3wXGpzf/y8NbtLiS2yM
 yuQEdVNON3aEgQma6FxIW1LTGXT8esglqRQFC07eKrRuoKSwO6ir+6eaqmCEKtsafgYbcu8uqK1HU
 FTBlbUSqaRNdLmv3cBUslHBQmjyU3ZCoBYWEok3LFKKGNfLdS27Yztv91WBwn0lJmiqQBalzAb1yc
 mBofK+pHK5bivFfTAaFLAE8ZcxgPWo6VBM2NN6WYN55jWwFSdhOQweTGdMwnJz33xfJBolc+Nw7pT
 k9tkO13g==;
Received: from authenticated user by stravinsky.debian.org with esmtpsa
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.94.2) (envelope-from &lt;ntyni@debian.org&gt;) id 1usJOp-00GmJ1-Jy
 for submit@bugs.debian.org; Sat, 30 Aug 2025 11:05:36 +0000
Date: Sat, 30 Aug 2025 14:05:33 +0300
From: Niko Tyni &lt;ntyni@debian.org&gt;
To: submit@bugs.debian.org
Subject: fungw: FTBFS with Perl =?utf-8?B?NS40Mjog?=
 =?utf-8?B?4oCYUGVybEludGVycHJldGVy4oCZIHtha2Eg4oCYc3RydWN0IGludGVycHJl?=
 =?utf-8?B?dGVy4oCZfSBoYXMgbm8gbWVtYmVyIG5hbWVkIOKAmElYcHbigJk=?=
Message-ID: &lt;aLLa_VU_tYTs0Z3j@birgitta.local.invalid&gt;
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=&quot;ScNcjbkiW32t+QA6&quot;
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-Debian-User: ntyni
Delivered-To: submit@bugs.debian.org


--ScNcjbkiW32t+QA6
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Source: fungw
Version: 1.2.1-3.1
Severity: important
Tags: ftbfs forky sid upstream
User: debian-perl@lists.debian.org
Usertags: perl-5.42-transition

This package fails to build with Perl 5.42 (currently in experimental.)

  cd perl &amp;&amp; make all
  make[3]: Entering directory '/build/fungw-BK8n9O/fungw-1.2.1/libfungwbind/perl'
  cc -c -Wall -g -I../../ -I../../src_3rd -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/fungw-BK8n9O/fungw-1.2.1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/x86_64-linux-gnu/perl/5.42/CORE -o fungw_perl.o fungw_perl.c
  fungw_perl.c: In function ‘fgws_perl_call_fgw’:
  fungw_perl.c:96:48: error: ‘PerlInterpreter’ {aka ‘struct interpreter’} has no member named ‘IXpv’
     96 |         perl_ctx_t *ctx = (perl_ctx_t *)my_perl-&gt;perl_user_data;
        |                                                ^~
  fungw_perl.c: In function ‘fgws_perl_func_reg’:
  fungw_perl.c:240:48: error: ‘PerlInterpreter’ {aka ‘struct interpreter’} has no member named ‘IXpv’
    240 |         perl_ctx_t *ctx = (perl_ctx_t *)my_perl-&gt;perl_user_data;
        |                                                ^~
  fungw_perl.c: In function ‘fgws_perl_init’:
  fungw_perl.c:286:20: error: ‘PerlInterpreter’ {aka ‘struct interpreter’} has no member named ‘IXpv’
    286 |         ctx-&gt;interp-&gt;perl_user_data = (void *)ctx;
        |                    ^~
  make[3]: *** [Makefile:36: fungw_perl.o] Error 1

This seems to be fallout from

  https://github.com/Perl/perl5/commit/079a9d4ad36ef1a5b3d792b63137d406168df0e9

which indicates that the Xpv member was long obsolete and has now been removed.

I see that fungw upstream SVN has recently added a configuration probe
for the Xpv member and is now disabling the Perl parts altogether if
that probe fails.

While that would be a rather sad outcome, it's certainly one solution. I'm
attaching those upstream changes as adapted to the current fungw Debian
source package. They make the build work again for me, but further
packaging changes (presumably removing the libfungw-perl1 package)
would also be needed for this approach.

The fungw code doesn't really seem to care much about which interpreter
struct member it uses, it just needs a slot for user data. I wonder if
modglobal hash would do:

  PL_modglobal is a general purpose, interpreter global HV for use by
  extensions that need to keep information on a per-interpreter basis.
  In a pinch, it can also be used as a symbol table for extensions to
  share data among each other.  It is a good idea to use keys prefixed
  by the package name of the extension that owns the data.

I'm not an expert in this area though, and I don't plan to drive such a
change myself. I assume the Perl upstream developers would be happy to
give further advice, perhaps on the perl5-porters list.

If you want to test changes against Perl 5.42 in experimental and run
into uninstallability problems, there is a test repository of rebuilt
Debian sid packages for amd64 available at &lt;https://perl.debian.net/&gt;.

Thanks for your work on Debian,
-- 
Niko Tyni   ntyni@debian.org

--ScNcjbkiW32t+QA6
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename=&quot;0001-Add-optional-detector-for-perl-perl_with_IXpv-accept.patch&quot;

&gt;From e6b6dbd3e37fd16aa06ea7dcf5833b0412960ed6 Mon Sep 17 00:00:00 2001
From: igor2 &lt;igor2@997a6158-8d80-4c00-925a-7ca3944c4d11&gt;
Date: Sat, 7 Dec 2024 12:31:02 +0000
Subject: [PATCH 1/2] -Add: optional detector for perl: perl_with_IXpv -
 accepts perl only if IXpv is available

git-svn-id: svn://repo.hu/scconfig/trunk/src@1857 997a6158-8d80-4c00-925a-7ca3944c4d11
---
 scconfig/src/scripts/find_perl.c   | 21 +++++++++++++++++++--
 scconfig/src/scripts/find_python.c |  6 +++---
 scconfig/src/scripts/scripts.c     |  1 +
 scconfig/src/scripts/scripts.h     |  1 +
 4 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/scconfig/src/scripts/find_perl.c b/scconfig/src/scripts/find_perl.c
index 87d4a32..6fcf1fb 100644
--- a/scconfig/src/scripts/find_perl.c
+++ b/scconfig/src/scripts/find_perl.c
@@ -22,11 +22,12 @@
 
 #include &quot;scripts.h&quot;
 
-int find_script_perl(const char *name, int logdepth, int fatal)
+static int find_script_perl_(const char *name, int logdepth, int fatal, char *extra)
 {
 	char *cflags, *ldflags, *s;
 	int res;
-	char *test_c =
+	char test_c[256];
+	char *test_c_in =
 		NL &quot;#include &lt;stdio.h&gt;&quot;
 		NL &quot;#include &lt;EXTERN.h&gt;&quot;
 		NL &quot;#include &lt;perl.h&gt;&quot;
@@ -34,11 +35,14 @@ int find_script_perl(const char *name, int logdepth, int fatal)
 		NL &quot;	PerlInterpreter *interp;&quot;
 		NL
 		NL &quot;	interp = perl_alloc();&quot;
+		NL &quot;%s&quot;
 		NL &quot;	puts(\&quot;OK\&quot;);&quot;
 		NL &quot;	return 0;&quot;
 		NL &quot;}&quot;
 		NL;
 
+	sprintf(test_c, test_c_in, extra);
+
 	require(&quot;sys/class&quot;, logdepth, fatal);
 	require(&quot;cc/cc&quot;, logdepth, fatal);
 	require(&quot;/internal/filelist/method&quot;, logdepth, fatal);
@@ -83,3 +87,16 @@ int find_script_perl(const char *name, int logdepth, int fatal)
 
 	return try_fail(logdepth, &quot;libs/script/perl&quot;);
 }
+
+int find_script_perl(const char *name, int logdepth, int fatal)
+{
+	return find_script_perl_(name, logdepth, fatal, &quot;&quot;);
+}
+
+int find_script_perl_with_IXpv(const char *name, int logdepth, int fatal)
+{
+	int res = find_script_perl_(name, logdepth, fatal, &quot;(void)interp-&gt;IXpv;&quot;);
+	put(&quot;libs/script/perl_with_IXpv&quot;, &quot;tried&quot;);
+	return res;
+}
+
diff --git a/scconfig/src/scripts/find_python.c b/scconfig/src/scripts/find_python.c
index efde6a8..a3d8862 100644
--- a/scconfig/src/scripts/find_python.c
+++ b/scconfig/src/scripts/find_python.c
@@ -43,13 +43,13 @@ static int find_script_python_(const char *name, int logdepth, int fatal, int ve
 
 	char *inc_py =
 		NL &quot;import distutils.sysconfig;&quot;
-		NL &quot;print '-I' + distutils.sysconfig.get_python_inc().replace('\\\\','/')&quot;
+		NL &quot;print ('-I' + distutils.sysconfig.get_python_inc().replace('\\\\','/'))&quot;
 		NL;
 	char *lib_py =
 		NL &quot;import distutils.sysconfig;&quot;
-		NL &quot;print '-L' + distutils.sysconfig.PREFIX.replace('\\\\','/') + '/libs',;&quot;
+		NL &quot;print ('-L' + distutils.sysconfig.PREFIX.replace('\\\\','/') + '/libs')&quot;
 		NL &quot;import sys;&quot;
-		NL &quot;print '-lpython' + str(sys.version_info[0]) + str(sys.version_info[1])&quot;
+		NL &quot;print ('-lpython' + str(sys.version_info[0]) + str(sys.version_info[1]))&quot;
 		NL;
 
 
diff --git a/scconfig/src/scripts/scripts.c b/scconfig/src/scripts/scripts.c
index 8f5035e..2d7123f 100644
--- a/scconfig/src/scripts/scripts.c
+++ b/scconfig/src/scripts/scripts.c
@@ -34,6 +34,7 @@ void deps_scripts_init()
 	dep_add(&quot;libs/script/python/*&quot;,         find_script_python);
 	dep_add(&quot;libs/script/python3/*&quot;,        find_script_python3);
 	dep_add(&quot;libs/script/perl/*&quot;,           find_script_perl);
+	dep_add(&quot;libs/script/perl_with_IXpv&quot;,   find_script_perl_with_IXpv);
 	dep_add(&quot;libs/script/mawk/*&quot;,           find_script_mawk);
 	dep_add(&quot;libs/script/lua/*&quot;,            find_script_lua);
 	dep_add(&quot;libs/script/guile/*&quot;,          find_script_guile);
diff --git a/scconfig/src/scripts/scripts.h b/scconfig/src/scripts/scripts.h
index 95a3799..e18f80c 100644
--- a/scconfig/src/scripts/scripts.h
+++ b/scconfig/src/scripts/scripts.h
@@ -18,6 +18,7 @@ int find_script_mruby(const char *name, int logdepth, int fatal);
 int find_script_python(const char *name, int logdepth, int fatal);
 int find_script_python3(const char *name, int logdepth, int fatal);
 int find_script_perl(const char *name, int logdepth, int fatal);
+int find_script_perl_with_IXpv(const char *name, int logdepth, int fatal);
 int find_script_mawk(const char *name, int logdepth, int fatal);
 int find_script_lua(const char *name, int logdepth, int fatal);
 int find_script_guile(const char *name, int logdepth, int fatal);
-- 
2.49.0


--ScNcjbkiW32t+QA6
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename=&quot;0002-Fix-scconfig-accepts-perl-only-if-IXpv-is-available-.patch&quot;

&gt;From 0baa0f809a074f913c8f5537eb4e0852f2c59b5b Mon Sep 17 00:00:00 2001
From: igor2 &lt;igor2@9df29d54-5764-4f4b-9cf6-31b2c6738818&gt;
Date: Sat, 7 Dec 2024 12:32:43 +0000
Subject: [PATCH 2/2] -Fix: scconfig accepts perl only if IXpv is available in
 the interpreter struct

git-svn-id: svn://svn.repo.hu/fungw/trunk@823 9df29d54-5764-4f4b-9cf6-31b2c6738818
---
 libfungwbind/scconfig_hooks.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libfungwbind/scconfig_hooks.h b/libfungwbind/scconfig_hooks.h
index 5aa18db..61ffeb5 100644
--- a/libfungwbind/scconfig_hooks.h
+++ b/libfungwbind/scconfig_hooks.h
@@ -55,7 +55,7 @@ static int fungwbind_hook_detect_target(void)
 	if (require(&quot;libs/script/python3/*&quot;, 0, 0) == 0)
 		static_disable_python = 2;
 	require(&quot;libs/script/mruby/*&quot;, 0, 0);
-	require(&quot;libs/script/perl/*&quot;, 0, 0);
+	require(&quot;libs/script/perl_with_IXpv&quot;, 0, 0);
 	require(&quot;libs/script/duktape/*&quot;, 0, 0);
 	require(&quot;libs/script/estutter/*&quot;, 0, 0);
 	require(&quot;libs/script/funlisp/*&quot;, 0, 0);
-- 
2.49.0


--ScNcjbkiW32t+QA6--
]