List Info

Thread: Make "Giving up" silently (besides exit code)




Make "Giving up" silently (besides exit code)
country flaguser name
United States
2007-04-23 22:05:13
Hi,

I wonder if anyone can help me - I'm using make 3.81 on Suse
Linux 9.2.
I hit a problem today where I had an error in a make file,
such that a target was reliant upon a prerequiste for which
there was no rule.  It was my fault.

The problem, however, was that make gave no error message at
all - it just exited with status 2.

When I ran it with the -d option, the end of the output was
   Considering target file
`common/protocol/include/dl26/mipv6.h'.
     File `common/protocol/include/dl26/mipv6.h' does not
exist.
      Considering target file
`common/protocol/include/dl26/mipv6.h.built'.
       File `common/protocol/include/dl26/mipv6.h.built'
does not exist.
        Considering target file
`common/protocol/mipv6/dl26/mipv6.c.built'.
         File `common/protocol/mipv6/dl26/mipv6.c.built'
does not exist.
          Considering target file
`common/utils/dl26/g_ntformat'.
           Looking for an implicit rule for
`common/utils/dl26/g_ntformat'.
           No implicit rule found for
`common/utils/dl26/g_ntformat'.
           Finished prerequisites of target file
`common/utils/dl26/g_ntformat'.
          No need to remake target
`common/utils/dl26/g_ntformat'.
          Pruning file
`common/protocol/dl26/locid.h.exists'.
          Pruning file `common/protocol/mipv6/mipv6.s'.
         Finished prerequisites of target file
`common/protocol/mipv6/dl26/mipv6.c.built'.
        Giving up on target file
`common/protocol/mipv6/dl26/mipv6.c.built'.
       Finished prerequisites of target file
`common/protocol/include/dl26/mipv6.h.built'.
      Giving up on target file
`common/protocol/include/dl26/mipv6.h.built'.
     Finished prerequisites of target file
`common/protocol/include/dl26/mipv6.h'.
    Giving up on target file
`common/protocol/include/dl26/mipv6.h'.
   Finished prerequisites of target file
`common/protocol/mipv6/dl26/mipv6dec.o'.
  Giving up on target file
`common/protocol/mipv6/dl26/mipv6dec.o'.
 Finished prerequisites of target file
`common/protocol/mipv6'.
Giving up on target file `common/protocol/mipv6'.

My problem is - I know to use the -d flag in this situation
to see what's really going on - but most people I work with
don't.  They get no info at all.  How can I detect this
problem and give a meaningful error message?  I could modify
make's remake.c source file perhaps - but is there a better
way?

The output without -d is nothing (beside explicit $(info )
statements which I've deleted to avoid confusing anyone:
quokka:/<5>intel/src> make
--warn-undefined-variables --check-symlink-times
--no-builtin-variables --makefile=local.mk r_BUILDDIR=dl26
"DONT_USE_P4=1" "DONT_DO_FINDMODULES=1"
./COMPONENT_CONTENTS=common
common/COMPONENT_CONTENTS=common/protocol
common/protocol/COMPONENT_CONTENTS=common/protocol/mipv6
DONT_DO_FINDMODULES=1 common/protocol/mipv6
quokka:/<5>intel/src> echo $?
2
quokka:/<5>intel/src>                

I can happily provide a full -dpq dump if it helps.

Looking at remake.c, I find
      if (depth == 0 && keep_going_flag
	  && !just_print_flag && !question_flag)
	error (NILF,
               _("Target `%s' not remade because of
errors."), file->name);

Presumably this if statement failed to print because I
didn't have the keep_going_flag (-k?) set?

Thanks for any tips you can give,
John




************************************************************
*********************************************
"This e-mail (and any attachments) is confidential and
privileged information of Catapult Communications"
************************************************************
*********************************************



_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

Re: Make "Giving up" silently (besides exit code)
country flaguser name
United States
2007-04-23 22:30:46
Looking closer at the -d output - I'm guessing the problem
will not make sense unless you can see it all too - attached
(hope it works)

John
On Tuesday 24 April 2007 13:05, John Orr wrote:
> Hi,
> 
> I wonder if anyone can help me - I'm using make 3.81 on
Suse Linux 9.2.
> I hit a problem today where I had an error in a make
file, such that a target was reliant upon a prerequiste for
which there was no rule.  It was my fault.
> 
> The problem, however, was that make gave no error
message at all - it just exited with status 2.
> 
> When I ran it with the -d option, the end of the output
was
>    Considering target file
`common/protocol/include/dl26/mipv6.h'.
>      File `common/protocol/include/dl26/mipv6.h' does
not exist.
>       Considering target file
`common/protocol/include/dl26/mipv6.h.built'.
>        File
`common/protocol/include/dl26/mipv6.h.built' does not
exist.
>         Considering target file
`common/protocol/mipv6/dl26/mipv6.c.built'.
>          File
`common/protocol/mipv6/dl26/mipv6.c.built' does not exist.
>           Considering target file
`common/utils/dl26/g_ntformat'.
>            Looking for an implicit rule for
`common/utils/dl26/g_ntformat'.
>            No implicit rule found for
`common/utils/dl26/g_ntformat'.
>            Finished prerequisites of target file
`common/utils/dl26/g_ntformat'.
>           No need to remake target
`common/utils/dl26/g_ntformat'.
>           Pruning file
`common/protocol/dl26/locid.h.exists'.
>           Pruning file
`common/protocol/mipv6/mipv6.s'.
>          Finished prerequisites of target file
`common/protocol/mipv6/dl26/mipv6.c.built'.
>         Giving up on target file
`common/protocol/mipv6/dl26/mipv6.c.built'.
>        Finished prerequisites of target file
`common/protocol/include/dl26/mipv6.h.built'.
>       Giving up on target file
`common/protocol/include/dl26/mipv6.h.built'.
>      Finished prerequisites of target file
`common/protocol/include/dl26/mipv6.h'.
>     Giving up on target file
`common/protocol/include/dl26/mipv6.h'.
>    Finished prerequisites of target file
`common/protocol/mipv6/dl26/mipv6dec.o'.
>   Giving up on target file
`common/protocol/mipv6/dl26/mipv6dec.o'.
>  Finished prerequisites of target file
`common/protocol/mipv6'.
> Giving up on target file `common/protocol/mipv6'.
> 
> My problem is - I know to use the -d flag in this
situation to see what's really going on - but most people I
work with don't.  They get no info at all.  How can I detect
this problem and give a meaningful error message?  I could
modify make's remake.c source file perhaps - but is there a
better way?
> 
> The output without -d is nothing (beside explicit
$(info ) statements which I've deleted to avoid confusing
anyone:
> quokka:/<5>intel/src> make
--warn-undefined-variables --check-symlink-times
--no-builtin-variables --makefile=local.mk r_BUILDDIR=dl26
"DONT_USE_P4=1" "DONT_DO_FINDMODULES=1"
./COMPONENT_CONTENTS=common
common/COMPONENT_CONTENTS=common/protocol
common/protocol/COMPONENT_CONTENTS=common/protocol/mipv6
DONT_DO_FINDMODULES=1 common/protocol/mipv6
> quokka:/<5>intel/src> echo $?
> 2
> quokka:/<5>intel/src>                
> 
> I can happily provide a full -dpq dump if it helps.
> 
> Looking at remake.c, I find
>       if (depth == 0 && keep_going_flag
> 	  && !just_print_flag &&
!question_flag)
> 	error (NILF,
>                _("Target `%s' not remade because
of errors."), file->name);
> 
> Presumably this if statement failed to print because I
didn't have the keep_going_flag (-k?) set?
> 
> Thanks for any tips you can give,
> John
> 
> 
> 
> 
>
************************************************************
*********************************************
> "This e-mail (and any attachments) is confidential
and privileged information of Catapult Communications"
>
************************************************************
*********************************************
> 
> 
> 
> _______________________________________________
> Help-make mailing list
> Help-makegnu.org
> http:
//lists.gnu.org/mailman/listinfo/help-make
> 

_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

  
Re: Make "Giving up" silently (besides exit code)
user name
2007-04-24 17:51:11
Hi John,

John Orr <john.orrcatapult.com> writes:

> The problem, however, was that make gave no error
message at all - it
> just exited with status 2.

Is your makefile using -include? If so then it maybe bug#
15110:

http://s
avannah.gnu.org/bugs/index.php?15110


-boris


-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis
.com
Open-Source, Cross-Platform C++ XML Data Binding



_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

Re: Make "Giving up" silently (besides exit code)
country flaguser name
United States
2007-04-24 22:20:37
Thanks Boris - yep, I'm fairly sure this is the problem. Bit
of a bummer, dying without any explanation!
Presumably there's not solution to it at present, else you
would have mentioned it... I'll just have to warn my users!
Thanks again,
John

On Wednesday 25 April 2007 08:51, Boris Kolpackov wrote:
> Hi John,
> 
> John Orr <john.orrcatapult.com> writes:
> 
> > The problem, however, was that make gave no error
message at all - it
> > just exited with status 2.
> 
> Is your makefile using -include? If so then it maybe
bug# 15110:
> 
> http://s
avannah.gnu.org/bugs/index.php?15110
> 
> 
> -boris
> 
> 
> -- 
> Boris Kolpackov
> Code Synthesis Tools CC
> http://www.codesynthesis
.com
> Open-Source, Cross-Platform C++ XML Data Binding
> 
> 
> 
> _______________________________________________
> Help-make mailing list
> Help-makegnu.org
> http:
//lists.gnu.org/mailman/listinfo/help-make
> 


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )