bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62200] Make tries to execute directories name as commands instead


From: Martin Dorey
Subject: [bug #62200] Make tries to execute directories name as commands instead of using shell PATH resulting failure with permission denied
Date: Fri, 18 Mar 2022 20:55:19 -0400 (EDT)

Follow-up Comment #5, bug #62200 (project make):

> typed the recipe command line into your shell prompt
I see the point but I'm not sure I'd put it *quite* that way.  Didn't bash win
the Shell Wars?


martind@sirius:~/tmp/make-62200$ PATH=$(pwd):$PATH /bin/sh -c asdf
/bin/sh: 1: asdf: Permission denied
martind@sirius:~/tmp/make-62200$ PATH=$(pwd):$PATH /bin/bash -c asdf
/bin/bash: asdf: command not found
martind@sirius:~/tmp/make-62200$ 


Perhaps someone else thought the message was worth customizing, probably with
their own localization, as the capitalization, for one thing, suggests it's
not an errno.  Huh, I see we have some commented-out localization for "Command
not found", which goes back in the Gnu Make source to 1992's:


roland@redhat.com   d2e5ab8c57d613ce8955a08fce5c0e453b3038e6:
  if (!search_path (argv[0], path, program))
    error ("%s: Command not found", argv[0]);


> If you rebuild your GNU make 4.3 with the latest gnulib
That would intimidate me and I've submitted patches.  README.git has been
tractable in recent years.  Paul would hate to suggest that you use an earlier
version, because he's more aware than anyone of all the bugs fixed since,
but...

>> I don't have in my PATH the $(pwd) folder
Sorry, I should have been explicit that I didn't want asdf in /usr/local/bin
(and like to promote the semicolon recipe separator), so had changed my test
case to:


martind@sirius:~/tmp/make-62200$ mkdir asdf
martind@sirius:~/tmp/make-62200$ echo 'all:; asdf' > Makefile
martind@sirius:~/tmp/make-62200$ PATH=$(pwd):$PATH ~/download/make/make 
asdf
make: asdf: Permission denied
make: *** [Makefile:1: all] Error 127
martind@sirius:~/tmp/make-62200$ 


I don't think that's materially different from your original asdf case,
though, as Paul says, the cp case *is* likely to be different - that
already-fixed, but after 4.3, bug #57962.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62200>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]