Gnu Make 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 line option. Errors that are fatal are prefixed with the string ***. Error messages are all makefile error 2 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 make * * * error 2 off. ‘[foo] Error NN’ ‘[foo] signal description’ These 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 makefile error 1 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 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.
Linux Make Error 2
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 prefix character and doesn’t appear to be a legal make directive (such as a variable assignment). Recipes 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: prerequisite" section of a rule. See Rule Syntax. ‘No rule to make target `xxx'.’ ‘No rule to make target `xxx', needed by `yyy'.’ This means that make decided it needed to build a target, but then couldn’t find any instructions in the makefile on how to do
to cause make to stop if
Gcc Error 2
some sort of environmental error is detected. $(error text…) gcc error 1 Generates a fatal error where the message is text. Note that the makefile recipe for target failed 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]
%% "Chris Jimison"
writes: cj> I keep getting a make error "Error 255". I would like to https://lists.gnu.org/archive/html/help-make/2002-12/msg00040.html know cj> what an "Error 255" is. I just need to know where I can find a cj> list of all the make error http://gnu.huihoo.org/make-3.77/html_node/make_121.html codes. I have look all over and can't cj> find a list of all the possible make errors. Any help would be cj> most appreciated. error 2 The error messages that GNU make can generate are listed in the GNU make manual, in the section titled Error Messages. GNU make does not generate "error codes"; the above message means that the program that GNU make invoked to update a target exited with a non-0 exit code (in gnu make error this case, exit code 255, or -1). GNU make determines whether or not a command succeeds be examining the exit code: as per all UNIX operations an exit code of 0 means success, any other code means failure. You need to look at the messages generated before this one to find out why the command you invoked did not work. In short, this is not a GNU make problem at all. -- ------------------------------------------------------------------------------- Paul D. Smith Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist reply via email to [Prev in Thread] Current Thread [Next in Thread] Make error code listing, Chris Jimison, 2002/12/26 Re: Make error code listing, Paul D. Smith<= Prev by Date: Make error code listing Next by Date: Re: URGENT Previous by thread: Make error code listing Index(es): Date Threaderrors are not fatal, especially in the presence of a - prefix on a command script line, or the -k 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' 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 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" section of a rule. `No rule to make target `xxx'.' `No rule to make target `xxx', needed by `yyy'.' This means that make decided it needed to build a target, but then couldn't find any instructions in the makefile on how to do that, either explicit or implicit (including in the default rules database). If you want that file to be