Add 2012 to FSF copyright years for Emacs files (do not merge to trunk)
[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
48The regexps found on http://ant.apache.org/faq.html, and since integrated in
49both Emacsen, were hairy. Why so many numbers for jikes -- is one a column
50number?
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
96
1b44af75
DP
97* EDG C/C++
98
99symbol: edg-1 edg-2
100
101build/intel/debug/../../../struct.cpp(42): error: identifier "foo" is undefined
102build/intel/debug/../../../struct.cpp(44): warning #1011: missing return statement at end of ...
103build/intel/debug/../../../iptr.h(302): remark #981: operands are evaluated in unspecified order
104 detected during ... at line 62 of "build/intel/debug/../../../trace.h"
105
106
38ca2dff
SM
107* EPC F90 compiler
108
109symbol: epc
110
111Error 24 at (2:progran.f90) : syntax error
112
113
0b55311a
DP
114* Fortran checker
115
7e8424e2 116symbols: ftnchek
0b55311a
DP
117
118 Dummy arg W in module SUBA line 8 file arrayclash.f is array
119 L4 used at line 55 file test/assign.f; never set
120Warning near line 10 file arrayclash.f: Module contains no executable
121Nonportable usage near line 31 col 9 file assign.f: mixed default and explicit
122
123
38ca2dff
SM
124* IAR Systems C Compiler
125
126symbol: iar
127
128"foo.c",3 Error[32]: Error message
129"foo.c",3 Warning[32]: Error message
130
131
132* IBM C/C++ Tools 2.01
133
134symbol: ibm
135
136foo.c(2:0) : informational EDC0804: Function foo is not referenced.
137foo.c(3:8) : warning EDC0833: Implicit return statement encountered.
138foo.c(5:5) : error EDC0350: Syntax error.
139
140
0b55311a 141* Ultrix MIPS RISC CC, DEC AXP OSF/1 cc, IRIX 5.2 & NAG Fortran
38ca2dff
SM
142
143symbol: irix
144
145ccom: Error: foo.c, line 2: syntax error
63915149 146cc: Severe: /src/Python-2.3.3/Modules/_curses_panel.c, line 17: Cannot find file <panel.h> ...
1618ce6d 147cc: Info: foo.c, line 27: ...
38ca2dff
SM
148cfe: Warning 712: foo.c, line 2: illegal combination of pointer and ...
149cfe: Warning 600: xfe.c: 170: Not in a conditional directive while ...
150/usr/lib/cmplrs/cc/cfe: Error: foo.c: 1: blah blah
151/usr/lib/cmplrs/cc/cfe: warning: foo.c: 1: blah blah
776f2b44 152foo bar: baz.f, line 27: ...
38ca2dff
SM
153
154
155* Java Exception & Valgrind (memory debugger for x86 GNU/Linux)
156
157symbol: java
158
159Register 6 contains wrong type
160 at org.foo.ComponentGateway.doGet(ComponentGateway.java:172)
161 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
162==1332== Invalid write of size 1
163==1332== at 0x4040743C: System::getErrorString() (../src/Lib/System.cpp:217)
164==1332== by 0x8008621: main (vtest.c:180)
165
166
167* IBM jikes
168
169symbols: jikes-file jikes-line
170
171Jikes separates file names from the actual error messages. For visual
172feedback the underline and the word "Error" on the 3rd line is fontified like
173a file name would be.
174
175Found 2 semantic errors compiling "../javax/swing/BorderFactory.java":
176
177 150. case '{':
178 <->
179*** Error: The type of this expression, "char", is not ...
180
181 312. return new CompoundBorder(outside, inside);
182 <--------------------------------->
183*** Error: No match was found for constructor ...
184
185Issued 1 semantic warning compiling "java/awt/Toolkit.java":
186
187 504. void imgProduceImage( ImageNativeProducer prod, Ptr imgData);
188 <----------------->
189*** Warning: The type "ImageNativeProducer" is defined ...
190
191
192* GCC include message
193
194symbol: gcc-include
195
196The last file, i.e. the one you are compiling, is the interesting one.
197
198In file included from /usr/include/c++/3.3/backward/warn.h:4,
199 from /usr/include/c++/3.3/backward/iostream.h:31,
200 from test_clt.cc:1:
201
202
203* GNU style
204
205symbol: gnu
206
207foo.c:8: message
208../foo.c:8: W: message
209/tmp/foo.c:8:warning message
210foo/bar.py:8: FutureWarning message
211foo.py:8: RuntimeWarning message
212foo.c:8:I: message
bec18736 213foo.c:8.23: note: message
38ca2dff
SM
214foo.c:8.23: info: message
215foo.c:8:23:information: message
216foo.c:8.23-45: Informational: message
217foo.c:8-23: message
218foo.c:8-45.3: message
219foo.c:8.23-9.1: message
220jade:dbcommon.dsl:133:17:E: missing argument for function call
221G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
222file:G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
d7d7fd30 223{standard input}:27041: Warning: end of file not at end of a line; newline inserted
38ca2dff
SM
224
225
226* Lucid Compiler, lcc 3.x
227
228symbol: lcc
229
230E, file.cc(35,52) Illegal operation on pointers
231W, file.cc(36,52) blah blah
232
233
234* makepp 1.20
235
236symbol: makepp
237
238makepp: Scanning `/foo/bar.c'
239makepp: warning: bla bla `/foo/bar.c' and `/foo/bar.h'
240makepp: bla bla `/foo/Makeppfile:12' bla
241makepp: bla bla `/foo/bar.c' and `/foo/bar.h'
242
243
1c427abd
NR
244* maven 2.0.9
245
246symbol: maven
247
248FooBar.java:[111,53] no interface expected here
249
250
38ca2dff
SM
251* MIPS lint; looks good for SunPro lint also
252
253symbols: mips-1 mips-2
254
255This can match multiple times on a line.
256
257TrimMask (255) in solomon.c may be indistinguishable from TrimMasks (93) in solomon.c due to truncation
258name defined but never used: LinInt in cmap_calc.c(199)
259
260
261* Microsoft C/C++
262
263symbol: msft
264
265This used to be less selective and allowed characters other than parens around
266the line number, but that caused confusion for GNU-style error messages. This
267used to reject spaces and dashes in file names, but they are valid now; so I
268made it more strict about the error message that follows.
269
270keyboard handler.c(537) : warning C4005: 'min' : macro redefinition
271d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if'
951802d0 272d:\tmp\test.c(1145) : see declaration of 'nsRefPtr'
38ca2dff
SM
273
274
7444d6ab
NR
275* Open Watcom
276
277symbol: watcom
278
279..\src\ctrl\lister.c(109): Error! E1009: Expecting ';' but found '{'
280..\src\ctrl\lister.c(120): Warning! W201: Unreachable code
281
282
38ca2dff
SM
283* Oracle pro*c
284
285symbol: oracle
286
d7d7fd30
DP
287This stupid precompiler wraps lines at column 80 in the middle of a file name.
288There is no obvious way of detecting this or turning it off. But if you
7e8424e2
DP
289delete the newline (probably needs M-x toggle-read-only), the file name will
290automatically be reparsed, so that you can then go there.
d7d7fd30 291
38ca2dff 292Semantic error at line 528, column 5, file erosacqdb.pc:
d7d7fd30
DP
293Error at line 41, column 10 in file /usr/src/sb/ODBI_BHP.hpp
294PCC-02150: error at line 49, column 27 in file /usr/src/sb/ODBI_dxfgh.pc
295PCC-00003: invalid SQL Identifier at column name in line 12 of file /usr/src/sb/ODBI_BHP.hpp
296PCC-00004: mismatched IF/ELSE/ENDIF block at line 27 in file /usr/src/sb/ODBI_BHP.hpp
297PCC-02151: line 21 column 40 file /usr/src/sb/ODBI_BHP.hpp:
38ca2dff
SM
298
299
300* Perl
301
302symbol: perl
303
cabb1527
CY
304The second sample, from the Perl-Glib module, is a Glib message put
305through Perl warn() to get "at FILENAME line N".
306
38ca2dff
SM
307syntax error at automake line 922, near "':'"
308Died at test.pl line 27.
309store::odrecall('File_A', 'x2') called at store.pm line 90
10a1257e 310 (in cleanup) something bad at foo.pl line 3 during global destruction.
38ca2dff 311
cabb1527 312GLib-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 313
33198156
MH
314* PHP
315
316symbol: php
317
318Parse error: parse error, unexpected $ in main.php on line 59
319Fatal error: Call to undefined function: mysql_pconnect() in db.inc on line 66
320
38ca2dff
SM
321* RXP
322
323symbol: rxp
324
325GPL XML validator at http://www.cogsci.ed.ac.uk/~richard/rxp.html
326
327Error: Mismatched end tag: expected </geroup>, got </group>
328in unnamed entity at line 71 char 8 of file:///home/reto/test/group.xml
329Warning: Start tag for undeclared element geroup
330in unnamed entity at line 4 char 8 of file:///home/reto/test/group.xml
331
332
333* Sparc Pascal
334
335symbols: sparc-pascal-file sparc-pascal-line sparc-pascal-example
336
337These messages don't contain a file name. Instead the compiler gives a
338message whenever the file being compiled is changed. For visual feedback the
339error code is fontified like a file name would be.
340
341Thu May 14 10:46:12 1992 mom3.p:
342 20 linjer : array[1..4] of linje;
343w 18480-----------^--- Inserted ';'
344 20 linjer : array[1..4] of linje;
345e 18480-----------^--- Inserted ';'
346w 18520 line 61 - 0 is undefined
347E 18520 line 61 - 0 is undefined
348
349
350* SGI IRIX MipsPro 7.3 & Sun F90 & Cray C
351
352symbol: sun
353
354cc-1020 CC: REMARK File = CUI_App.h, Line = 735
355cc-1070 cc: WARNING File = linkl.c, Line = 38
356cf90-113 f90comp: ERROR NSE, File = Hoved.f90, Line = 16, Column = 3
357
358
359* Sun Ada (VADS, Solaris)
360
361symbol: sun-ada
362
363/home3/xdhar/rcds_rc/main.a, line 361, char 6:syntax error: "," inserted
364
365
38ca2dff
SM
366* 4.3BSD grep, cc, lint
367
368symbol: 4bsd
369
370/usr/src/foo/foo.c(8): warning: w may be used before set
371/usr/src/foo/foo.c(9): error: w is used before set
372strcmp: variable # of args. llib-lc(359) :: /usr/src/foo/foo.c(8)
373bloofle defined( /users/wolfgang/foo.c(4) ), but never used
374
375
0c9a01ff
MY
376* GCOV (test coverage program)
377
378symbol: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line
379
380 -: 0:Source:foo.c
381 -: 0:Object:foo.bb
382 -: 1:/* $ gcc -fprofile-arcs -ftest-coverage foo.c
383 -: 2: $ ./a.out
384 -: 3: $ gcov foo.c
385 -: 4: LANG=C gcov foo.c
386 -: 5: 62.50% of 8 lines executed in file foo.c
387 -: 6: Creating foo.c.gcov.*/
388 -: 7:int
389 -: 8:main(int argc, char ** argv)
390 1: 9:{
391 1: 10: int r;
392 1: 11: if (argc == 1)
393 1: 12: r = 1;
394 #####: 13: else if (argc == 2)
395 #####: 14: r = 2;
396 -: 15: else
397 #####: 16: r = 0;
398 1: 17: return r;
399 -: 18:}
400
401
afefed62
VJL
402* Podchecker error messages, per Pod::Checker
403
4cbe53b4 404symbol: perl--Pod::Checker
afefed62
VJL
405
406*** ERROR: Spurious text after =cut at line 193 in file foo.pm
407*** ERROR: =over on line 37 without closing =back at line EOF in file bar.pm
408*** ERROR: =over on line 1 without closing =back (at head1) at line 3 in file x.pod
409
410
411* Perl Test module error messages
412
4cbe53b4 413symbol: perl--Test
afefed62
VJL
414
415# Failed test 1 in foo.t at line 6
416
417
418* Perl Test::Harness output
419
4cbe53b4 420symbol: perl--Test::Harness
afefed62
VJL
421
422NOK 1# Test 1 got: "1234" (t/foo.t at line 46)
423
424
425* Perl HTML::Lint::Error::as_string()
426
4cbe53b4 427symbol: weblint
afefed62
VJL
428
429index.html (13:1) Unknown element <fdjsk>
430
431
38ca2dff
SM
432* Directory tracking
433
434Directories are matched via `compilation-directory-matcher'. Files which are
435not shown as full paths are searched for relative to the directory where the
436message was issued.
437
438Entering directory `/a/b/c'
439Leaving directory `/a/b/c'
440gmake[2]: Entering directory `/a/b/c'
441makepp: Leaving directory `/a/b/c'
442
443
444* Miscellaneous
445
446These are not messages that can be gone to. They are only highlighted via
447`compilation-mode-font-lock-keywords' to recognize some useful information at
448a glance.
449
450checking dynamic linker characteristics... GNU/Linux ld.so
451checking if libtool supports shared libraries... yes
452checking whether to build shared libraries... yes
453checking whether -lc should be explicitly linked in... (cached) no
454checking For GLIB - version >= 2.0.0... yes (version 2.1.0)
455checking FONTCONFIG_CFLAGS...
456g++ -o foo.o foo.cc
457tool1 -output=foo foo.x
458tool2 --outfile foo foo.y
f533b4d9 459
ff452477
JL
460Compilation started at Wed Jul 20 12:20:10
461Compilation interrupt at Wed Jul 20 12:20:10
462Compilation killed at Wed Jul 20 12:20:10
463Compilation terminated at Wed Jul 20 12:20:10
f533b4d9 464Compilation exited abnormally with code 1 at Wed Jul 20 12:21:12
12cdb1c1 465Compilation segmentation fault at Thu Jul 13 10:55:49
3412ee5a 466Compilation finished at Thu Jul 21 15:02:15
b727702b
EZ
467
468\f
49f70d46 469Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
0a33da51 470Free Software Foundation, Inc.
b727702b
EZ
471
472COPYING PERMISSIONS:
473
ab73e885 474 This document is free software: you can redistribute it and/or modify
b727702b 475 it under the terms of the GNU General Public License as published by
ab73e885
GM
476 the Free Software Foundation, either version 3 of the License, or
477 (at your option) any later version.
b727702b
EZ
478
479 This program is distributed in the hope that it will be useful,
480 but WITHOUT ANY WARRANTY; without even the implied warranty of
481 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
482 GNU General Public License for more details.
483
484 You should have received a copy of the GNU General Public License
ab73e885 485 along with this program. If not, see <http://www.gnu.org/licenses/>.