Flymake CFGERR问题

发布于 2024-10-01 20:33:40 字数 1561 浏览 4 评论 0原文

我尝试在 openSuse 11 上的 emacs 22.3.1 上使用 Flymake,但出现此错误:

Making completion list...
file /home/ruggero/makefily/prova.cpp, init=flymake-simple-make-init
flymake is running: nil
file /home/ruggero/makefily/prova.cpp, init=flymake-simple-make-init [3 times]
found buildfile at ~/makefily/
create-temp-inplace: file=/home/ruggero/makefily/prova.cpp temp=/home/ruggero/makefily/prova_flymake.cpp
saved buffer prova.cpp in file /home/ruggero/makefily/prova_flymake.cpp
started process 8920, command=(make -s -C ./ CHK_SOURCES=prova_flymake.cpp SYNTAX_CHECK_MODE=1 check-syntax), dir=~/makefily/
received 117 byte(s) of output from process 8920
file /home/ruggero/makefily/prova.cpp, init=flymake-simple-make-init
parsed '[1;31mprova_flymake.cpp:[0m[1;31m1:[0m[1;31m1: error: unterminated comment[0m', no line-err-info
parsed 'make: *** [check-syntax] Error 1', no line-err-info
file /home/ruggero/makefily/prova.cpp, init=flymake-simple-make-init
process 8920 exited with code 2
cleaning up using flymake-simple-cleanup
deleted file /home/ruggero/makefily/prova_flymake.cpp
prova.cpp: 0 error(s), 0 warning(s) in 0.10 second(s)
switched OFF Flymake mode for buffer prova.cpp due to fatal status CFGERR, warning Configuration error has occured while running (make -s -C ./ CHK_SOURCES=prova_flymake.cpp SYNTAX_CHECK_MODE=1 check-syntax)

仅当 C++ 代码中存在语法错误时,才会出现该错误,

我的 makefile 似乎没问题:

check-syntax:
    g++ -o nul -S $(CHK_SOURCES)

prova:
    g++ -o prova prova.cpp

我也尝试清理我的 .emacs

I'm trying to use flymake on emacs 22.3.1 on openSuse 11 but I got this error:

Making completion list...
file /home/ruggero/makefily/prova.cpp, init=flymake-simple-make-init
flymake is running: nil
file /home/ruggero/makefily/prova.cpp, init=flymake-simple-make-init [3 times]
found buildfile at ~/makefily/
create-temp-inplace: file=/home/ruggero/makefily/prova.cpp temp=/home/ruggero/makefily/prova_flymake.cpp
saved buffer prova.cpp in file /home/ruggero/makefily/prova_flymake.cpp
started process 8920, command=(make -s -C ./ CHK_SOURCES=prova_flymake.cpp SYNTAX_CHECK_MODE=1 check-syntax), dir=~/makefily/
received 117 byte(s) of output from process 8920
file /home/ruggero/makefily/prova.cpp, init=flymake-simple-make-init
parsed '[1;31mprova_flymake.cpp:[0m[1;31m1:[0m[1;31m1: error: unterminated comment[0m', no line-err-info
parsed 'make: *** [check-syntax] Error 1', no line-err-info
file /home/ruggero/makefily/prova.cpp, init=flymake-simple-make-init
process 8920 exited with code 2
cleaning up using flymake-simple-cleanup
deleted file /home/ruggero/makefily/prova_flymake.cpp
prova.cpp: 0 error(s), 0 warning(s) in 0.10 second(s)
switched OFF Flymake mode for buffer prova.cpp due to fatal status CFGERR, warning Configuration error has occured while running (make -s -C ./ CHK_SOURCES=prova_flymake.cpp SYNTAX_CHECK_MODE=1 check-syntax)

the error appear only if there is a syntax error into a c++ code

my makefile seems ok:

check-syntax:
    g++ -o nul -S $(CHK_SOURCES)

prova:
    g++ -o prova prova.cpp

I've also tried to clean my .emacs

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

虐人心 2024-10-08 20:33:40

解决

makefly与color-gcc不兼容的

解决方案

check-syntax:
    /usr/bin/g++ -o nul -S $(CHK_SOURCES)

prova:
    g++ -o prova prova.cpp

Solved

makefly is incompatible with color-gcc

Solution

check-syntax:
    /usr/bin/g++ -o nul -S $(CHK_SOURCES)

prova:
    g++ -o prova prova.cpp
强者自强 2024-10-08 20:33:40

我认为你的make在flymake中运行不正常。

该进程以错误代码 2 退出,我认为这与在 emacs 之外运行 make 时获得的退出状态不同。

Flymake 中的 CFGERR 表示 make 过程未成功运行。并不是存在编译错误,而是进程未启动、意外退出或未正常完成。

也许您可以打开flymake-log-level来获得此失败过程的更多诊断信息。另外:我不知道c++的flymake,但可能有一个缓冲区可以捕获进程的所有输出。如果是这样,请检查缓冲区的内容,这可能会向您显示有关故障的更多详细信息。

例如,当 make 工具不在 emacs 进程中处于活动状态的路径上时,我遇到了 CFGERR 问题。修复路径(或在编译命令中完全指定它)避免了 CFGERR 陷阱。如果您的 gcc 不在 emacs 中使用的路径上,则可能会出现类似的错误。

祝你好运。

I think your make is not running properly within flymake.

The process exits with errorcode 2, which I think is not the same as the exit status you get when you run make outside of emacs.

CFGERR in flymake means the make process did not run successfully. Not that there was a compile error, but that the process did not launch, or exited unexpectedly, or otherwise did not complete normally.

maybe you can turn up flymake-log-level to get more diagnostics for this failing process. Also: I don't know about flymake for c++, but there may be a buffer that captures all the output of the process. If so, check to see the contents of the buffer, which may show you more detail regarding the failure.

I had a CFGERR problem, for example, when the make tool was not on the path that was active within the emacs process. Fixing the path (or fully-specifying it on the compile command) avoided the CFGERR pitfall. A similar error might occur if your gcc is not on the path that is used within emacs.

Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文