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.

2 Answers 2


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


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

  • Are you sure we need a build system change? I thought the current build system already handled it.
    – Clément
    Sep 6, 2016 at 14:17
  • 1
    Emacs 27 will not need this anymore because of the pdumper work that was done.
    – Silex
    Feb 11, 2020 at 12:07

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

  • 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 6, 2016 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.