[bug #56834] PATH not honored when --disable-posix-spawn is not used

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #56834] PATH not honored when --disable-posix-spawn is not used

Paul D. Smith
URL:
  <https://savannah.gnu.org/bugs/?56834>

                 Summary: PATH not honored when --disable-posix-spawn is not
used
                 Project: make
            Submitted by: None
            Submitted on: Fri 30 Aug 2019 12:20:12 PM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: SCM
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Hello,

When i build (under linux) make-4.2.90 without --disable-posix-spawn (and not
--disable-pthread-spawn, a typo in NEWS), the PATH variable (set in the
Makefile) is not honored. This is new compared to make-4.2.1.

For example:

% cp /bin/true /tmp/truetrue
% cat Makefile
PATH:=/tmp:/usr/bin
all:; truetrue
%

When make-4.2.90 is build with --enable-posix-spawn (the default), return code
is 2 and i get:

% make
truetrue
make: *** [Makefile;2: target] Error 127
%

When make-4.2.90 is build with --disable-posix-spawn, i get the
correct result (and return code is 0):

% make
truetrue
%

Denis Excoffier.





    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #56834] PATH not honored when --disable-posix-spawn is not used

Paul D. Smith
Update of bug #56834 (project make):

                  Status:                    None => Fixed                  
             Assigned to:                    None => psmith                
             Open/Closed:                    Open => Closed                
           Fixed Release:                    None => SCM                    
           Triage Status:                    None => Medium Effort          

    _______________________________________________________

Follow-up Comment #1:

I've pushed a fix for this issue.  It will be available in the next release of
GNU make.  Thanks for testing!

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

Re: [bug #56834] PATH not honored when --disable-posix-spawn is not used

Masahiro Yamada
On Tue, Sep 10, 2019 at 9:09 PM Paul D. Smith <[hidden email]> wrote:

>
> Update of bug #56834 (project make):
>
>                   Status:                    None => Fixed
>              Assigned to:                    None => psmith
>              Open/Closed:                    Open => Closed
>            Fixed Release:                    None => SCM
>            Triage Status:                    None => Medium Effort
>
>     _______________________________________________________
>
> Follow-up Comment #1:
>
> I've pushed a fix for this issue.  It will be available in the next release of
> GNU make.  Thanks for testing!
>
>     _______________________________________________________
>
> Reply to this item at:
>
>   <https://savannah.gnu.org/bugs/?56834>
>
> _______________________________________________
>   Message sent via Savannah
>   https://savannah.gnu.org/
>
>
> _______________________________________________
> Bug-make mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/bug-make



Hi,


I cannot compile from the source since the following commit:

Author: Paul Smith <[hidden email]>
Date:   Fri Sep 6 22:24:46 2019 -0400

    [SV 56834] Support local PATH search with posix_spawnp



I see the following error message on Ubuntu LTS 18.04.

Any hint to compile it?



gcc -DHAVE_CONFIG_H   -Isrc -I/home/masahiro/ref/make/src -Ilib
-I/home/masahiro/ref/make/lib -DLIBDIR=\"/home/masahiro/tools/lib\"
-DINCLUDEDIR=\"/home/masahiro/tools/include\"
-DLOCALEDIR=\"/home/masahiro/tools/share/locale\"
-DMAKE_MAINTAINER_MODE   -C -Wall -Wextra -Werror -Wwrite-strings
-Wshadow -Wdeclaration-after-statement -Wbad-function-cast
-Wformat-security -Wtype-limits -Wunused-but-set-parameter
-Wlogical-op -Wpointer-arith -Wignored-qualifiers -Wformat-signedness
-Wduplicated-cond -g -O2 -MT src/main.o -MD -MP -MF $depbase.Tpo -c -o
src/main.o /home/masahiro/ref/make/src/main.c &&\
mv -f $depbase.Tpo $depbase.Po
/home/masahiro/ref/make/src/job.c:141:11: fatal error: findprog.h: No
such file or directory
 # include "findprog.h"
           ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile;1197: src/job.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/tmp/build-make'
make: *** [Makefile;1283: all-recursive] Error 1



--
Best Regards
Masahiro Yamada

_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

Re: [bug #56834] PATH not honored when --disable-posix-spawn is not used

Paul Smith-20
On Wed, 2019-09-11 at 18:14 +0900, Masahiro Yamada wrote:
> I cannot compile from the source since the following commit:

Your local install of gnulib is too old.  Please pull the very latest
gnulib master HEAD from Git.

I proposed a patch to gnulib's findprog module to provide some
functionality I wanted and Bruno added (a slightly different
implementation).

Unfortunately, not even this will work correctly because right after I
pushed my changes that use this, Bruno pushed another commit that
changed the way the definition of the new function was called which
broke my invocation of it.

If you want to compile from source right now you need to pull the
latest gnulib then do something like:

  git reset --hard 3578d0622666eba42

to get the version that GNU make expects.

I personally think the new change is unnecessary, but if it hasn't been
put back in a day or two I'll change GNU make's call to match.


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make