how to use a different /bin/sh with GNU Make?

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

how to use a different /bin/sh with GNU Make?

Mark Galeck-2
Hello,
as root, I replaced the default /bin/sh with a shell compiled by me with custom changes.  I expected GNU Make will use that shell by default , but it does not - it still uses the original /bin/sh (which was really bash) even though it is not there anymore.
Why, and how to use a different compiled shell in /bin/sh with GNU Make?  (I know I could force the use of a different shell by reassigning the SHELL variable value.  But I want to know, how to do this with the same default SHELL, just changing the file itself.).   
thank you
Mark
_______________________________________________
Help-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-make
Reply | Threaded
Open this post in threaded view
|

Re: how to use a different /bin/sh with GNU Make?

Tim Murphy-4
/bin/sh is a link to /bin/bash on my machine

if you type echo $SHELL at the commandline what comes up? for me it's
"/bin/bash"

i.e. changing /bin/sh might not be helping you if your make is using
bash just because of the environment setting.

Regards,

Tim

On 13 October 2015 at 07:35, Mark Galeck <[hidden email]> wrote:
> Hello,
> as root, I replaced the default /bin/sh with a shell compiled by me with custom changes.  I expected GNU Make will use that shell by default , but it does not - it still uses the original /bin/sh (which was really bash) even though it is not there anymore.
> Why, and how to use a different compiled shell in /bin/sh with GNU Make?  (I know I could force the use of a different shell by reassigning the SHELL variable value.  But I want to know, how to do this with the same default SHELL, just changing the file itself.).
> thank you
> Mark
> _______________________________________________
> Help-make mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/help-make



--
You could help some brave and decent people to have access to
uncensored news by making a donation at:

http://www.thezimbabwean.co.uk/friends/

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

Re: how to use a different /bin/sh with GNU Make?

Mark Galeck-2
According to the GNU Make manual, the shell that is used to spawn recipe lines, is the value of Make variable $(SHELL) which is by default /bin/sh, unless it is changed in a Makefile.
That is not to be confused of course with the parent shell variable $SHELL, which is something else altogether, and yes, it is /bin/bash on my machine too.  

      From: Tim Murphy <[hidden email]>
 To: Mark Galeck <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
 Sent: Tuesday, October 13, 2015 2:55 AM
 Subject: Re: how to use a different /bin/sh with GNU Make?
   
/bin/sh is a link to /bin/bash on my machine

if you type echo $SHELL at the commandline what comes up? for me it's
"/bin/bash"

i.e. changing /bin/sh might not be helping you if your make is using
bash just because of the environment setting.


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

Re: how to use a different /bin/sh with GNU Make?

Mark Galeck-2
In reply to this post by Tim Murphy-4
I did some more experiments and this is bizarre...
(to remind, I am not changing Make SHELL variable value, I am just manipulating the contents of /bin/sh hoping to get different behaviour)
calling Make function $(shell) yes that does use the modified shellat the same time, recipe line invocation does not !
I also thought perhaps, if SHELL is default, then (contrary to manual says) a new shell instance is not spawned for every line in the recipe, in fact, perhaps a new shell is not spawned at all, but the current shell is used (like execve(<recipe line>) )   .  Nope, I checked the current shell is not used - I ran make under the modified shell, and still, the original shell was still use.
What is worse, even if I move /bin/sh and /bin/bash so they are not even present as files anymore, still Make uses unmodified shell for recipes (where from??)
   
 
_______________________________________________
Help-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-make
Reply | Threaded
Open this post in threaded view
|

Re: how to use a different /bin/sh with GNU Make?

Paul Smith-20
In reply to this post by Mark Galeck-2
On Tue, 2015-10-13 at 04:35 +0000, Mark Galeck wrote:
> as root, I replaced the default /bin/sh with a shell compiled by me
> with custom changes.  I expected GNU Make will use that shell by
> default , but it does not - it still uses the original /bin/sh (which
> was really bash) even though it is not there anymore.

It would be very helpful if you provided an example of the recipe you're
using.  Without that we can only speculate.

GNU make contains a special "fast path" capability.  If it knows that
the shell is a POSIX-compliant shell (because the shell is one of a set
of known POSIX-compliant shells such as /bin/sh, /bin/bash, or others...
for the complete list see the unix_shells[] array in the jobs.c file in
the GNU make source code), and it determines that the recipe is "simple
enough": it's a single command, has no IO redirection or pipes, the
quoting is straightforward, and there are no shell variables in it, then
make runs the command directly rather than invoking a shell.

So for example, this recipe is run directly by make rather than starting
a shell:

   cc -Wall -o foo.o -c foo.c

but this recipe would always start a shell:

   cc -Wall -o foo.o -c foo.c; echo "Compilation complete"

If you want to force make to always start a shell and never use the fast
path the best way is to name your shell something else, like /bin/mgsh
or something, then set make's SHELL variable to that path.  Since make
is no longer sure if your shell is a POSIX shell, it will never use the
fast path.


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

Re: how to use a different /bin/sh with GNU Make?

Mark Galeck-2
Thank you Paul!

Well, the recipe I am using is the simplest possible recipe:
all:    echo $(SHELL)

OK, what do you mean by "runs the command directly rather than invoking a shell" 

I tested that possibility (even though the manual clearly says that is not the case).  I custom modified /bin/sh, then ran that, so that my _current_shell_ was the modified one.  Then _in_that_context_ ran GNU Make with the simple recipe.  
I had shell modified so that each time it interpreted a command, it would print something to a log file.  
Nope.  When I ran GNU Make , the log file was not updated, so that meant, the current modified shell, was not interpreting any command.  

      From: Paul Smith <[hidden email]>
 To: Mark Galeck <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
 Sent: Tuesday, October 13, 2015 5:02 AM
 Subject: Re: how to use a different /bin/sh with GNU Make?
   
On Tue, 2015-10-13 at 04:35 +0000, Mark Galeck wrote:
> as root, I replaced the default /bin/sh with a shell compiled by me
> with custom changes.  I expected GNU Make will use that shell by
> default , but it does not - it still uses the original /bin/sh (which
> was really bash) even though it is not there anymore.

It would be very helpful if you provided an example of the recipe you're
using.  Without that we can only speculate.

GNU make contains a special "fast path" capability.  If it knows that
the shell is a POSIX-compliant shell (because the shell is one of a set
of known POSIX-compliant shells such as /bin/sh, /bin/bash, or others...
for the complete list see the unix_shells[] array in the jobs.c file in
the GNU make source code), and it determines that the recipe is "simple
enough": it's a single command, has no IO redirection or pipes, the
quoting is straightforward, and there are no shell variables in it, then
make runs the command directly rather than invoking a shell.

So for example, this recipe is run directly by make rather than starting


a shell:

  cc -Wall -o foo.o -c foo.c

but this recipe would always start a shell:

  cc -Wall -o foo.o -c foo.c; echo "Compilation complete"

If you want to force make to always start a shell and never use the fast
path the best way is to name your shell something else, like /bin/mgsh
or something, then set make's SHELL variable to that path.  Since make
is no longer sure if your shell is a POSIX shell, it will never use the
fast path.



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

Re: how to use a different /bin/sh with GNU Make?

Tim Murphy-4
Perhaps I can save Paul an explanation: running the shell has some
time cost so if the command looks simple enough then make executes it
without passing  to any shell.

On 13 October 2015 at 15:11, Mark Galeck <[hidden email]> wrote:

> Thank you Paul!
>
> Well, the recipe I am using is the simplest possible recipe:
> all:    echo $(SHELL)
>
> OK, what do you mean by "runs the command directly rather than invoking a shell"
>
> I tested that possibility (even though the manual clearly says that is not the case).  I custom modified /bin/sh, then ran that, so that my _current_shell_ was the modified one.  Then _in_that_context_ ran GNU Make with the simple recipe.
> I had shell modified so that each time it interpreted a command, it would print something to a log file.
> Nope.  When I ran GNU Make , the log file was not updated, so that meant, the current modified shell, was not interpreting any command.
>
>       From: Paul Smith <[hidden email]>
>  To: Mark Galeck <[hidden email]>
> Cc: "[hidden email]" <[hidden email]>
>  Sent: Tuesday, October 13, 2015 5:02 AM
>  Subject: Re: how to use a different /bin/sh with GNU Make?
>
> On Tue, 2015-10-13 at 04:35 +0000, Mark Galeck wrote:
>> as root, I replaced the default /bin/sh with a shell compiled by me
>> with custom changes.  I expected GNU Make will use that shell by
>> default , but it does not - it still uses the original /bin/sh (which
>> was really bash) even though it is not there anymore.
>
> It would be very helpful if you provided an example of the recipe you're
> using.  Without that we can only speculate.
>
> GNU make contains a special "fast path" capability.  If it knows that
> the shell is a POSIX-compliant shell (because the shell is one of a set
> of known POSIX-compliant shells such as /bin/sh, /bin/bash, or others...
> for the complete list see the unix_shells[] array in the jobs.c file in
> the GNU make source code), and it determines that the recipe is "simple
> enough": it's a single command, has no IO redirection or pipes, the
> quoting is straightforward, and there are no shell variables in it, then
> make runs the command directly rather than invoking a shell.
>
> So for example, this recipe is run directly by make rather than starting
>
>
> a shell:
>
>   cc -Wall -o foo.o -c foo.c
>
> but this recipe would always start a shell:
>
>   cc -Wall -o foo.o -c foo.c; echo "Compilation complete"
>
> If you want to force make to always start a shell and never use the fast
> path the best way is to name your shell something else, like /bin/mgsh
> or something, then set make's SHELL variable to that path.  Since make
> is no longer sure if your shell is a POSIX shell, it will never use the
> fast path.
>
>
>
>
> _______________________________________________
> Help-make mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/help-make



--
You could help some brave and decent people to have access to
uncensored news by making a donation at:

http://www.thezimbabwean.co.uk/friends/

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

Re: how to use a different /bin/sh with GNU Make?

Mark Galeck-2
In reply to this post by Paul Smith-20
I mean, I guess my big problem is this.
I have a massively GNU Make recursive system.  (Yes I know it is a bad thing;  I did not write it myself).  
I hacked a shell to do some custom stuff, and I want to use the hacked shell with GNU Make.

I can't very well use the SHELL hack, because that would mean, I would have to modify every single Makefile, of which there are gazillions.
I could (and I am doing it right now) grok the job.c file of GNU Make to figure out how to change it to accept my modified shell.  But it's not easy and I don't really want to hack GNU Make if I can help it.  

Is there another way to get massively recursive GNU Make system to accept a custom shell.  

Thank you,
Mark
      From: Paul Smith <[hidden email]>
 To: Mark Galeck <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
 Sent: Tuesday, October 13, 2015 5:02 AM
 Subject: Re: how to use a different /bin/sh with GNU Make?
   
On Tue, 2015-10-13 at 04:35 +0000, Mark Galeck wrote:
> as root, I replaced the default /bin/sh with a shell compiled by me
> with custom changes.  I expected GNU Make will use that shell by
> default , but it does not - it still uses the original /bin/sh (which
> was really bash) even though it is not there anymore.

It would be very helpful if you provided an example of the recipe you're
using.  Without that we can only speculate.

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

Re: how to use a different /bin/sh with GNU Make?

Mark Galeck-2
In reply to this post by Mark Galeck-2
>If you want to force make to always start a shell and never use the fast


path the best way is to name your shell something else, like /bin/mgsh
or something, then set make's SHELL variable to that path.  Since make
is no longer sure if your shell is a POSIX shell, it will never use the
fast path.




I know that Paul :)  Every child in kindergarten knows the SHELL hack.  Works with one Makefile.  Does not work on a massively recursive system.  That is my problem.  



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

Re: how to use a different /bin/sh with GNU Make?

Tim Murphy-4
""
Likewise variables defined on the command line are passed to the
sub-`make' through `MAKEFLAGS'.  Words in the value of `MAKEFLAGS' that
contain `=', `make' treats as variable definitions just as if they
appeared on the command line.  *Note Overriding Variables: Overriding.
""

I assume this means that you can set it for the top-level make if
there is only one top-level make,

Regards,

Tim

On 13 October 2015 at 15:19, Mark Galeck <[hidden email]> wrote:

>>If you want to force make to always start a shell and never use the fast
>
>
> path the best way is to name your shell something else, like /bin/mgsh
> or something, then set make's SHELL variable to that path.  Since make
> is no longer sure if your shell is a POSIX shell, it will never use the
> fast path.
>
>
>
>
> I know that Paul :)  Every child in kindergarten knows the SHELL hack.  Works with one Makefile.  Does not work on a massively recursive system.  That is my problem.
>
>
>
>
> _______________________________________________
> Help-make mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/help-make



--
You could help some brave and decent people to have access to
uncensored news by making a donation at:

http://www.thezimbabwean.co.uk/friends/

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

Re: how to use a different /bin/sh with GNU Make?

Paul Smith-20
In reply to this post by Mark Galeck-2
On Tue, 2015-10-13 at 12:11 +0000, Mark Galeck wrote:
> Well, the recipe I am using is the simplest possible recipe:
>
> all:
>     echo $(SHELL)

Well that's certainly "simple enough" to allow the fast path method to
work.

> OK, what do you mean by "runs the command directly rather than
> invoking a shell"

I mean that when make sees the command is simple enough, rather than
running a shell then having the shell run the command, make runs the
command directly without invoking the shell.  This saves an entire
fork/exec for simple commands, which is a significant performance
benefit.

> I know that Paul :)  Every child in kindergarten knows the SHELL hack.
> Works with one Makefile.  Does not work on a massively recursive
> system.  That is my problem.

Well, for someone who already knows about this you seemed really
confused about why your shell is not being invoked.

It's not necessarily true that it cannot work for a massively recursive
system.  It's true that it's very difficult for a badly designed
massively recursive system, where there's no common makefile which is
included by all the other makefiles such that you can't make any sort of
centralized change.

> I could (and I am doing it right now) grok the job.c file of GNU Make
> to figure out how to change it to accept my modified shell.  But it's
> not easy and I don't really want to hack GNU Make if I can help it.

All you have to do is change the list of UNIX shells to be empty:

diff --git a/job.c b/job.c
index 244def0..4b345b6 100644
--- a/job.c
+++ b/job.c
@@ -423,6 +423,7 @@ is_bourne_compatible_shell (const char *path)
 {
   /* List of known POSIX (or POSIX-ish) shells.  */
   static const char *unix_shells[] = {
+/*
     "sh",
     "bash",
     "ksh",
@@ -430,6 +431,7 @@ is_bourne_compatible_shell (const char *path)
     "zsh",
     "ash",
     "dash",
+ */
     NULL
   };
   const char **s;

Now make will not consider any shells to be POSIX shells, and it will
never choose the fast path.


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

Re: how to use a different /bin/sh with GNU Make?

Mark Galeck-2
In reply to this post by Tim Murphy-4
>I assume this means that you can set it for the top-level make if
there is only one top-level make,





No I can't, the $(SHELL) variable is special and is not passed in the usual way.  You have to set it separately each time, or pass it every time on $(MAKE) recipe line.  

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

Re: how to use a different /bin/sh with GNU Make?

Mark Galeck-2
In reply to this post by Paul Smith-20
Ha! That's golden Paul , thank you so much for telling me how to hack it.
It's easy for you to know exactly what lines to change, but believe me, for someone who is not involved in the maintenance of GNU Make, the code is very difficult to read and understand.  

Yes if I had a single "common" makefile included everywhere, yes I could just do the SHELL hack, but no...  there isn't one.

The reason why I was confused Sir... is very simple - your manual clearly and unequivocally says, that for every recipe line (unless ONESHELL is used) the new shell process is spawned.  So please forgive me for believing in the literal word of the manual. 

Again, thank you for pointing me how to hack this thing.  I really appreciate.  
Mark


      From: Paul Smith <[hidden email]>
 To: Mark Galeck <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
 Sent: Tuesday, October 13, 2015 5:42 AM
 Subject: Re: how to use a different /bin/sh with GNU Make?
   
On Tue, 2015-10-13 at 12:11 +0000, Mark Galeck wrote:
> Well, the recipe I am using is the simplest possible recipe:
>
> all:
>    echo $(SHELL)

Well that's certainly "simple enough" to allow the fast path method to
work.

> OK, what do you mean by "runs the command directly rather than
> invoking a shell"

I mean that when make sees the command is simple enough, rather than
running a shell then having the shell run the command, make runs the
command directly without invoking the shell.  This saves an entire
fork/exec for simple commands, which is a significant performance
benefit.

> I know that Paul :)  Every child in kindergarten knows the SHELL hack.
> Works with one Makefile.  Does not work on a massively recursive
> system.  That is my problem.

Well, for someone who already knows about this you seemed really
confused about why your shell is not being invoked.

It's not necessarily true that it cannot work for a massively recursive
system.  It's true that it's very difficult for a badly designed
massively recursive system, where there's no common makefile which is
included by all the other makefiles such that you can't make any sort of
centralized change.

> I could (and I am doing it right now) grok the job.c file of GNU Make
> to figure out how to change it to accept my modified shell.  But it's
> not easy and I don't really want to hack GNU Make if I can help it.

All you have to do is change the list of UNIX shells to be empty:

diff --git a/job.c b/job.c
index 244def0..4b345b6 100644
--- a/job.c
+++ b/job.c
@@ -423,6 +423,7 @@ is_bourne_compatible_shell (const char *path)
 {
  /* List of known POSIX (or POSIX-ish) shells.  */
  static const char *unix_shells[] = {
+/*
    "sh",
    "bash",
    "ksh",
@@ -430,6 +431,7 @@ is_bourne_compatible_shell (const char *path)
    "zsh",


    "ash",
    "dash",
+ */
    NULL
  };
  const char **s;

Now make will not consider any shells to be POSIX shells, and it will
never choose the fast path.



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

./configure Make sources runs, but compiled make segfaults - is this a bug?

Mark Galeck-2
Hello,  I have another question today...
I change source of GNU Make a little (thank you Paul for the suggestion!).  
I run ./configure then make (existing make) to build the changed sources.  But then
>./make
immediately segfaults...

Yes this is some non-standard Linux system - a chroot jail in fact.  But ./configure ran successfully, so I thought, I should be able to run the compiled ./make
Is this reasoning correct and does that mean it is a Make bug?
I tried 3.81 - works.  But 4.1, segfaults...

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

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

Tim Murphy-4
Why not build it with -g and run it under gdb? A stack trace would be
very useful to anyone who wants to know what happened.

Regards,

Tim

On 13 October 2015 at 16:37, Mark Galeck <[hidden email]> wrote:

> Hello,  I have another question today...
> I change source of GNU Make a little (thank you Paul for the suggestion!).
> I run ./configure then make (existing make) to build the changed sources.  But then
>>./make
> immediately segfaults...
>
> Yes this is some non-standard Linux system - a chroot jail in fact.  But ./configure ran successfully, so I thought, I should be able to run the compiled ./make
> Is this reasoning correct and does that mean it is a Make bug?
> I tried 3.81 - works.  But 4.1, segfaults...
>
> Mark
> _______________________________________________
> Help-make mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/help-make



--
You could help some brave and decent people to have access to
uncensored news by making a donation at:

http://www.thezimbabwean.co.uk/friends/

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

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

Paul Smith-20
In reply to this post by Mark Galeck-2
On Tue, 2015-10-13 at 13:37 +0000, Mark Galeck wrote:

> Hello,  I have another question today...
> I change source of GNU Make a little (thank you Paul for the
> suggestion!).  
> I run ./configure then make (existing make) to build the changed
> sources.  But then
> >./make
> immediately segfaults...
>
> Yes this is some non-standard Linux system - a chroot jail in fact.
>  But ./configure ran successfully, so I thought, I should be able to
> run the compiled ./make
> Is this reasoning correct and does that mean it is a Make bug?
> I tried 3.81 - works.  But 4.1, segfaults...

I can't give you any advice, based on this information.  Clearly the
source in the 4.1 tarball works, or we'd know about it by now.

You'll have to investigate.  Does the resulting make pass its regression
tests ("make check" after you build it)?  If not, then likely there's
some kind of environmental problem on your system.  If it does but fails
on your makefiles, then likely there's a bug in 4.1 which is tickled by
your makefiles.

Of course you can make the same change I recommended on an older version
of make if that works better for you... this "fast path" facility has
been around since before I started maintaining GNU make.


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

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

Mark Galeck-2
> Does the resulting make pass its regression
tests ("make check" after you build it)?  If not, then likely there's
some kind of environmental problem on your system.  If it does but fails
on your makefiles, then likely there's a bug in 4.1 which is tickled by
your makefiles.



No any make invocation of recompiled 4.1 (without any of my changes) immediately segfaults, including make check.  I know 3.81 binary distribution runs there now, so I tried to recompile 3.81 and yes that does run.






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

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

Dan Kegel-2
On Tue, Oct 13, 2015 at 10:16 AM, Mark Galeck <[hidden email]> wrote:
>> Does the resulting make pass its regression
> tests ("make check" after you build it)?
>
> No any make invocation of recompiled 4.1 (without any of my changes) immediately segfaults, including make check.

How about
   ./make --version
or
   ldd ./make
or
   gdb ./make
   run
   bt
?

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

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

Paul Smith-20
In reply to this post by Mark Galeck-2
On Tue, 2015-10-13 at 17:16 +0000, Mark Galeck wrote:
> No any make invocation of recompiled 4.1 (without any of my changes)
> immediately segfaults, including make check.

OK, well that's pretty clearly an issue with your local environment
then.  You'll have to debug it (Tim's suggestion of using GDB is your
best bet) to determine what's wrong.


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

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

Tim Murphy-4
Mark,

I guess that maybe in your chroot you don't have gdb or strace or
valgrind or whatever?

Does your build of make crash when run outside the chroot?   If it
does then you might be able to get it into a more normal situation.
Dan's idea about using ldd and checking the help are good too as they
might indicate where things are going wrong without needing any
special tools.

Regards,

Tim

On 13 October 2015 at 20:54, Paul Smith <[hidden email]> wrote:

> On Tue, 2015-10-13 at 17:16 +0000, Mark Galeck wrote:
>> No any make invocation of recompiled 4.1 (without any of my changes)
>> immediately segfaults, including make check.
>
> OK, well that's pretty clearly an issue with your local environment
> then.  You'll have to debug it (Tim's suggestion of using GDB is your
> best bet) to determine what's wrong.
>
>
> _______________________________________________
> Help-make mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/help-make



--
You could help some brave and decent people to have access to
uncensored news by making a donation at:

http://www.thezimbabwean.co.uk/friends/

_______________________________________________
Help-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-make
123