GNU bug report logs - #51254
sysdep.c:1821:22: error: variably modified ‘sigsegv_stack’ at file scope

Previous Next

Package: emacs;

Reported by: Håkon Hægland <hakon.hagland <at> gmail.com>

Date: Sun, 17 Oct 2021 20:50:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Håkon Hægland <hakon.hagland <at> gmail.com>
Cc: 51254 <at> debbugs.gnu.org
Subject: bug#51254: sysdep.c:1821:22: error: variably modified ‘sigsegv_stack’ at file scope
Date: Mon, 18 Oct 2021 05:28:16 +0300
> From: Håkon Hægland
>  <hakon.hagland <at> gmail.com>
> Date: Sun, 17 Oct 2021 22:49:08 +0200
> 
> I am trying to install emacs 27.2 from source on Ubuntu 21.10:
> 
> $ gcc --version
> gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0
> [...]
>   CC       sysdep.o
> sysdep.c:1821:22: error: variably modified ‘sigsegv_stack’ at file scope
>  1821 | static unsigned char sigsegv_stack[SIGSTKSZ];
>       |                      ^~~~~~~~~~~~~
> make[1]: *** [Makefile:406: sysdep.o] Error 1
> make[1]: Leaving directory '/home/hakon/test/install_emacs/emacs-27.2/src'
> make: *** [Makefile:424: src] Error 2

This is due to a change in your system headers.

There won't be any Emacs 27 releases, and the problem is fixed in the
current development sources, which will become Emacs 28.1.  So my
suggestion is to use the code we have there now:

  /* Storage for the alternate signal stack.
     64 KiB is not too large for Emacs, and is large enough
     for all known platforms.  Smaller sizes may run into trouble.
     For example, libsigsegv 2.6 through 2.8 have a bug where some
     architectures use more than the Linux default of an 8 KiB alternate
     stack when deciding if a fault was caused by stack overflow.  */
  static max_align_t sigsegv_stack[(64 * 1024
				    + sizeof (max_align_t) - 1)
				   / sizeof (max_align_t)];




This bug report was last modified 3 years and 215 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.