help-make
[Top][All Lists]
Advanced

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

Re: GMAKE 3.81 vs GMAKE 4.2


From: Paul Smith
Subject: Re: GMAKE 3.81 vs GMAKE 4.2
Date: Mon, 30 Sep 2019 11:53:11 -0400

It would be helpful if you could teach your email client to properly
quote replies (or find a better one).  Also we prefer inline responses
rather than top-quoting.

On Mon, 2019-09-30 at 19:48 +0530, nikhil jain wrote:
> For example, maybe you're using $(wildcard ...) to gather filenames
> and the difference in the order returned is causing your code to be
> linked differently (in 3.81 I believe wildcard also sorted output
> while in 4.2.1 it doesn't--however in 4.3 it will again).
> 
> Do you confirm the above behavior can impact the binary we are
> building ?

As I tried to point out before, make just runs commands.  It doesn't
even know which of those commands might be compiling code, linking
code, or generating documentation, etc.

So if your particular makefile is written to assume a specific order of
files, then of course changing the order of files will impact the
build.  If your makefile does depend on that order, then it should
hardcode the order of files rather than leaving it up to chance.  Only
you can find out whether that order does or does not matter.

> If Yes, I was hoping all the Make Versions to be backward compatible.
> I had compiled with make 4.0 without any issue. Looks like something
> has changed significantly in 4.2 ?

There are hundreds of thousands of programs (at least) using GNU make
out there, and they all still work.

If you are successful using GNU make 4.0, then it's not related to the
wildcard function sorting: that was changed in 3.82.

We've given you three options for how to find the problem:

1. Try the pre-release of the new version of GNU make.  The downside of
this is that if it works you still don't know what's wrong with your
makefiles and it might break again in the future.

2. Debug the crashing program and figure out why it's crashing, and
determine how that could have been caused by the way the code was
built.  Then either change your code to fix it, or change makefile to
be sure it can't happen again.

3. As Kaz suggested, look very carefully at the full output of the
"working" and "non-working" build logs (compile commands, arguments,
etc.) and check for differences and try to figure out which of those
differences might be causing the problem, then change your makefile to
make sure those differences don't happen in the future.

You might be able to combine #2 and #3.

That's all we can tell you.  You're going to have to do the work to
solve this yourself: it's your makefile and your build system.




reply via email to

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