Subject: Re: [bug#72885] [PATCH v2] gnu: screen: Update to 5.0.0

From: Ludovic Courtès <[email-masked]>
Date: Tue, 03 Sep 2024 13:48:43 +0200

Hello,

Andy Tai <[email-masked]> skribis:

> * gnu/packages/patches/screen-hurd-path-max.patch: Update for screen 5.0.0.
> * gnu/packages/screen.scm (screen): Update to 5.0.0.
> [arguments]<#:configure-flags: Add "CFLAGS=-D_GNU_SOURCE=1".
> [inputs]: Add linux-pam.
>
> Change-Id: Iebc5eff0128ff7f4d27a22cca1bd4a025aca3244

[...]

> -+ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd

Did you confirm that it still builds for GNU/Hurd?

You can test by cross-compiling with ‘--target=i586-pc-gnu’ or by
compiling natively, if you have configured the ‘hurd-vm’ service, with
‘--system=i586-gnu’.

>      (arguments
>       `(#:configure-flags
> +         ;; GNU_SOURCE must be defined for mallocmock_reset() to be defined
> +         '("CFLAGS=-D_GNU_SOURCE=1"

This very likely removes the default flags, “-O2 -g”, which is something
we should not do (we’d get an unoptimized build and ‘--with-debug-info’
wouldn’t have the intended effect).  I think you need to have:

  "CFLAGS=-O2 -g -D_GNU_SOURCE=1"

instead.  Please check the build log to make sure it has the intended
effect.

Could you send an updated patch?

Thanks,
Ludo’.