Subject: bug#75907: 30.0.93; Need bigger BASE_PURESIZE when building with PGTK variant

From: Xiyue Deng <[email-masked]>
Date: Wed, 29 Jan 2025 21:46:47 -0800

Xiyue Deng <[email-masked]> writes:

> Eli Zaretskii <[email-masked]> writes:
>
>>> From: Stefan Kangas <[email-masked]>
>>> Date: Wed, 29 Jan 2025 11:49:53 -0600
>>> Cc: [email-masked]
>>> 
>>> Eli Zaretskii <[email-masked]> writes:
>>> 
>>> > Stefan, do you think we should enlarge the number to 3400000 for Emacs
>>> > 30.1?
>>> 
>>> I thought this was affecting master and not emacs-30?
>>> 
>>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74744#5
>>> 
>>> If it affects emacs-30 also, I have no objections to increasing the
>>> value, but please, if possible, do it sooner rather than later.
>>
>> Sorry, maybe I was confused.  I looked at the Subject, which says
>> 30.0.93.
>>
>> Xiyue Deng, in which version of Emacs did that happen to you?
>
> This happens to me on 30.0.93 as well as a later commit (a9cde24) in the
> origin/emacs-30 branch when compiled with GCC 14.2.0 on Debian.  So IMHO
> applying the fix also to the origin/emacs-30 branch would be great.
>
> -- 
> Regards,
> Xiyue Deng

Also see the updated patch attached.

-- 
Regards,
Xiyue Deng
From 615a38ff2d749a4a3331ebf1a906becaee4c8e82 Mon Sep 17 00:00:00 2001
From: Xiyue Deng <[email-masked]>
Date: Mon, 27 Jan 2025 23:36:55 -0800
Subject: [PATCH] Increase BASE_PURESIZE start size to 3400000

Or it will FTBFS with GCC 14.2 under a Debian sbuild environment,
e.g. sbuild unshare, sbuild qemu, etc.  It was tested that it fails with
start size of 3300000 or smaller and works starting with 3400000.

Note that a Debian bookworm sbuild unshare environment with GCC 12.2
seems to build fine.

Related report and suggestion:
https://lists.nongnu.org/archive/html/bug-gnu-emacs/2024-12/msg00481.html
---
 src/puresize.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/puresize.h b/src/puresize.h
index e9cbdd86022..f2576666a66 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -47,7 +47,7 @@ #define SITELOAD_PURESIZE_EXTRA 0
 #endif
 
 #ifndef BASE_PURESIZE
-#define BASE_PURESIZE (3000000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
+#define BASE_PURESIZE (3400000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
 #endif
 
 /* Increase BASE_PURESIZE by a ratio depending on the machine's word size.  */
-- 
2.45.2