[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 19:15:50 -0400 (EDT) |
Follow-up Comment #1, bug #62200 (project make):
Oh no, not error 127 again. The error message here is the strerror form of
EACCES, which currently seems to come (on my build on reasonably modern Linux,
with findprog-in and posix_spawn) from this change:
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=6e6abd0cdfe4bb96f6412aebc511f10bf254a820
... which was from this email discussion:
https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00248.html
... which was a continuation of a discussion inspired by a similar-sounding
Gnu Make issue:
https://savannah.gnu.org/bugs/index.php?57962
... when a directory called perl stopped us from finding the executable later
in the PATH.
The behavior, though, is much older than the current implementation, going
back at least 15 years:
(ia32)martind@sirius:~/tmp/make-62200$ PATH=$(pwd):$PATH make
asdf
make: execvp: asdf: Permission denied
make: *** [all] Error 127
(ia32)martind@sirius:~/tmp/make-62200$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i486-pc-linux-gnu
(ia32)martind@sirius:~/tmp/make-62200$
All that's different with today's git version is that the "execvp: " piece has
gone.
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$ ~/download/make/make --version
GNU Make 4.3.90
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
martind@sirius:~/tmp/make-62200$
That's arguably mandated by:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html
... which sayeth:
> [EACCES]
> The new process image file is not a regular file and the implementation does
not support execution of files of its type.
So I fear this is destined for not-a-bug status, sorry.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62200>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/