--- Begin Message ---
Subject: |
libgccjit is unusable |
Date: |
Thu, 26 May 2022 15:07:06 +0200 |
User-agent: |
Evolution 3.42.1 |
Hi Guix,
with the release of Emacs 28.1, there has been some demand to enable
native-compilation. While trying to set that up, I've come to realize
that no matter how I slice it, I can't make libgccjit usable.
My test:
$ cd /tmp
$ # fetch the "Hello World" [1] and insert it into gccjit-test.c
$ guix shell --pure gcc-toolchain@9 libgccjit@9 -- \
gcc gccjit-test.c -o gccjit-test -lgccjit
$ ./gccjit-test
x86_64-unknown-linux-gnu-gcc-9.4.0: fatal error: cannot execute 'as':
execvp: No such file or directory
compilation terminated.
Welp, okay, so maybe testing gccjit outside of its installation does
not work. What if we try it inside the shell (we can always propagate
libgccjit, no?)
guix shell gcc-toolchain@9 libgccjit@9 -- ./gccjit-test
ld: cannot find crtbeginS.o: Datei oder Verzeichnis nicht gefunden
ld: cannot find -lgcc
ld: cannot find -lgcc
collect2: Fehler: ld gab 1 als Ende-Status zurück
libgccjit.so: error: error invoking gcc driver
NULL result
For the record, Emacs 28 fails with a different error during
configuration, though interestingly they use a smaller program and
appear to omit -lgccjit.
./conftest: error while loading shared libraries: libgccjit.so.0:
cannot open shared object file: No such file or directory
I'm at a loss. Is there any way to make libgccjit actually usable?
[1] https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html
--- End Message ---
--- Begin Message ---
Subject: |
[PATCH 0/6] Add native compilation to Emacs |
Date: |
Tue, 9 Aug 2022 20:37:43 +0200 |
Hi Guix,
at long last the following patch set should enable native compilation
for both Emacs and emacs-build-system. I tested emacs-dash and at the
very least native code is generated, though I haven't yet checked
whether it is also loaded.
As with any shiny new Emacs feature, please verify that the Emacs
portion of your manifests/home configurations build and report any
related errors *before* I push this and curse your configuration.
Cheers
Liliana Marie Prikler (6):
gnu: Parameterize libgccjit.
gnu: libgccjit: Build with bootstrapped gcc.
gnu: libgccjit: Build multiple versions.
gnu: emacs: Build with native compilation.
guix: emacs-utils: Add emacs-compile-directory.
build-system: emacs: Use native compilation.
gnu/packages/emacs.scm | 64 ++++++++++++++++++++++++++++++-
gnu/packages/gcc.scm | 53 +++++++++++++++++--------
guix/build/emacs-build-system.scm | 5 ++-
guix/build/emacs-utils.scm | 26 +++++++++++++
4 files changed, 128 insertions(+), 20 deletions(-)
--
2.37.0
--- End Message ---