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