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