英文:
Warnings in Emacs: Internal native compiler error failed to compile
问题
我是Emacs的初学者。在安装SLIME环境后,每次打开Emacs时,我都收到以下警告:
警告(comp):c:/Program Files/Emacs/emacs-28.2/share/emacs/28.2/lisp/emacs-lisp/pp.el: 错误:内部本机编译器错误,无法编译 禁用显示 禁用日志记录
警告(comp):c:/Program Files/Emacs/emacs-28.2/share/emacs/28.2/lisp/progmodes/project.el: 错误:内部本机编译器错误,无法编译 禁用显示 禁用日志记录
警告(comp):c:/Program Files/Emacs/emacs-28.2/share/emacs/28.2/lisp/progmodes/gud.el: 错误:内部本机编译器错误,无法编译 禁用显示 禁用日志记录
它们是否关键,以及我应该如何处理它们?
我在互联网上搜索了与这些警告相关的信息,但未能获得有用的信息。此外,在Emacs中测试基本的Lisp编程时,我并没有遇到任何关键错误。
英文:
I am a beginner in Emacs. After installing the SLIME environment, I keep receiving the following warnings when I open Emacs:
Warning (comp): c:/Program Files/Emacs/emacs-28.2/share/emacs/28.2/lisp/emacs-lisp/pp.el: Error: Internal native compiler error failed to compile Disable showing Disable logging
Warning (comp): c:/Program Files/Emacs/emacs-28.2/share/emacs/28.2/lisp/progmodes/project.el: Error: Internal native compiler error failed to compile Disable showing Disable logging
Warning (comp): c:/Program Files/Emacs/emacs-28.2/share/emacs/28.2/lisp/progmodes/gud.el: Error: Internal native compiler error failed to compile Disable showing Disable logging
Are they crucial and how should I deal with them?
I searched the internet regaring the warnings but I failed to get useful information. Moreover, I do not experience any crucial errors when I test basic Lisp programming in Emacs though.
答案1
得分: 3
以下是翻译好的部分:
我在打开Emacs时一直收到以下警告。它们是否关键...?
它们在某种意义上不是关键的,因为这些错误不会阻止Emacs
工作,你自己已经确认过了。但如果你不喜欢错误消息,而且喜欢(明显)更快速的Emacs
,那么让我们继续
我该如何处理它们?
可能首先阅读一些段落:M-:(info "(elisp) Native Compilation")RET或在在线手册中,以获得关于错误消息是关于什么的整体理解。即:
除了前一章中描述的字节编译之外,Emacs还可以选择将Lisp函数定义编译成真正的编译代码,称为“本地代码”。此功能使用“libgccjit”库,该库是GCC分发的一部分,并且要求Emacs构建时支持使用该库。它还要求在您的系统上有GCC和Binutils(汇编器和链接器)可用,以便您能够本地编译Lisp代码。
从这段文字中,我们可以理解到报告的错误意味着Emacs
无法(本地)编译文件。我们的第一步可能是检查Emacs
是否可以使用libgccjit
库。
我猜想以下EmacsSE主题可能为您的情况提供有用的信息:‘Error: junk at end of line’ with native-comp 和 Is there a gccemacs (native-comp) build for MS-Windows?。
如果这不起作用,请提供更多关于您的Emacs
安装/编译方式、有关您的环境的更多详细信息,以及M-:(native-comp-available-p)RET的输出。
而且,如果您喜欢深入研究细节,文章Bringing GNU Emacs to Native Code可能会非常有价值。
英文:
> I keep receving the following warning as I open emacs. Are they crucial ...?
They are not crucial in a sense these errors don't prevent Emacs
from working, which you confirmed yourself. But if you don't like error messages and like (significantly) faster-working Emacs
, then let's move on to
> how should I deal with them?
Probably start with reading a few paragraphs: <kbd>M-:</kbd> (info "(elisp) Native Compilation") <kbd>RET</kbd> or in online manual, to get an overall understanding what the error message is about. Namely:
> In addition to the byte-compilation, described in the previous
> chapter, Emacs can also optionally compile Lisp
> function definitions into a true compiled code, known as “native
> code”. This feature uses the ‘libgccjit’ library, which is part of the
> GCC distribution, and requires that Emacs be built with support for
> using that library. It also requires to have GCC and Binutils (the
> assembler and linker) available on your system for you to be able to
> native-compile Lisp code.
From this text, we can understand that the error reported means Emacs
couldn't (natively) compile the files. And our first look should probably be towards checking if libgccjit
library can be used by Emacs
.
I guess the following EmacsSE threads: ‘Error: junk at end of line’ with native-comp and Is there a gccemacs (native-comp) build for MS-Windows? may provide helpful info for your case.
If that doesn't help, post more info on which way was your Emacs
installed/compiled, more details about your environment, and output of <kbd>M-:</kbd> (native-comp-available-p) <kbd>RET</kbd>.
And, in a case you're a type of person who likes diving into more details, the article Bringing GNU Emacs to Native Code could be invaluable.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论