1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<h1 class="appendix"> Errors Generated by Make</h1> <p>Here is a list of the more common errors you might see generated by <code>make</code>, and some information about what they mean and how to fix them. </p> <p>Sometimes <code>make</code> errors are not fatal, especially in the presence of a <code>-</code> prefix on a recipe line, or the <code>-k</code> command line option. Errors that are fatal are prefixed with the string <code>***</code>. </p> <p>Error messages are all either prefixed with the name of the program (usually ‘<samp>make</samp>’), or, if the error is found in a makefile, the name of the file and line number containing the problem. </p> <p>In the table below, these common prefixes are left off. </p> <dl compact> <dt id="[foo] Error NN">‘<samp>[<var>foo</var>] Error <var>NN</var></samp>’</dt> <dt id="[foo] signal description">‘<samp>[<var>foo</var>] <var>signal description</var></samp>’</dt> <dd>
<p>These errors are not really <code>make</code> errors at all. They mean that a program that <code>make</code> invoked as part of a recipe returned a non-0 error code (‘<samp>Error <var>NN</var></samp>’), which <code>make</code> interprets as failure, or it exited in some other abnormal fashion (with a signal of some type). See <a href="errors">Errors in Recipes</a>. </p> <p>If no <code>***</code> is attached to the message, then the sub-process failed but the rule in the makefile was prefixed with the <code>-</code> special character, so <code>make</code> ignored the error. </p> </dd> <dt id="missing separator. Stop.">‘<samp>missing separator. Stop.</samp>’</dt> <dt id="missing separator (did you mean TAB instead of 8 spaces?). Stop.">‘<samp>missing separator (did you mean TAB instead of 8 spaces?). Stop.</samp>’</dt> <dd>
<p>This means that <code>make</code> could not understand much of anything about the makefile line it just read. GNU <code>make</code> looks for various separators (<code>:</code>, <code>=</code>, recipe prefix characters, etc.) to indicate what kind of line it’s parsing. This message means it couldn’t find a valid one. </p> <p>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, <code>make</code> 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 <code>.RECIPEPREFIX</code>; see <a href="special-variables">Special Variables</a>). Eight spaces do not count. See <a href="rule-syntax">Rule Syntax</a>. </p> </dd> <dt id="recipe commences before first target. Stop.">‘<samp>recipe commences before first target. Stop.</samp>’</dt> <dt id="missing rule before recipe. Stop.">‘<samp>missing rule before recipe. Stop.</samp>’</dt> <dd>
<p>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 <code>make</code> directive (such as a variable assignment). Recipes must always be associated with a target. </p> <p>The second form is generated if the line has a semicolon as the first non-whitespace character; <code>make</code> interprets this to mean you left out the "target: prerequisite" section of a rule. See <a href="rule-syntax">Rule Syntax</a>. </p> </dd> <dt id="No rule to make target `xxx'.">‘<samp>No rule to make target `<var>xxx</var>'.</samp>’</dt> <dt id="No rule to make target `xxx', needed by `yyy'.">‘<samp>No rule to make target `<var>xxx</var>', needed by `<var>yyy</var>'.</samp>’</dt> <dd>
<p>This means that <code>make</code> 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). </p> <p>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). </p> </dd> <dt id="No targets specified and no makefile found. Stop.">‘<samp>No targets specified and no makefile found. Stop.</samp>’</dt> <dt id="No targets. Stop.">‘<samp>No targets. Stop.</samp>’</dt> <dd>
<p>The former means that you didn’t provide any targets to be built on the command line, and <code>make</code> couldn’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. GNU <code>make</code> has nothing to do in these situations. See <a href="makefile-arguments">Arguments to Specify the Makefile</a>. </p> </dd> <dt id="Makefile `xxx' was not found.">‘<samp>Makefile `<var>xxx</var>' was not found.</samp>’</dt> <dt id="Included makefile `xxx' was not found.">‘<samp>Included makefile `<var>xxx</var>' was not found.</samp>’</dt> <dd>
<p>A makefile specified on the command line (first form) or included (second form) was not found. </p> </dd> <dt id="warning: overriding recipe for target `xxx'">‘<samp>warning: overriding recipe for target `<var>xxx</var>'</samp>’</dt> <dt id="warning: ignoring old recipe for target `xxx'">‘<samp>warning: ignoring old recipe for target `<var>xxx</var>'</samp>’</dt> <dd>
<p>GNU <code>make</code> allows 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 <a href="multiple-rules">Multiple Rules for One Target</a>. </p> </dd> <dt id="Circular xxx <- yyy dependency dropped.">‘<samp>Circular <var>xxx</var> <- <var>yyy</var> dependency dropped.</samp>’</dt> <dd>
<p>This means that <code>make</code> detected a loop in the dependency graph: after tracing the prerequisite <var>yyy</var> of target <var>xxx</var>, and its prerequisites, etc., one of them depended on <var>xxx</var> again. </p> </dd> <dt id="Recursive variable `xxx' references itself (eventually). Stop.">‘<samp>Recursive variable `<var>xxx</var>' references itself (eventually). Stop.</samp>’</dt> <dd>
<p>This means you’ve defined a normal (recursive) <code>make</code> variable <var>xxx</var> that, when it’s expanded, will refer to itself (<var>xxx</var>). This is not allowed; either use simply-expanded variables (‘<samp>:=</samp>’ or ‘<samp>::=</samp>’) or use the append operator (‘<samp>+=</samp>’). See <a href="using-variables">How to Use Variables</a>. </p> </dd> <dt id="Unterminated variable reference. Stop.">‘<samp>Unterminated variable reference. Stop.</samp>’</dt> <dd>
<p>This means you forgot to provide the proper closing parenthesis or brace in your variable or function reference. </p> </dd> <dt id="insufficient arguments to function `xxx'. Stop.">‘<samp>insufficient arguments to function `<var>xxx</var>'. Stop.</samp>’</dt> <dd>
<p>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 <a href="functions">Functions for Transforming Text</a>. </p> </dd> <dt id="missing target pattern. Stop.">‘<samp>missing target pattern. Stop.</samp>’</dt> <dt id="multiple target patterns. Stop.">‘<samp>multiple target patterns. Stop.</samp>’</dt> <dt id="target pattern contains no `%'. Stop.">‘<samp>target pattern contains no `%'. Stop.</samp>’</dt> <dt id="mixed implicit and static pattern rules. Stop.">‘<samp>mixed implicit and static pattern rules. Stop.</samp>’</dt> <dd>
<p>These errors are generated for malformed static pattern rules (see <a href="static-usage">Syntax of Static Pattern Rules</a>). The first means the target-pattern part of the rule is empty; the second means there are multiple pattern characters (<code>%</code>) in the target-pattern part; the third means there are no pattern characters in the target-pattern part; and the fourth means that all three parts of the static pattern rule contain pattern characters (<code>%</code>)–the first part should not contain pattern characters. </p> <p>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. </p> </dd> <dt id="warning: -jN forced in submake: disabling jobserver mode.">‘<samp>warning: -jN forced in submake: disabling jobserver mode.</samp>’</dt> <dd>
<p>This warning and the next are generated if <code>make</code> detects error conditions related to parallel processing on systems where sub-<code>make</code>s can communicate (see <a href="options_002frecursion">Communicating Options to a Sub-<code>make</code></a>). This warning is generated if a recursive invocation of a <code>make</code> process is forced to have ‘<samp>-j<var>N</var></samp>’ in its argument list (where <var>N</var> is greater than one). This could happen, for example, if you set the <code>MAKE</code> environment variable to ‘<samp>make -j2</samp>’. In this case, the sub-<code>make</code> doesn’t communicate with other <code>make</code> processes and will simply pretend it has two jobs of its own. </p> </dd> <dt id="warning: jobserver unavailable: using -j1. Add `+' to parent make rule.">‘<samp>warning: jobserver unavailable: using -j1. Add `+' to parent make rule.</samp>’</dt> <dd>
<p>In order for <code>make</code> processes to communicate, the parent will pass information to the child. Since this could result in problems if the child process isn’t actually a <code>make</code>, the parent will only do this if it thinks the child is a <code>make</code>. The parent uses the normal algorithms to determine this (see <a href="make-variable">How the <code>MAKE</code> Variable Works</a>). If the makefile is constructed such that the parent doesn’t know the child is a <code>make</code> process, 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. </p> </dd> <dt id="warning: ignoring prerequisites on suffix rule definition">‘<samp>warning: ignoring prerequisites on suffix rule definition</samp>’</dt> <dd>
<p>According to POSIX, a suffix rule cannot contain prerequisites. If a rule that could be a suffix rule has prerequisites it is interpreted as a simple explicit rule, with an odd target name. This requirement is obeyed when POSIX-conforming mode is enabled (the <code>.POSIX</code> target is defined). In versions of GNU <code>make</code> prior to 4.3, no warning was emitted and a suffix rule was created, however all prerequisites were ignored and were not part of the suffix rule. Starting with GNU <code>make</code> 4.3 the behavior is the same, and in addition this warning is generated. In a future version the POSIX-conforming behavior will be the only behavior: no rule with a prerequisite can be suffix rule and this warning will be removed. </p> </dd> </dl><div class="_attribution">
<p class="_attribution-p">
Copyright © 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Free Software Foundation, Inc. <br>Licensed under the GNU Free Documentation License.<br>
<a href="https://www.gnu.org/software/make/manual/html_node/Error-Messages.html" class="_attribution-link">https://www.gnu.org/software/make/manual/html_node/Error-Messages.html</a>
</p>
</div>
|