make: Fatal error: Command failed for target `clean'

This is a discussion on make: Fatal error: Command failed for target `clean' within the C++ Programming forums, part of the General Programming Boards category; Hi team, I am trying to clean C++ code on solaris 10 but getting below error: Could you please me ...

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    40

    Unhappy make: Fatal error: Command failed for target `clean'

    Hi team,

    I am trying to clean C++ code on solaris 10 but getting below error:
    Could you please me on this?

    rm -f -r ../bin/SunWS_cache
    rm -f CalcServiceStaticData_c.hh CalcServiceStaticData_s.hh CalcServiceStaticData_c.cc CalcServiceStaticData_s.cc ../bin/SDMServer
    *** Error code 2
    make: Fatal error: Command failed for target `clean'
    Current working directory /apps/calc/sds/src
    *** Error code 1
    The following command caused the error:
    cd src ; make clean
    make: Fatal error: Command failed for target `clean'

    I am not able to identify what does it means?
    Please HELP!!!

    Thanks Vaibhav

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    > rm -f CalcServiceStaticData_c.hh CalcServiceStaticData_s.hh CalcServiceStaticData_c.cc CalcServiceStaticData_s.cc ../bin/SDMServer
    If you type this in at the console, without the -f option, what error message do you get?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    40

    Question

    Hi Salem,

    thanks for your response!

    I tried .. first i move to src directory
    then follow your command
    Please check below:

    calcos@nygespappd29:/apps/calc/sds/src> rm CalcServiceStaticData_c.hh CalcServiceStaticData_s.hh CalcServiceStaticData_c.cc CalcServiceStaticData_s.cc ../bin/SDMServer
    rm: CalcServiceStaticData_c.hh: override protection 640 (yes/no)?

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    Well -f would have answered yes to that, so say 'y'

    It seems strange that it would even ask you for such a file, since mode 640 is just rw-r-----, which is writeable by you.
    I can remove such files without being prompted.

    Have you created an alias for rm, like
    alias rm = rm -i

    I figure one of them (possibly the last one) will come back with permission denied or some other error.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    Mar 2009
    Posts
    40
    hi Salem,

    no such error is coming .. about permission denied...

    and there is not alais...
    for rm --> rm -i

  6. #6
    Registered User
    Join Date
    Jun 2005
    Posts
    6,208
    My first guess, like Salem, would be that rm is aliased to something. My second guess is a path problem: so the rm being executed is not the program you expect.

    Check the path settings in the parent shell, and any settings of path done within the makefile. Similarly, check other environment variables.

    Since you apparently have a makefile invoking make in sub-directories, check each makefile involved.
    Right 98% of the time, and don't care about the other 3%.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Makefile Problem: None rule to make target
    By chris24300 in forum Linux Programming
    Replies: 25
    Last Post: 06-17-2009, 09:45 AM
  2. Establishing 'make clean' with GNU make
    By Jesdisciple in forum C Programming
    Replies: 9
    Last Post: 04-11-2009, 09:10 AM
  3. trying to make a KenGen ( for a game tool )
    By lonewolfy in forum C# Programming
    Replies: 4
    Last Post: 03-28-2007, 08:23 AM
  4. Win32 Common Controls in C++, how do i make and use them?
    By C+noob in forum Windows Programming
    Replies: 6
    Last Post: 01-09-2006, 10:53 AM
  5. "Cannot make pipe"
    By crepincdotcom in forum C Programming
    Replies: 5
    Last Post: 08-16-2004, 12:43 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21