Ruggero Turra
Ruggero Turra

Reputation: 17680

flymake CFGERR problem

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

Upvotes: 1

Views: 907

Answers (2)

Ruggero Turra
Ruggero Turra

Reputation: 17680

Solved

makefly is incompatible with color-gcc

Solution

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

prova:
    g++ -o prova prova.cpp

Upvotes: 1

Cheeso
Cheeso

Reputation: 192487

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.

Upvotes: 0

Related Questions