Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to build Emacs from source in Docker Hub? gap between BSS and heap

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 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.

  • cross-posted to https://emacs.stackexchange.com/questions/22665
  • upstream bug report https://github.com/docker/docker/issues/22801
like image 920
fommil Avatar asked May 31 '16 11:05

fommil


1 Answers

Since you crosspost, I crossanswer :P IMHO crossposting is bad and you should delete one of the questions.


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

like image 136
Silex Avatar answered Nov 17 '22 05:11

Silex