docker-emacs
docker-emacs copied to clipboard
Any plans to include native compilation
It was merged to dev-master this weekend.
master
should be up to date. master-alpine
is not as it is currently broken.
Reopen if you experience something different.
Hi,
normally to get native compilation on the master of emacs you need to configure it --with-native-compilation
.
I hacked something that works for me here but maybe I'm completely wrong and it is already supported.
Just pulled silex/emacs:master-dev
and when I eval (native-comp-available-p)
I get t
on a container running an image built from my fork, and I get nil
when running the image I just pulled from your docker hub.
Oh, I totally missunderstood what you meant.
In theory, yes I'm not opposed to that, in practice given my goal is to implement my images using @purcell nix packages I guess we'd bring him here.
@purcell: what's your take on adding build flags like --with-modules
or --with-native-compilation
?
I'll probably enable native compilation on my HEAD builds in due course. I think modules are enabled by default?
I'm a little bit curious about what the perceived benefits would be of enabling native compilation by default in an emacs used for CI testing. From my perspective it complicates the build somewhat, would not yield much speed difference overall when testing across serveral emacsen, and if the behaviour of tested code is different between native/non-native compiled code, then that's an Emacs bug, not a bug in the tested code.
I'm a little bit curious about what the perceived benefits would be of enabling native compilation by default in an emacs used for CI testing.
Probably not much. I use the docker image to run the emacs I use to work and it only became usable in terms of speed after caching the pre-compiled files (eln-cache
) folder between runs.
if the behaviour of tested code is different between native/non-native compiled code, then that's an Emacs bug, not a bug in the tested code.
isn't that expected when testing against the master-dev instead of a stable release?
I use the docker image to run the emacs I use to work and it only became usable in terms of speed after caching the pre-compiled files (
eln-cache
) folder between runs.
Ah, I can see why that would be useful. You might also want window system support then, no?
isn't that expected when testing against the master-dev instead of a stable release?
Oh, I mean if you've got two dev snapshot builds of Emacs - with and without nativecomp - then if they differ in behaviour with any given third-party code, it's an Emacs bug.
Ah, I can see why that would be useful. You might also want window system support then, no?
Do you mean something like X11? it works already.
@maurelio1234: do you use X support in my images? how bad would it be if it wasn't present anymore?
Hi @Silex I wouldn't be able to use them, just like most emacs docker images out there.
But I can keep using my fork anyway, I know my use case (emacs on a docker image for humans :smile: ) is not very common.
@maurelio1234: thanks for the feedback.
At the beginning of docker I wanted to dockerize my whole dev environment, that's how this project started. But then realistically it's too much work so I gave up and actually never use my images except for testing.
So I don't really need X anymore, and purcell does not support it at the moment. The simple thing to do is to simply drop X support for now and then reintroduce it once https://github.com/purcell/nix-emacs-ci/issues/19 moves forward.
FWIW I use the X support, and I use the Docker images for personal use primarily and sometimes for testing. So the native compilation would be nice for all my Emacs usage, but losing X would hurt.
@tzz: I managed to keep X support, but it's probably a bit more limited than before please report (e.g no GTK).
@maurelio1234: I should be able to start experimenting with adding --with-native-compilation
. It's only available on master right?
Yes, AFAIK it's only on master right now (no releases, no widely used working branches)
@maurelio1234:
checking for gcc_jit_context_acquire in -lgccjit... yes
checking for libgccjit.h... yes
configure: error: Installed libgccjit has failed passing the smoke test.
You can verify it yourself compiling:
<https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.
Please report the issue to your distribution if libgccjit was installed through
that.
Here instructions on how to compile and install libgccjit from source:
<https://gcc.gnu.org/wiki/JIT>.
When trying to build master. I don't have time to debug this. If you want to have a go, try to build this:
FROM silex/nix
RUN nix-env -iA emacs-snapshot -f https://github.com/silex/nix-emacs-ci/archive/native-compilation.tar.gz
Closing due to inactivity, if you want to see it happening check with nix-emacs-ci
.