| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Appendix B Errors Generated by Make
Here is a list of the more common errors you might see generated by
make, and some information about what they mean and how 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 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 line number containing the problem.
In the table below, these common prefixes are left off.
- ‘[foo] Error NN’
- ‘[foo] signal description’
These errors are not really
makeerrors at all. They mean that a program thatmakeinvoked as part of a recipe returned a non-0 error code (‘Error NN’), whichmakeinterprets as failure, or it exited in some other abnormal fashion (with a signal of some type). See section 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, somakeignored the error.- ‘missing separator. Stop.’
- ‘missing separator (did you mean TAB instead of 8 spaces?). Stop.’
This means that
makecould not understand much of anything about the makefile line it just read. GNUmakelooks 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,
makewill 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 section Other Special Variables). Eight spaces do not count. See section 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
makedirective (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;
makeinterprets this to mean you left out the "target: prerequisite" section of a rule. See section Rule Syntax.- ‘No rule to make target `xxx'.’
- ‘No rule to make target `xxx', needed by `yyy'.’
This means that
makedecided 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 built, you will need to add a rule to your makefile describing how that target can be built. Other possible sources of this problem are typos in the makefile (if that file name is wrong) or a corrupted source tree (if that file is not supposed to be built, but rather only a prerequisite).
- ‘No targets specified and no makefile found. Stop.’
- ‘No targets. Stop.’
The former means that you didn’t provide any targets to be built on the command line, and
makecouldn’t find any makefiles to read in. The latter means that some makefile was found, but it didn’t contain any default goal and none was given on the command line. GNUmakehas nothing to do in these situations. See section Arguments to Specify the Makefile.- ‘Makefile `xxx' was not found.’
- ‘Included makefile `xxx' was not found.’
A makefile specified on the command line (first form) or included (second form) was not found.
- ‘warning: overriding recipe for target `xxx'’
- ‘warning: ignoring old recipe for target `xxx'’
GNU
makeallows only one recipe to be specified per target (except for double-colon rules). If you give a recipe for a target which already has been defined to have one, this warning is issued and the second recipe will overwrite the first. See section Multiple Rules for One Target.- ‘Circular xxx <- yyy dependency dropped.’
This means that
makedetected a loop in the dependency graph: after tracing the prerequisite yyy of target xxx, and its prerequisites, etc., one of them depended on xxx again.- ‘Recursive variable `xxx' references itself (eventually). Stop.’
This means you’ve defined a normal (recursive)
makevariable xxx that, when it’s expanded, will refer to itself (xxx). This is not allowed; either use simply-expanded variables (‘:=’ or ‘::=’) or use the append operator (‘+=’). See section How to Use Variables.- ‘Unterminated variable reference. Stop.’
This means you forgot to provide the proper closing parenthesis or brace in your variable or function reference.
- ‘insufficient arguments to function `xxx'. Stop.’
This means you haven’t provided the requisite number of arguments for this function. See the documentation of the function for a description of its arguments. See section Functions for Transforming Text.
- ‘missing target pattern. Stop.’
- ‘multiple target patterns. Stop.’
- ‘target pattern contains no `%'. Stop.’
- ‘mixed implicit and static pattern rules. Stop.’
These are generated for malformed static pattern rules. The first means there’s no pattern in the target section of the rule; the second means there are multiple patterns in the target section; the third means the target doesn’t contain a pattern character (
%); and the fourth means that all three parts of the static pattern rule contain pattern characters (%)–only the first two parts should. If you see these errors and you aren’t trying to create a static pattern rule, check the value of any variables in your target and prerequisite lists to be sure they do not contain colons. See section Syntax of Static Pattern Rules.- ‘warning: -jN forced in submake: disabling jobserver mode.’
This warning and the next are generated if
makedetects error conditions related to parallel processing on systems where sub-makes can communicate (see section Communicating Options to a Sub-make). This warning is generated if a recursive invocation of amakeprocess is forced to have ‘-jN’ in its argument list (where N is greater than one). This could happen, for example, if you set theMAKEenvironment variable to ‘make -j2’. In this case, the sub-makedoesn’t communicate with othermakeprocesses and will simply pretend it has two jobs of its own.- ‘warning: jobserver unavailable: using -j1. Add `+' to parent make rule.’
In order for
makeprocesses to communicate, the parent will pass information to the child. Since this could result in problems if the child process isn’t actually amake, the parent will only do this if it thinks the child is amake. The parent uses the normal algorithms to determine this (see section How theMAKEVariable Works). If the makefile is constructed such that the parent doesn’t know the child is amakeprocess, then the child will receive only part of the information necessary. In this case, the child will generate this warning message and proceed with its build in a sequential manner.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on October 10, 2013 using texi2html 5.0.
