如何在 Docker Hub 中从源代码构建 Emacs?BSS 和堆之间的差距

fom*_*mil 5 emacs docker dockerhub

直到最近,我才能够使用这个 recipe从 docker 容器中的源代码构建 emacs 。然而,截至上周,我所有的构建都失败了

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.
Run Code Online (Sandbox Code Playgroud)

我已经阅读了etc/PROBLEMS并且它对我没有任何意义。有谁知道如何为 docker 容器解释这个,以及我可以做些什么来重新构建 emacs hub.docker.com

我试过了

cat 0 > /proc/sys/kernel/exec-shield
Run Code Online (Sandbox Code Playgroud)

但我不认为这真的是问题所在,它不存在于容器中。

Sil*_*lex 5

由于您交叉发布,我交叉回答 :P 恕我直言,交叉发布很糟糕,您应该删除其中一个问题。


这里也回答了这个问题(因为你已经找到了我的 github 错误报告):

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

目前,在 emacs 构建系统更改之前可能会这样,唯一有效的解决方案是:

  • 不要使用 Dockerfile 构建并在运行的容器中构建,该容器具有允许个性系统调用的 seccomp 配置文件。例如:

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

  • 在构建之前禁用 /proc/sys/kernel/randomize_va_space:

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

我在https://hub.docker.com/r/silex/emacs维护 docker 图像