2006-06-03 13:53:01 +00:00
* Introduction -*-compilation-*- (Copyright information at end of file)
2004-03-11 22:43:24 +00:00
This shows the different kinds of messages compile recognizes by default and
how they are rendered. It is intended both to help you decide which matchers
you need and as a test of the matchers. Move the mouse over a colored part or
use `compilation-message-face', to see how much text was actually matched.
2006-07-08 13:21:42 +00:00
Note that the following example line should NOT be highlighted:
Compilation started at Sat Jul 8 15:19:25
2004-03-11 22:43:24 +00:00
The important part is the symbol(s) line at the beginning of each entry.
These are the symbols you can customize `compilation-error-regexp-alist' for,
to match the messages shown in that entry. A few complex cases have more than
one symbol, which should be selected together.
* Absoft FORTRAN 77 Compiler 3.1.3
symbol: absoft
Error on line 3 of t.f: Execution error unclassifiable statement
Line 45 of "foo.c": bloofle undefined
error on line 19 of fplot.f: spelling error?
warning on line 17 of fplot.f: data type is undefined for variable d
* Ada & Mpatrol (memory leak debugger)
symbol: ada
This matches only the end of line, the beginning is covered by GNU style.
foo.adb:61:11: [...] in call to size declared at foo.ads:11
0x8008621 main+16 at error.c:17
* IBM AIX PS/2 C version 1.1
symbol: aix
****** Error number 140 in line 8 of file errors.c ******
* Ant Java: works at least for jikes and javac
symbol: ant
The regexps found on http://ant.apache.org/faq.html, and since integrated in
both Emacsen, were hairy. Why so many numbers for jikes -- is one a column
number?
[javac] /src/DataBaseTestCase.java:27: unreported exception ...
[javac] /src/DataBaseTestCase.java:49: warning: finally clause cannot complete normally
[jikes] foo.java:3:5:7:9: blah blah
* Bash v2
symbol: bash
a.sh: line 1: ls-l: command not found
* Borland C++, C++Builder
symbol: borland
Error ping.c 15: Unable to open include file 'sys/types.h'
Warning ping.c 68: Call to function 'func' with no prototype
Error E2010 ping.c 15: Unable to open include file 'sys/types.h'
Warning W1022 ping.c 68: Call to function 'func' with no prototype
* Caml & Python
symbol: caml
File "foobar.ml", lines 5-8, characters 20-155: blah blah
File "F:\ocaml\sorting.ml", line 65, characters 2-145:
Warning: this expression should have type unit.
File "/usr/share/gdesklets/display/TargetGauge.py", line 41, in add_children
2004-04-07 12:57:55 +00:00
File \lib\python\Products\PythonScripts\PythonScript.py, line 302, in _exec
File "/tmp/foo.py", line 10
2004-03-11 22:43:24 +00:00
* Apollo cc, 4.3BSD fc & IBM RS6000/AIX xlc compiler & Microtec mcc68k & GNAT (July 94)
symbol: comma
"foo.f", line 3: Error: syntax error near end of statement
"vvouch.c", line 19.5: 1506-046 (S) Syntax error.
"foo.c", line 32 pos 1; (E) syntax error; unexpected symbol: "lossage"
"foo.adb", line 2(11): warning: file name does not match ...
"src/swapping.c", line 30.34: 1506-342 (W) "/*" detected in comment.
2010-07-13 21:33:02 +00:00
* Cucumber
symbol: cucumber
Feature: This is an example for backtrace.
Scenario: undefined step # features/cucumber.feature:3
Given this is undefined # features/cucumber.feature:4
2010-08-15 00:04:53 +00:00
Scenario: assertion false (Test::Unit) # foo/bar.feature:6
Given this will generate 'assert false' # foo/bar.rb:1
2010-07-13 21:33:02 +00:00
<false> is not true. (Test::Unit::AssertionFailedError)
2010-08-15 00:04:53 +00:00
/home/gusev/.rvm/foo/bar.rb:48:in `assert_block'
/home/gusev/.rvm/foo/bar.rb:500:in `_wrap_assertion'
2010-07-13 21:33:02 +00:00
features/cucumber.feature:7:in `Given this will generate 'assert false''
2010-08-15 00:04:53 +00:00
Scenario: assertion false (RSpec) # foo/bar.feature:9
Given this will generate 'should be_true' # foo/bar.rb:5
2010-07-13 21:33:02 +00:00
expected true to be false (Spec::Expectations::ExpectationNotMetError)
2010-08-15 00:04:53 +00:00
./foo/bar/baz.rb:6:in `/^this will generate 'should be_true'$/'
foo/bar.feature:10:in `Given this will generate 'should be_true''
2010-07-13 21:33:02 +00:00
2010-08-15 00:04:53 +00:00
Scenario: backtrace in step definition # foo/bar.feature:12
Given this will generate backtrace # foo/sbar.rb:9
2010-07-13 21:33:02 +00:00
(RuntimeError)
2010-08-15 00:04:53 +00:00
./foo/bar.rb:10:in `/^this will generate backtrace$/'
foo/bar.feature:13:in `Given this will generate backtrace'
2010-07-13 21:33:02 +00:00
Failing Scenarios:
2010-08-15 00:04:53 +00:00
cucumber foo/cucumber.feature:6 # Scenario: assertion false (Test::Unit)
cucumber foo/cucumber.feature:9 # Scenario: assertion false (RSpec)
cucumber foo/cucumber.feature:12 # Scenario: backtrace in step definition
cucumber foo/cucumber.feature:15 # Scenario: deeep backtrace in step definition
2010-07-13 21:33:02 +00:00
5 scenarios (4 failed, 1 undefined)
5 steps (4 failed, 1 undefined)
0m0.007s
2004-03-11 22:43:24 +00:00
2004-05-10 21:09:51 +00:00
* EDG C/C++
symbol: edg-1 edg-2
build/intel/debug/../../../struct.cpp(42): error: identifier "foo" is undefined
build/intel/debug/../../../struct.cpp(44): warning #1011: missing return statement at end of ...
build/intel/debug/../../../iptr.h(302): remark #981: operands are evaluated in unspecified order
detected during ... at line 62 of "build/intel/debug/../../../trace.h"
2004-03-11 22:43:24 +00:00
* EPC F90 compiler
symbol: epc
Error 24 at (2:progran.f90) : syntax error
2004-10-27 09:09:03 +00:00
* Fortran checker
2004-11-22 23:17:26 +00:00
symbols: ftnchek
2004-10-27 09:09:03 +00:00
Dummy arg W in module SUBA line 8 file arrayclash.f is array
L4 used at line 55 file test/assign.f; never set
Warning near line 10 file arrayclash.f: Module contains no executable
Nonportable usage near line 31 col 9 file assign.f: mixed default and explicit
2004-03-11 22:43:24 +00:00
* IAR Systems C Compiler
symbol: iar
"foo.c",3 Error[32]: Error message
"foo.c",3 Warning[32]: Error message
* IBM C/C++ Tools 2.01
symbol: ibm
foo.c(2:0) : informational EDC0804: Function foo is not referenced.
foo.c(3:8) : warning EDC0833: Implicit return statement encountered.
foo.c(5:5) : error EDC0350: Syntax error.
2004-10-27 09:09:03 +00:00
* Ultrix MIPS RISC CC, DEC AXP OSF/1 cc, IRIX 5.2 & NAG Fortran
2004-03-11 22:43:24 +00:00
symbol: irix
ccom: Error: foo.c, line 2: syntax error
2004-04-25 12:57:05 +00:00
cc: Severe: /src/Python-2.3.3/Modules/_curses_panel.c, line 17: Cannot find file <panel.h> ...
2004-04-07 12:57:55 +00:00
cc: Info: foo.c, line 27: ...
2004-03-11 22:43:24 +00:00
cfe: Warning 712: foo.c, line 2: illegal combination of pointer and ...
cfe: Warning 600: xfe.c: 170: Not in a conditional directive while ...
/usr/lib/cmplrs/cc/cfe: Error: foo.c: 1: blah blah
/usr/lib/cmplrs/cc/cfe: warning: foo.c: 1: blah blah
2004-10-27 09:13:50 +00:00
foo bar: baz.f, line 27: ...
2004-03-11 22:43:24 +00:00
* Java Exception & Valgrind (memory debugger for x86 GNU/Linux)
symbol: java
Register 6 contains wrong type
at org.foo.ComponentGateway.doGet(ComponentGateway.java:172)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
==1332== Invalid write of size 1
==1332== at 0x4040743C: System::getErrorString() (../src/Lib/System.cpp:217)
==1332== by 0x8008621: main (vtest.c:180)
* IBM jikes
symbols: jikes-file jikes-line
Jikes separates file names from the actual error messages. For visual
feedback the underline and the word "Error" on the 3rd line is fontified like
a file name would be.
Found 2 semantic errors compiling "../javax/swing/BorderFactory.java":
150. case '{':
<->
*** Error: The type of this expression, "char", is not ...
312. return new CompoundBorder(outside, inside);
<--------------------------------->
*** Error: No match was found for constructor ...
Issued 1 semantic warning compiling "java/awt/Toolkit.java":
504. void imgProduceImage( ImageNativeProducer prod, Ptr imgData);
<----------------->
*** Warning: The type "ImageNativeProducer" is defined ...
* GCC include message
symbol: gcc-include
The last file, i.e. the one you are compiling, is the interesting one.
In file included from /usr/include/c++/3.3/backward/warn.h:4,
2011-01-08 13:31:26 +00:00
from /usr/include/c++/3.3/backward/iostream.h:31:0,
2004-03-11 22:43:24 +00:00
from test_clt.cc:1:
* GNU style
symbol: gnu
foo.c:8: message
../foo.c:8: W: message
/tmp/foo.c:8:warning message
foo/bar.py:8: FutureWarning message
foo.py:8: RuntimeWarning message
foo.c:8:I: message
2009-02-04 13:36:59 +00:00
foo.c:8.23: note: message
2004-03-11 22:43:24 +00:00
foo.c:8.23: info: message
foo.c:8:23:information: message
foo.c:8.23-45: Informational: message
foo.c:8-23: message
foo.c:8-45.3: message
foo.c:8.23-9.1: message
jade:dbcommon.dsl:133:17:E: missing argument for function call
G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
file:G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
2004-06-08 21:38:29 +00:00
{standard input}:27041: Warning: end of file not at end of a line; newline inserted
2004-03-11 22:43:24 +00:00
* Lucid Compiler, lcc 3.x
symbol: lcc
E, file.cc(35,52) Illegal operation on pointers
W, file.cc(36,52) blah blah
* makepp 1.20
symbol: makepp
makepp: Scanning `/foo/bar.c'
makepp: warning: bla bla `/foo/bar.c' and `/foo/bar.h'
makepp: bla bla `/foo/Makeppfile:12' bla
makepp: bla bla `/foo/bar.c' and `/foo/bar.h'
2009-02-19 06:52:35 +00:00
* maven 2.0.9
symbol: maven
FooBar.java:[111,53] no interface expected here
2004-03-11 22:43:24 +00:00
* MIPS lint; looks good for SunPro lint also
symbols: mips-1 mips-2
This can match multiple times on a line.
TrimMask (255) in solomon.c may be indistinguishable from TrimMasks (93) in solomon.c due to truncation
name defined but never used: LinInt in cmap_calc.c(199)
* Microsoft C/C++
symbol: msft
This used to be less selective and allowed characters other than parens around
the line number, but that caused confusion for GNU-style error messages. This
used to reject spaces and dashes in file names, but they are valid now; so I
made it more strict about the error message that follows.
keyboard handler.c(537) : warning C4005: 'min' : macro redefinition
d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if'
2009-11-08 16:30:52 +00:00
d:\tmp\test.c(1145) : see declaration of 'nsRefPtr'
2004-03-11 22:43:24 +00:00
2008-05-05 12:00:41 +00:00
* Open Watcom
symbol: watcom
..\src\ctrl\lister.c(109): Error! E1009: Expecting ';' but found '{'
..\src\ctrl\lister.c(120): Warning! W201: Unreachable code
2004-03-11 22:43:24 +00:00
* Oracle pro*c
symbol: oracle
2004-06-08 21:38:29 +00:00
This stupid precompiler wraps lines at column 80 in the middle of a file name.
There is no obvious way of detecting this or turning it off. But if you
2004-11-22 23:17:26 +00:00
delete the newline (probably needs M-x toggle-read-only), the file name will
automatically be reparsed, so that you can then go there.
2004-06-08 21:38:29 +00:00
2004-03-11 22:43:24 +00:00
Semantic error at line 528, column 5, file erosacqdb.pc:
2004-06-08 21:38:29 +00:00
Error at line 41, column 10 in file /usr/src/sb/ODBI_BHP.hpp
PCC-02150: error at line 49, column 27 in file /usr/src/sb/ODBI_dxfgh.pc
PCC-00003: invalid SQL Identifier at column name in line 12 of file /usr/src/sb/ODBI_BHP.hpp
PCC-00004: mismatched IF/ELSE/ENDIF block at line 27 in file /usr/src/sb/ODBI_BHP.hpp
PCC-02151: line 21 column 40 file /usr/src/sb/ODBI_BHP.hpp:
2004-03-11 22:43:24 +00:00
* Perl
symbol: perl
2009-07-26 15:58:55 +00:00
The second sample, from the Perl-Glib module, is a Glib message put
through Perl warn() to get "at FILENAME line N".
2004-03-11 22:43:24 +00:00
syntax error at automake line 922, near "':'"
Died at test.pl line 27.
store::odrecall('File_A', 'x2') called at store.pm line 90
2008-01-08 07:54:36 +00:00
(in cleanup) something bad at foo.pl line 3 during global destruction.
2004-03-11 22:43:24 +00:00
2009-07-26 15:58:55 +00:00
GLib-GObject-WARNING **: /build/buildd/glib2.0-2.14.5/gobject/gsignal.c:1741: instance `0x8206790' has no handler with id `1234' at t-compilation-perl-gtk.pl line 3.
2004-03-11 22:43:24 +00:00
2008-11-08 16:50:14 +00:00
* PHP
symbol: php
Parse error: parse error, unexpected $ in main.php on line 59
Fatal error: Call to undefined function: mysql_pconnect() in db.inc on line 66
2010-07-13 21:33:02 +00:00
* Ruby
symbol: ruby
plain-exception.rb:7:in `fun': unhandled exception
from plain-exception.rb:3:in `proxy'
from plain-exception.rb:12
* Ruby (Test::Unit)
symbol: ruby-Test::Unit
Loaded suite examples/test-unit
Started
FFFE
Finished in 0.023173 seconds.
1) Failure:
test_a_deep_assert(BacktracesTest)
[examples/test-unit.rb:28:in `here_is_a_deep_assert'
examples/test-unit.rb:19:in `test_a_deep_assert']:
<false> is not true.
2) Failure:
test_assert(BacktracesTest) [examples/test-unit.rb:5]:
<false> is not true.
3) Failure:
test_assert_raise(BacktracesTest) [examples/test-unit.rb:9]:
Exception raised:
Class: <RuntimeError>
Message: <"">
---Backtrace---
examples/test-unit.rb:10:in `test_assert_raise'
examples/test-unit.rb:9:in `test_assert_raise'
---------------
4) Error:
test_backtrace(BacktracesTest):
NoMethodError: undefined method `not_exists' for nil:NilClass
examples/test-unit.rb:24:in `some_function_call_from_nil'
examples/test-unit.rb:15:in `test_backtrace'
4 tests, 3 assertions, 3 failures, 1 errors
2004-03-11 22:43:24 +00:00
* RXP
symbol: rxp
GPL XML validator at http://www.cogsci.ed.ac.uk/~richard/rxp.html
Error: Mismatched end tag: expected </geroup>, got </group>
in unnamed entity at line 71 char 8 of file:///home/reto/test/group.xml
Warning: Start tag for undeclared element geroup
in unnamed entity at line 4 char 8 of file:///home/reto/test/group.xml
* Sparc Pascal
symbols: sparc-pascal-file sparc-pascal-line sparc-pascal-example
These messages don't contain a file name. Instead the compiler gives a
message whenever the file being compiled is changed. For visual feedback the
error code is fontified like a file name would be.
Thu May 14 10:46:12 1992 mom3.p:
20 linjer : array[1..4] of linje;
w 18480-----------^--- Inserted ';'
20 linjer : array[1..4] of linje;
e 18480-----------^--- Inserted ';'
w 18520 line 61 - 0 is undefined
E 18520 line 61 - 0 is undefined
* SGI IRIX MipsPro 7.3 & Sun F90 & Cray C
symbol: sun
cc-1020 CC: REMARK File = CUI_App.h, Line = 735
cc-1070 cc: WARNING File = linkl.c, Line = 38
cf90-113 f90comp: ERROR NSE, File = Hoved.f90, Line = 16, Column = 3
* Sun Ada (VADS, Solaris)
symbol: sun-ada
/home3/xdhar/rcds_rc/main.a, line 361, char 6:syntax error: "," inserted
* 4.3BSD grep, cc, lint
symbol: 4bsd
/usr/src/foo/foo.c(8): warning: w may be used before set
/usr/src/foo/foo.c(9): error: w is used before set
strcmp: variable # of args. llib-lc(359) :: /usr/src/foo/foo.c(8)
bloofle defined( /users/wolfgang/foo.c(4) ), but never used
2005-04-10 06:19:31 +00:00
* GCOV (test coverage program)
2010-07-13 21:33:02 +00:00
symbol: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line
2005-04-10 06:19:31 +00:00
-: 0:Source:foo.c
-: 0:Object:foo.bb
2010-07-13 21:33:02 +00:00
-: 1:/* $ gcc -fprofile-arcs -ftest-coverage foo.c
2005-04-10 06:19:31 +00:00
-: 2: $ ./a.out
-: 3: $ gcov foo.c
-: 4: LANG=C gcov foo.c
-: 5: 62.50% of 8 lines executed in file foo.c
-: 6: Creating foo.c.gcov.*/
-: 7:int
-: 8:main(int argc, char ** argv)
1: 9:{
1: 10: int r;
1: 11: if (argc == 1)
1: 12: r = 1;
#####: 13: else if (argc == 2)
#####: 14: r = 2;
2010-07-13 21:33:02 +00:00
-: 15: else
2005-04-10 06:19:31 +00:00
#####: 16: r = 0;
1: 17: return r;
2010-07-13 21:33:02 +00:00
-: 18:}
2005-04-10 06:19:31 +00:00
2007-11-12 18:27:10 +00:00
* Podchecker error messages, per Pod::Checker
2009-07-10 04:44:55 +00:00
symbol: perl--Pod::Checker
2007-11-12 18:27:10 +00:00
*** ERROR: Spurious text after =cut at line 193 in file foo.pm
*** ERROR: =over on line 37 without closing =back at line EOF in file bar.pm
*** ERROR: =over on line 1 without closing =back (at head1) at line 3 in file x.pod
* Perl Test module error messages
2009-07-10 04:44:55 +00:00
symbol: perl--Test
2007-11-12 18:27:10 +00:00
# Failed test 1 in foo.t at line 6
* Perl Test::Harness output
2009-07-10 04:44:55 +00:00
symbol: perl--Test::Harness
2007-11-12 18:27:10 +00:00
NOK 1# Test 1 got: "1234" (t/foo.t at line 46)
* Perl HTML::Lint::Error::as_string()
2009-07-10 04:44:55 +00:00
symbol: weblint
2007-11-12 18:27:10 +00:00
index.html (13:1) Unknown element <fdjsk>
2004-03-11 22:43:24 +00:00
* Directory tracking
Directories are matched via `compilation-directory-matcher'. Files which are
not shown as full paths are searched for relative to the directory where the
message was issued.
Entering directory `/a/b/c'
Leaving directory `/a/b/c'
gmake[2]: Entering directory `/a/b/c'
makepp: Leaving directory `/a/b/c'
* Miscellaneous
These are not messages that can be gone to. They are only highlighted via
`compilation-mode-font-lock-keywords' to recognize some useful information at
a glance.
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether -lc should be explicitly linked in... (cached) no
checking For GLIB - version >= 2.0.0... yes (version 2.1.0)
checking FONTCONFIG_CFLAGS...
g++ -o foo.o foo.cc
tool1 -output=foo foo.x
tool2 --outfile foo foo.y
2005-08-06 00:55:11 +00:00
2005-08-14 06:55:35 +00:00
Compilation started at Wed Jul 20 12:20:10
Compilation interrupt at Wed Jul 20 12:20:10
Compilation killed at Wed Jul 20 12:20:10
Compilation terminated at Wed Jul 20 12:20:10
2005-08-06 00:55:11 +00:00
Compilation exited abnormally with code 1 at Wed Jul 20 12:21:12
2007-05-23 17:28:25 +00:00
Compilation segmentation fault at Thu Jul 13 10:55:49
2008-02-24 23:22:26 +00:00
Compilation finished at Thu Jul 21 15:02:15
2006-06-03 13:53:01 +00:00
2011-01-02 23:50:46 +00:00
Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
2007-01-21 00:27:14 +00:00
Free Software Foundation, Inc.
2006-06-03 13:53:01 +00:00
COPYING PERMISSIONS:
2008-05-15 07:32:14 +00:00
This document is free software: you can redistribute it and/or modify
2006-06-03 13:53:01 +00:00
it under the terms of the GNU General Public License as published by
2008-05-15 07:32:14 +00:00
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
2006-06-03 13:53:01 +00:00
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
2008-05-15 07:32:14 +00:00
along with this program. If not, see <http://www.gnu.org/licenses/>.