Gnu Gmake Error Codes
Contents |
to fix them. Sometimes make errors are not fatal, especially in the presence of a - prefix on a recipe line, or the -k command makefile error 2 line option. Errors that are fatal are prefixed with the string ***. makefile error 1 Error messages are all either prefixed with the name of the program (usually ‘make’), or, if the error is make all error 2 found in a makefile, the name of the file and line number containing the problem. In the table below, these common prefixes are left off. ‘[foo] Error NN’ ‘[foo] signal description’ These
Make * * * Error 2
errors are not really make errors at all. They mean that a program that make invoked as part of a recipe returned a non-0 error code (‘Error NN’), which make interprets as failure, or it exited in some other abnormal fashion (with a signal of some type). See Errors in Recipes. If no *** is attached to the message, then the sub-process failed but no rule to make target makefile the rule in the makefile was prefixed with the - special character, so make ignored the error. ‘missing separator. Stop.’ ‘missing separator (did you mean TAB instead of 8 spaces?). Stop.’ This means that make could not understand much of anything about the makefile line it just read. GNU make looks for various separators (:, =, recipe prefix characters, etc.) to indicate what kind of line it’s parsing. This message means it couldn’t find a valid one. One of the most common reasons for this message is that you (or perhaps your oh-so-helpful editor, as is the case with many MS-Windows editors) have attempted to indent your recipe lines with spaces instead of a tab character. In this case, make will use the second form of the error above. Remember that every line in the recipe must begin with a tab character (unless you set .RECIPEPREFIX; see Special Variables). Eight spaces do not count. See Rule Syntax. ‘recipe commences before first target. Stop.’ ‘missing rule before recipe. Stop.’ This means the first thing in the makefile seems to be part of a recipe: it begins with a recipe p
to cause make to stop if linux make error 2 some sort of environmental error is detected. $(error text…)
Gcc Error 2
Generates a fatal error where the message is text. Note that the
Recipe Commences Before First Target. Stop.
error is generated whenever this function is evaluated. So, if you put it inside a recipe or on the right side https://www.gnu.org/s/make/manual/html_node/Error-Messages.html of a recursive variable assignment, it won’t be evaluated until later. The text will be expanded before the error is generated. For example, ifdef ERROR1 $(error error is $(ERROR1)) endif will generate a fatal error during the read of the makefile https://www.gnu.org/s/make/manual/html_node/Make-Control-Functions.html if the make variable ERROR1 is defined. Or, ERR = $(error found an error!) .PHONY: err err: ; $(ERR) will generate a fatal error while make is running, if the err target is invoked. $(warning text…) This function works similarly to the error function, above, except that make doesn’t exit. Instead, text is expanded and the resulting message is displayed, but processing of the makefile continues. The result of the expansion of this function is the empty string. $(info text…) This function does nothing more than print its (expanded) argument(s) to standard output. No makefile name or line number is added. The result of the expansion of this function is the empty string. Next: Shell Function, Previous: Flavor Function, Up: Functions [Contents][Index]
errors are not fatal, especially in the presence of a - prefix on a command script line, or the -k http://gnu.huihoo.org/make-3.77/html_node/make_121.html command line option. Errors that are fatal are prefixed with the string ***. Error messages are all either prefixed with the name of the program (usually `make'), or, if the error is found in a makefile, the name of the file and linenumber containing the problem. In the table below, these common prefixes are left off. `[foo] Error NN' `[foo] signal description' error 2 These errors are not really make errors at all. They mean that a program that make invoked as part of a command script returned a non-0 error code (`Error NN'), which make interprets as failure, or it exited in some other abnormal fashion (with a signal of some type). If no *** is attached to the message, then the subprocess failed but the gnu gmake error rule in the makefile was prefixed with the - special character, so make ignored the error. `missing separator. Stop.' This is make's generic "Huh?" error message. It means that make was completely unsuccessful at parsing this line of your makefile. It basically means "syntax error". One of the most common reasons for this message is that you (or perhaps your oh-so-helpful editor, as is the case with many MS-Windows editors) have attempted to indent your command scripts with spaces instead of a TAB character. Remember that every line in the command script must begin with a TAB character. Eight spaces do not count. `commands commence before first target. Stop.' `missing rule before commands. Stop.' This means the first thing in the makefile seems to be part of a command script: it begins with a TAB character and doesn't appear to be a legal make command (such as a variable assignment). Command scripts must always be associated with a target. The second form is generated if the line has a semicolon as the first non-whitespace character; make interprets this to mean you left out the "target: dependency"