6

Until very recently, I've been able to build emacs from source in a docker container using this recipe. However as of last week, all my builds have been failing with

Warning: Your system has a gap between BSS and the
heap (32188607 bytes).  This usually means that exec-shield
or something similar is in effect.  The dump may
fail because of this.  See the section about
exec-shield in etc/PROBLEMS for more information.

I've read the etc/PROBLEMS and it doesn't make any sense to me. Does anybody know how to interpret this for a docker container and what I can do to get emacs building again on hub.docker.com?

I've tried

cat 0 > /proc/sys/kernel/exec-shield

but I don't think that is really the problem, it doesn't exist in the container.

fommil
  • 1,750
  • 11
  • 24

2 Answers2

6

This question is also being answered here (since you already found my github bug report):

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23529

For the moment, and likely it will be this way until the emacs build system changes, the only valid solutions are:

  • Don't build with a Dockerfile and build in a running container that has a seccomp profile that allows the personality syscall. For example:

    docker run --rm -it --security-opt seccomp=unconfined emacs-builder-image

  • Disable /proc/sys/kernel/randomize_va_space before building:

    echo 0 > /proc/sys/kernel/randomize_va_space; docker build .

I maintain docker images at https://hub.docker.com/r/silex/emacs

Silex
  • 801
  • 6
  • 6
1

You can disable dumping with env CANNOT_DUMP=yes ./configure. Does this not work on Docker?

Clément
  • 3,924
  • 1
  • 22
  • 37
  • It "works" but then you can only run emacs in batch mode, which is not very useful... might be sufficient for specific cases tho. – Silex Sep 06 '16 at 15:02