* display.texi (Scrolling): `C-v' (etc) are now bound to
[bpt/emacs.git] / etc / compilation.txt
CommitLineData
b727702b 1* Introduction -*-compilation-*- (Copyright information at end of file)
38ca2dff
SM
2
3This shows the different kinds of messages compile recognizes by default and
4how they are rendered. It is intended both to help you decide which matchers
5you need and as a test of the matchers. Move the mouse over a colored part or
6use `compilation-message-face', to see how much text was actually matched.
7
f2bb3ca3
TTN
8Note that the following example line should NOT be highlighted:
9Compilation started at Sat Jul 8 15:19:25
10
38ca2dff
SM
11The important part is the symbol(s) line at the beginning of each entry.
12These are the symbols you can customize `compilation-error-regexp-alist' for,
13to match the messages shown in that entry. A few complex cases have more than
14one symbol, which should be selected together.
15
16
17* Absoft FORTRAN 77 Compiler 3.1.3
18
19symbol: absoft
20
21Error on line 3 of t.f: Execution error unclassifiable statement
22Line 45 of "foo.c": bloofle undefined
23error on line 19 of fplot.f: spelling error?
24warning on line 17 of fplot.f: data type is undefined for variable d
25
26
27* Ada & Mpatrol (memory leak debugger)
28
29symbol: ada
30
31This matches only the end of line, the beginning is covered by GNU style.
32
33foo.adb:61:11: [...] in call to size declared at foo.ads:11
34 0x8008621 main+16 at error.c:17
35
36
37* IBM AIX PS/2 C version 1.1
38
39symbol: aix
40
41****** Error number 140 in line 8 of file errors.c ******
42
43
44* Ant Java: works at least for jikes and javac
45
46symbol: ant
47
3a648237
CY
48The regexps found on http://ant.apache.org/faq.html, and since
49integrated in both Emacsen, were hairy. The extra two numbers for
f104c116 50jikes are the ending line and ending column.
38ca2dff
SM
51
52 [javac] /src/DataBaseTestCase.java:27: unreported exception ...
53 [javac] /src/DataBaseTestCase.java:49: warning: finally clause cannot complete normally
54 [jikes] foo.java:3:5:7:9: blah blah
55
56
57* Bash v2
58
59symbol: bash
60
61a.sh: line 1: ls-l: command not found
62
63
64* Borland C++, C++Builder
65
66symbol: borland
67
68Error ping.c 15: Unable to open include file 'sys/types.h'
69Warning ping.c 68: Call to function 'func' with no prototype
70Error E2010 ping.c 15: Unable to open include file 'sys/types.h'
71Warning W1022 ping.c 68: Call to function 'func' with no prototype
72
73
74* Caml & Python
75
76symbol: caml
77
78File "foobar.ml", lines 5-8, characters 20-155: blah blah
79File "F:\ocaml\sorting.ml", line 65, characters 2-145:
80Warning: this expression should have type unit.
81 File "/usr/share/gdesklets/display/TargetGauge.py", line 41, in add_children
1618ce6d
DP
82 File \lib\python\Products\PythonScripts\PythonScript.py, line 302, in _exec
83 File "/tmp/foo.py", line 10
38ca2dff
SM
84
85
86* Apollo cc, 4.3BSD fc & IBM RS6000/AIX xlc compiler & Microtec mcc68k & GNAT (July 94)
87
88symbol: comma
89
90"foo.f", line 3: Error: syntax error near end of statement
91"vvouch.c", line 19.5: 1506-046 (S) Syntax error.
92"foo.c", line 32 pos 1; (E) syntax error; unexpected symbol: "lossage"
93"foo.adb", line 2(11): warning: file name does not match ...
94"src/swapping.c", line 30.34: 1506-342 (W) "/*" detected in comment.
95
c5622b6f
AG
96* Cucumber
97
98symbol: cucumber
99
100Feature: This is an example for backtrace.
101
102 Scenario: undefined step # features/cucumber.feature:3
103 Given this is undefined # features/cucumber.feature:4
104
c68263b1
CY
105 Scenario: assertion false (Test::Unit) # foo/bar.feature:6
106 Given this will generate 'assert false' # foo/bar.rb:1
c5622b6f 107 <false> is not true. (Test::Unit::AssertionFailedError)
c68263b1
CY
108 /home/gusev/.rvm/foo/bar.rb:48:in `assert_block'
109 /home/gusev/.rvm/foo/bar.rb:500:in `_wrap_assertion'
c5622b6f
AG
110 features/cucumber.feature:7:in `Given this will generate 'assert false''
111
c68263b1
CY
112 Scenario: assertion false (RSpec) # foo/bar.feature:9
113 Given this will generate 'should be_true' # foo/bar.rb:5
c5622b6f 114 expected true to be false (Spec::Expectations::ExpectationNotMetError)
c68263b1
CY
115 ./foo/bar/baz.rb:6:in `/^this will generate 'should be_true'$/'
116 foo/bar.feature:10:in `Given this will generate 'should be_true''
c5622b6f 117
c68263b1
CY
118 Scenario: backtrace in step definition # foo/bar.feature:12
119 Given this will generate backtrace # foo/sbar.rb:9
c5622b6f 120 (RuntimeError)
c68263b1
CY
121 ./foo/bar.rb:10:in `/^this will generate backtrace$/'
122 foo/bar.feature:13:in `Given this will generate backtrace'
c5622b6f
AG
123
124Failing Scenarios:
c68263b1
CY
125cucumber foo/cucumber.feature:6 # Scenario: assertion false (Test::Unit)
126cucumber foo/cucumber.feature:9 # Scenario: assertion false (RSpec)
127cucumber foo/cucumber.feature:12 # Scenario: backtrace in step definition
128cucumber foo/cucumber.feature:15 # Scenario: deeep backtrace in step definition
c5622b6f
AG
129
1305 scenarios (4 failed, 1 undefined)
1315 steps (4 failed, 1 undefined)
1320m0.007s
38ca2dff 133
1b44af75
DP
134* EDG C/C++
135
136symbol: edg-1 edg-2
137
138build/intel/debug/../../../struct.cpp(42): error: identifier "foo" is undefined
139build/intel/debug/../../../struct.cpp(44): warning #1011: missing return statement at end of ...
140build/intel/debug/../../../iptr.h(302): remark #981: operands are evaluated in unspecified order
141 detected during ... at line 62 of "build/intel/debug/../../../trace.h"
142
143
38ca2dff
SM
144* EPC F90 compiler
145
146symbol: epc
147
148Error 24 at (2:progran.f90) : syntax error
149
150
0b55311a
DP
151* Fortran checker
152
7e8424e2 153symbols: ftnchek
0b55311a
DP
154
155 Dummy arg W in module SUBA line 8 file arrayclash.f is array
156 L4 used at line 55 file test/assign.f; never set
157Warning near line 10 file arrayclash.f: Module contains no executable
158Nonportable usage near line 31 col 9 file assign.f: mixed default and explicit
159
160
38ca2dff
SM
161* IAR Systems C Compiler
162
163symbol: iar
164
165"foo.c",3 Error[32]: Error message
166"foo.c",3 Warning[32]: Error message
167
168
169* IBM C/C++ Tools 2.01
170
171symbol: ibm
172
173foo.c(2:0) : informational EDC0804: Function foo is not referenced.
174foo.c(3:8) : warning EDC0833: Implicit return statement encountered.
175foo.c(5:5) : error EDC0350: Syntax error.
176
177
0b55311a 178* Ultrix MIPS RISC CC, DEC AXP OSF/1 cc, IRIX 5.2 & NAG Fortran
38ca2dff
SM
179
180symbol: irix
181
182ccom: Error: foo.c, line 2: syntax error
63915149 183cc: Severe: /src/Python-2.3.3/Modules/_curses_panel.c, line 17: Cannot find file <panel.h> ...
1618ce6d 184cc: Info: foo.c, line 27: ...
38ca2dff
SM
185cfe: Warning 712: foo.c, line 2: illegal combination of pointer and ...
186cfe: Warning 600: xfe.c: 170: Not in a conditional directive while ...
187/usr/lib/cmplrs/cc/cfe: Error: foo.c: 1: blah blah
188/usr/lib/cmplrs/cc/cfe: warning: foo.c: 1: blah blah
776f2b44 189foo bar: baz.f, line 27: ...
38ca2dff
SM
190
191
192* Java Exception & Valgrind (memory debugger for x86 GNU/Linux)
193
194symbol: java
195
196Register 6 contains wrong type
197 at org.foo.ComponentGateway.doGet(ComponentGateway.java:172)
198 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
199==1332== Invalid write of size 1
200==1332== at 0x4040743C: System::getErrorString() (../src/Lib/System.cpp:217)
201==1332== by 0x8008621: main (vtest.c:180)
202
203
204* IBM jikes
205
206symbols: jikes-file jikes-line
207
208Jikes separates file names from the actual error messages. For visual
209feedback the underline and the word "Error" on the 3rd line is fontified like
210a file name would be.
211
212Found 2 semantic errors compiling "../javax/swing/BorderFactory.java":
213
214 150. case '{':
215 <->
216*** Error: The type of this expression, "char", is not ...
217
218 312. return new CompoundBorder(outside, inside);
219 <--------------------------------->
220*** Error: No match was found for constructor ...
221
222Issued 1 semantic warning compiling "java/awt/Toolkit.java":
223
224 504. void imgProduceImage( ImageNativeProducer prod, Ptr imgData);
225 <----------------->
226*** Warning: The type "ImageNativeProducer" is defined ...
227
228
229* GCC include message
230
231symbol: gcc-include
232
233The last file, i.e. the one you are compiling, is the interesting one.
234
235In file included from /usr/include/c++/3.3/backward/warn.h:4,
7c837933 236 from /usr/include/c++/3.3/backward/iostream.h:31:0,
38ca2dff
SM
237 from test_clt.cc:1:
238
239
240* GNU style
241
242symbol: gnu
243
244foo.c:8: message
245../foo.c:8: W: message
246/tmp/foo.c:8:warning message
247foo/bar.py:8: FutureWarning message
248foo.py:8: RuntimeWarning message
249foo.c:8:I: message
bec18736 250foo.c:8.23: note: message
38ca2dff
SM
251foo.c:8.23: info: message
252foo.c:8:23:information: message
253foo.c:8.23-45: Informational: message
254foo.c:8-23: message
255foo.c:8-45.3: message
256foo.c:8.23-9.1: message
257jade:dbcommon.dsl:133:17:E: missing argument for function call
258G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
259file:G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
d7d7fd30 260{standard input}:27041: Warning: end of file not at end of a line; newline inserted
38ca2dff
SM
261
262
263* Lucid Compiler, lcc 3.x
264
265symbol: lcc
266
267E, file.cc(35,52) Illegal operation on pointers
268W, file.cc(36,52) blah blah
269
270
271* makepp 1.20
272
273symbol: makepp
274
275makepp: Scanning `/foo/bar.c'
276makepp: warning: bla bla `/foo/bar.c' and `/foo/bar.h'
277makepp: bla bla `/foo/Makeppfile:12' bla
278makepp: bla bla `/foo/bar.c' and `/foo/bar.h'
279
280
1c427abd
NR
281* maven 2.0.9
282
283symbol: maven
284
285FooBar.java:[111,53] no interface expected here
286
287
38ca2dff
SM
288* MIPS lint; looks good for SunPro lint also
289
290symbols: mips-1 mips-2
291
292This can match multiple times on a line.
293
294TrimMask (255) in solomon.c may be indistinguishable from TrimMasks (93) in solomon.c due to truncation
295name defined but never used: LinInt in cmap_calc.c(199)
296
297
298* Microsoft C/C++
299
300symbol: msft
301
302This used to be less selective and allowed characters other than parens around
303the line number, but that caused confusion for GNU-style error messages. This
304used to reject spaces and dashes in file names, but they are valid now; so I
305made it more strict about the error message that follows.
306
307keyboard handler.c(537) : warning C4005: 'min' : macro redefinition
308d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if'
951802d0 309d:\tmp\test.c(1145) : see declaration of 'nsRefPtr'
38ca2dff
SM
310
311
7444d6ab
NR
312* Open Watcom
313
314symbol: watcom
315
316..\src\ctrl\lister.c(109): Error! E1009: Expecting ';' but found '{'
317..\src\ctrl\lister.c(120): Warning! W201: Unreachable code
318
319
38ca2dff
SM
320* Oracle pro*c
321
322symbol: oracle
323
d7d7fd30
DP
324This stupid precompiler wraps lines at column 80 in the middle of a file name.
325There is no obvious way of detecting this or turning it off. But if you
7e8424e2
DP
326delete the newline (probably needs M-x toggle-read-only), the file name will
327automatically be reparsed, so that you can then go there.
d7d7fd30 328
38ca2dff 329Semantic error at line 528, column 5, file erosacqdb.pc:
d7d7fd30
DP
330Error at line 41, column 10 in file /usr/src/sb/ODBI_BHP.hpp
331PCC-02150: error at line 49, column 27 in file /usr/src/sb/ODBI_dxfgh.pc
332PCC-00003: invalid SQL Identifier at column name in line 12 of file /usr/src/sb/ODBI_BHP.hpp
333PCC-00004: mismatched IF/ELSE/ENDIF block at line 27 in file /usr/src/sb/ODBI_BHP.hpp
334PCC-02151: line 21 column 40 file /usr/src/sb/ODBI_BHP.hpp:
38ca2dff
SM
335
336
337* Perl
338
339symbol: perl
340
cabb1527
CY
341The second sample, from the Perl-Glib module, is a Glib message put
342through Perl warn() to get "at FILENAME line N".
343
38ca2dff
SM
344syntax error at automake line 922, near "':'"
345Died at test.pl line 27.
346store::odrecall('File_A', 'x2') called at store.pm line 90
10a1257e 347 (in cleanup) something bad at foo.pl line 3 during global destruction.
38ca2dff 348
cabb1527 349GLib-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.
38ca2dff 350
33198156
MH
351* PHP
352
353symbol: php
354
355Parse error: parse error, unexpected $ in main.php on line 59
356Fatal error: Call to undefined function: mysql_pconnect() in db.inc on line 66
357
c5622b6f
AG
358* Ruby
359
360symbol: ruby
361
362plain-exception.rb:7:in `fun': unhandled exception
363 from plain-exception.rb:3:in `proxy'
364 from plain-exception.rb:12
365
366* Ruby (Test::Unit)
367
368symbol: ruby-Test::Unit
369
370Loaded suite examples/test-unit
371Started
372FFFE
373Finished in 0.023173 seconds.
374
375 1) Failure:
376test_a_deep_assert(BacktracesTest)
377 [examples/test-unit.rb:28:in `here_is_a_deep_assert'
378 examples/test-unit.rb:19:in `test_a_deep_assert']:
379<false> is not true.
380
381 2) Failure:
382test_assert(BacktracesTest) [examples/test-unit.rb:5]:
383<false> is not true.
384
385 3) Failure:
386test_assert_raise(BacktracesTest) [examples/test-unit.rb:9]:
387Exception raised:
388Class: <RuntimeError>
389Message: <"">
390---Backtrace---
391examples/test-unit.rb:10:in `test_assert_raise'
392examples/test-unit.rb:9:in `test_assert_raise'
393---------------
394
395 4) Error:
396test_backtrace(BacktracesTest):
397NoMethodError: undefined method `not_exists' for nil:NilClass
398 examples/test-unit.rb:24:in `some_function_call_from_nil'
399 examples/test-unit.rb:15:in `test_backtrace'
400
4014 tests, 3 assertions, 3 failures, 1 errors
402
38ca2dff
SM
403* RXP
404
405symbol: rxp
406
407GPL XML validator at http://www.cogsci.ed.ac.uk/~richard/rxp.html
408
409Error: Mismatched end tag: expected </geroup>, got </group>
410in unnamed entity at line 71 char 8 of file:///home/reto/test/group.xml
411Warning: Start tag for undeclared element geroup
412in unnamed entity at line 4 char 8 of file:///home/reto/test/group.xml
413
414
415* Sparc Pascal
416
417symbols: sparc-pascal-file sparc-pascal-line sparc-pascal-example
418
419These messages don't contain a file name. Instead the compiler gives a
420message whenever the file being compiled is changed. For visual feedback the
421error code is fontified like a file name would be.
422
423Thu May 14 10:46:12 1992 mom3.p:
424 20 linjer : array[1..4] of linje;
425w 18480-----------^--- Inserted ';'
426 20 linjer : array[1..4] of linje;
427e 18480-----------^--- Inserted ';'
428w 18520 line 61 - 0 is undefined
429E 18520 line 61 - 0 is undefined
430
431
432* SGI IRIX MipsPro 7.3 & Sun F90 & Cray C
433
434symbol: sun
435
436cc-1020 CC: REMARK File = CUI_App.h, Line = 735
437cc-1070 cc: WARNING File = linkl.c, Line = 38
438cf90-113 f90comp: ERROR NSE, File = Hoved.f90, Line = 16, Column = 3
439
440
441* Sun Ada (VADS, Solaris)
442
443symbol: sun-ada
444
445/home3/xdhar/rcds_rc/main.a, line 361, char 6:syntax error: "," inserted
446
447
38ca2dff
SM
448* 4.3BSD grep, cc, lint
449
450symbol: 4bsd
451
452/usr/src/foo/foo.c(8): warning: w may be used before set
453/usr/src/foo/foo.c(9): error: w is used before set
454strcmp: variable # of args. llib-lc(359) :: /usr/src/foo/foo.c(8)
455bloofle defined( /users/wolfgang/foo.c(4) ), but never used
456
457
0c9a01ff
MY
458* GCOV (test coverage program)
459
c5622b6f 460symbol: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line
0c9a01ff
MY
461
462 -: 0:Source:foo.c
463 -: 0:Object:foo.bb
c5622b6f 464 -: 1:/* $ gcc -fprofile-arcs -ftest-coverage foo.c
0c9a01ff
MY
465 -: 2: $ ./a.out
466 -: 3: $ gcov foo.c
467 -: 4: LANG=C gcov foo.c
468 -: 5: 62.50% of 8 lines executed in file foo.c
469 -: 6: Creating foo.c.gcov.*/
470 -: 7:int
471 -: 8:main(int argc, char ** argv)
472 1: 9:{
473 1: 10: int r;
474 1: 11: if (argc == 1)
475 1: 12: r = 1;
476 #####: 13: else if (argc == 2)
477 #####: 14: r = 2;
c5622b6f 478 -: 15: else
0c9a01ff
MY
479 #####: 16: r = 0;
480 1: 17: return r;
c5622b6f 481 -: 18:}
0c9a01ff
MY
482
483
afefed62
VJL
484* Podchecker error messages, per Pod::Checker
485
4cbe53b4 486symbol: perl--Pod::Checker
afefed62
VJL
487
488*** ERROR: Spurious text after =cut at line 193 in file foo.pm
489*** ERROR: =over on line 37 without closing =back at line EOF in file bar.pm
490*** ERROR: =over on line 1 without closing =back (at head1) at line 3 in file x.pod
491
492
493* Perl Test module error messages
494
4cbe53b4 495symbol: perl--Test
afefed62
VJL
496
497# Failed test 1 in foo.t at line 6
498
499
500* Perl Test::Harness output
501
4cbe53b4 502symbol: perl--Test::Harness
afefed62
VJL
503
504NOK 1# Test 1 got: "1234" (t/foo.t at line 46)
505
506
507* Perl HTML::Lint::Error::as_string()
508
4cbe53b4 509symbol: weblint
afefed62
VJL
510
511index.html (13:1) Unknown element <fdjsk>
512
513
38ca2dff
SM
514* Directory tracking
515
516Directories are matched via `compilation-directory-matcher'. Files which are
517not shown as full paths are searched for relative to the directory where the
518message was issued.
519
520Entering directory `/a/b/c'
521Leaving directory `/a/b/c'
522gmake[2]: Entering directory `/a/b/c'
523makepp: Leaving directory `/a/b/c'
524
525
526* Miscellaneous
527
528These are not messages that can be gone to. They are only highlighted via
529`compilation-mode-font-lock-keywords' to recognize some useful information at
530a glance.
531
532checking dynamic linker characteristics... GNU/Linux ld.so
533checking if libtool supports shared libraries... yes
534checking whether to build shared libraries... yes
535checking whether -lc should be explicitly linked in... (cached) no
536checking For GLIB - version >= 2.0.0... yes (version 2.1.0)
537checking FONTCONFIG_CFLAGS...
538g++ -o foo.o foo.cc
539tool1 -output=foo foo.x
540tool2 --outfile foo foo.y
f533b4d9 541
ff452477
JL
542Compilation started at Wed Jul 20 12:20:10
543Compilation interrupt at Wed Jul 20 12:20:10
544Compilation killed at Wed Jul 20 12:20:10
545Compilation terminated at Wed Jul 20 12:20:10
f533b4d9 546Compilation exited abnormally with code 1 at Wed Jul 20 12:21:12
12cdb1c1 547Compilation segmentation fault at Thu Jul 13 10:55:49
3412ee5a 548Compilation finished at Thu Jul 21 15:02:15
b727702b
EZ
549
550\f
73b0cd50 551Copyright (C) 2004-2011 Free Software Foundation, Inc.
b727702b
EZ
552
553COPYING PERMISSIONS:
554
ab73e885 555 This document is free software: you can redistribute it and/or modify
b727702b 556 it under the terms of the GNU General Public License as published by
ab73e885
GM
557 the Free Software Foundation, either version 3 of the License, or
558 (at your option) any later version.
b727702b
EZ
559
560 This program is distributed in the hope that it will be useful,
561 but WITHOUT ANY WARRANTY; without even the implied warranty of
562 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
563 GNU General Public License for more details.
564
565 You should have received a copy of the GNU General Public License
ab73e885 566 along with this program. If not, see <http://www.gnu.org/licenses/>.