Sync to HEAD
[bpt/emacs.git] / etc / compilation.txt
1 * Introduction -*-compilation-*-
2
3 This shows the different kinds of messages compile recognizes by default and
4 how they are rendered. It is intended both to help you decide which matchers
5 you need and as a test of the matchers. Move the mouse over a colored part or
6 use `compilation-message-face', to see how much text was actually matched.
7
8 The important part is the symbol(s) line at the beginning of each entry.
9 These are the symbols you can customize `compilation-error-regexp-alist' for,
10 to match the messages shown in that entry. A few complex cases have more than
11 one symbol, which should be selected together.
12
13
14 * Absoft FORTRAN 77 Compiler 3.1.3
15
16 symbol: absoft
17
18 Error on line 3 of t.f: Execution error unclassifiable statement
19 Line 45 of "foo.c": bloofle undefined
20 error on line 19 of fplot.f: spelling error?
21 warning on line 17 of fplot.f: data type is undefined for variable d
22
23
24 * Ada & Mpatrol (memory leak debugger)
25
26 symbol: ada
27
28 This matches only the end of line, the beginning is covered by GNU style.
29
30 foo.adb:61:11: [...] in call to size declared at foo.ads:11
31 0x8008621 main+16 at error.c:17
32
33
34 * IBM AIX PS/2 C version 1.1
35
36 symbol: aix
37
38 ****** Error number 140 in line 8 of file errors.c ******
39
40
41 * Ant Java: works at least for jikes and javac
42
43 symbol: ant
44
45 The regexps found on http://ant.apache.org/faq.html, and since integrated in
46 both Emacsen, were hairy. Why so many numbers for jikes -- is one a column
47 number?
48
49 [javac] /src/DataBaseTestCase.java:27: unreported exception ...
50 [javac] /src/DataBaseTestCase.java:49: warning: finally clause cannot complete normally
51 [jikes] foo.java:3:5:7:9: blah blah
52
53
54 * Bash v2
55
56 symbol: bash
57
58 a.sh: line 1: ls-l: command not found
59
60
61 * Borland C++, C++Builder
62
63 symbol: borland
64
65 Error ping.c 15: Unable to open include file 'sys/types.h'
66 Warning ping.c 68: Call to function 'func' with no prototype
67 Error E2010 ping.c 15: Unable to open include file 'sys/types.h'
68 Warning W1022 ping.c 68: Call to function 'func' with no prototype
69
70
71 * Caml & Python
72
73 symbol: caml
74
75 File "foobar.ml", lines 5-8, characters 20-155: blah blah
76 File "F:\ocaml\sorting.ml", line 65, characters 2-145:
77 Warning: this expression should have type unit.
78 File "/usr/share/gdesklets/display/TargetGauge.py", line 41, in add_children
79 File \lib\python\Products\PythonScripts\PythonScript.py, line 302, in _exec
80 File "/tmp/foo.py", line 10
81
82
83 * Apollo cc, 4.3BSD fc & IBM RS6000/AIX xlc compiler & Microtec mcc68k & GNAT (July 94)
84
85 symbol: comma
86
87 "foo.f", line 3: Error: syntax error near end of statement
88 "vvouch.c", line 19.5: 1506-046 (S) Syntax error.
89 "foo.c", line 32 pos 1; (E) syntax error; unexpected symbol: "lossage"
90 "foo.adb", line 2(11): warning: file name does not match ...
91 "src/swapping.c", line 30.34: 1506-342 (W) "/*" detected in comment.
92
93
94 * EPC F90 compiler
95
96 symbol: epc
97
98 Error 24 at (2:progran.f90) : syntax error
99
100
101 * IAR Systems C Compiler
102
103 symbol: iar
104
105 "foo.c",3 Error[32]: Error message
106 "foo.c",3 Warning[32]: Error message
107
108
109 * IBM C/C++ Tools 2.01
110
111 symbol: ibm
112
113 foo.c(2:0) : informational EDC0804: Function foo is not referenced.
114 foo.c(3:8) : warning EDC0833: Implicit return statement encountered.
115 foo.c(5:5) : error EDC0350: Syntax error.
116
117
118 * Ultrix MIPS RISC CC & DEC AXP OSF/1 cc & IRIX 5.2
119
120 symbol: irix
121
122 ccom: Error: foo.c, line 2: syntax error
123 cc: Info: foo.c, line 27: ...
124 cfe: Warning 712: foo.c, line 2: illegal combination of pointer and ...
125 cfe: Warning 600: xfe.c: 170: Not in a conditional directive while ...
126 /usr/lib/cmplrs/cc/cfe: Error: foo.c: 1: blah blah
127 /usr/lib/cmplrs/cc/cfe: warning: foo.c: 1: blah blah
128
129
130 * Java Exception & Valgrind (memory debugger for x86 GNU/Linux)
131
132 symbol: java
133
134 Register 6 contains wrong type
135 at org.foo.ComponentGateway.doGet(ComponentGateway.java:172)
136 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
137 ==1332== Invalid write of size 1
138 ==1332== at 0x4040743C: System::getErrorString() (../src/Lib/System.cpp:217)
139 ==1332== by 0x8008621: main (vtest.c:180)
140
141
142 * IBM jikes
143
144 symbols: jikes-file jikes-line
145
146 Jikes separates file names from the actual error messages. For visual
147 feedback the underline and the word "Error" on the 3rd line is fontified like
148 a file name would be.
149
150 Found 2 semantic errors compiling "../javax/swing/BorderFactory.java":
151
152 150. case '{':
153 <->
154 *** Error: The type of this expression, "char", is not ...
155
156 312. return new CompoundBorder(outside, inside);
157 <--------------------------------->
158 *** Error: No match was found for constructor ...
159
160 Issued 1 semantic warning compiling "java/awt/Toolkit.java":
161
162 504. void imgProduceImage( ImageNativeProducer prod, Ptr imgData);
163 <----------------->
164 *** Warning: The type "ImageNativeProducer" is defined ...
165
166
167 * GCC include message
168
169 symbol: gcc-include
170
171 The last file, i.e. the one you are compiling, is the interesting one.
172
173 In file included from /usr/include/c++/3.3/backward/warn.h:4,
174 from /usr/include/c++/3.3/backward/iostream.h:31,
175 from test_clt.cc:1:
176
177
178 * GNU style
179
180 symbol: gnu
181
182 foo.c:8: message
183 ../foo.c:8: W: message
184 /tmp/foo.c:8:warning message
185 foo/bar.py:8: FutureWarning message
186 foo.py:8: RuntimeWarning message
187 foo.c:8:I: message
188 foo.c:8.23: info: message
189 foo.c:8:23:information: message
190 foo.c:8.23-45: Informational: message
191 foo.c:8-23: message
192 foo.c:8-45.3: message
193 foo.c:8.23-9.1: message
194 jade:dbcommon.dsl:133:17:E: missing argument for function call
195 G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
196 file:G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
197
198
199 * Lucid Compiler, lcc 3.x
200
201 symbol: lcc
202
203 E, file.cc(35,52) Illegal operation on pointers
204 W, file.cc(36,52) blah blah
205
206
207 * makepp 1.20
208
209 symbol: makepp
210
211 makepp: Scanning `/foo/bar.c'
212 makepp: warning: bla bla `/foo/bar.c' and `/foo/bar.h'
213 makepp: bla bla `/foo/Makeppfile:12' bla
214 makepp: bla bla `/foo/bar.c' and `/foo/bar.h'
215
216
217 * MIPS lint; looks good for SunPro lint also
218
219 symbols: mips-1 mips-2
220
221 This can match multiple times on a line.
222
223 TrimMask (255) in solomon.c may be indistinguishable from TrimMasks (93) in solomon.c due to truncation
224 name defined but never used: LinInt in cmap_calc.c(199)
225
226
227 * Microsoft C/C++
228
229 symbol: msft
230
231 This used to be less selective and allowed characters other than parens around
232 the line number, but that caused confusion for GNU-style error messages. This
233 used to reject spaces and dashes in file names, but they are valid now; so I
234 made it more strict about the error message that follows.
235
236 keyboard handler.c(537) : warning C4005: 'min' : macro redefinition
237 d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if'
238
239
240 * Oracle pro*c
241
242 symbol: oracle
243
244 Semantic error at line 528, column 5, file erosacqdb.pc:
245
246
247 * Perl
248
249 symbol: perl
250
251 syntax error at automake line 922, near "':'"
252 Died at test.pl line 27.
253 store::odrecall('File_A', 'x2') called at store.pm line 90
254
255
256 * RXP
257
258 symbol: rxp
259
260 GPL XML validator at http://www.cogsci.ed.ac.uk/~richard/rxp.html
261
262 Error: Mismatched end tag: expected </geroup>, got </group>
263 in unnamed entity at line 71 char 8 of file:///home/reto/test/group.xml
264 Warning: Start tag for undeclared element geroup
265 in unnamed entity at line 4 char 8 of file:///home/reto/test/group.xml
266
267
268 * Sparc Pascal
269
270 symbols: sparc-pascal-file sparc-pascal-line sparc-pascal-example
271
272 These messages don't contain a file name. Instead the compiler gives a
273 message whenever the file being compiled is changed. For visual feedback the
274 error code is fontified like a file name would be.
275
276 Thu May 14 10:46:12 1992 mom3.p:
277 20 linjer : array[1..4] of linje;
278 w 18480-----------^--- Inserted ';'
279 20 linjer : array[1..4] of linje;
280 e 18480-----------^--- Inserted ';'
281 w 18520 line 61 - 0 is undefined
282 E 18520 line 61 - 0 is undefined
283
284
285 * SGI IRIX MipsPro 7.3 & Sun F90 & Cray C
286
287 symbol: sun
288
289 cc-1020 CC: REMARK File = CUI_App.h, Line = 735
290 cc-1070 cc: WARNING File = linkl.c, Line = 38
291 cf90-113 f90comp: ERROR NSE, File = Hoved.f90, Line = 16, Column = 3
292
293
294 * Sun Ada (VADS, Solaris)
295
296 symbol: sun-ada
297
298 /home3/xdhar/rcds_rc/main.a, line 361, char 6:syntax error: "," inserted
299
300
301 * Ultrix 3.0 f77 & Some SGI cc version
302
303 symbol: ultrix
304
305 fort: Severe: addstf.f, line 82: Missing operator or delimiter symbol
306 cfe: Warning 835: foo.c, line 2: something
307
308
309 * 4.3BSD grep, cc, lint
310
311 symbol: 4bsd
312
313 /usr/src/foo/foo.c(8): warning: w may be used before set
314 /usr/src/foo/foo.c(9): error: w is used before set
315 strcmp: variable # of args. llib-lc(359) :: /usr/src/foo/foo.c(8)
316 bloofle defined( /users/wolfgang/foo.c(4) ), but never used
317
318
319 * Directory tracking
320
321 Directories are matched via `compilation-directory-matcher'. Files which are
322 not shown as full paths are searched for relative to the directory where the
323 message was issued.
324
325 Entering directory `/a/b/c'
326 Leaving directory `/a/b/c'
327 gmake[2]: Entering directory `/a/b/c'
328 makepp: Leaving directory `/a/b/c'
329
330
331 * Miscellaneous
332
333 These are not messages that can be gone to. They are only highlighted via
334 `compilation-mode-font-lock-keywords' to recognize some useful information at
335 a glance.
336
337 checking dynamic linker characteristics... GNU/Linux ld.so
338 checking if libtool supports shared libraries... yes
339 checking whether to build shared libraries... yes
340 checking whether -lc should be explicitly linked in... (cached) no
341 checking For GLIB - version >= 2.0.0... yes (version 2.1.0)
342 checking FONTCONFIG_CFLAGS...
343 g++ -o foo.o foo.cc
344 tool1 -output=foo foo.x
345 tool2 --outfile foo foo.y