On Mon, 2019-09-30 at 13:51 +0530, nikhil jain wrote: > There are 2 parts to this problem - > > 1) Build the code using v3.81 and v4.2 -> In both cases, builds is > happening correctly. > 2) Segmentation fault -> While running the binary generated from the build, > it segfaults with v3.81 and works fine with v4.2 > > I hope you will provide some resolution.
I don't see how there's anything we can do about this. It's not a problem in GNU make, it's a problem in your makefile, which you haven't shown us (and based on the reported size of the project, we don't have the capacity to debug even if you did show us). GNU make doesn't compile, assemble, or link any code: it simply invokes shell commands that do whatever your recipes tell them to do. If GNU make doesn't fail then it successfully invoked all your recipes: that's all it knows how to do and the only responsibility it has. There are a number of reasons that using different GNU make versions might have this effect but all of them are specific to your environment and your makefiles and your code. 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). Or maybe something else even more obscure. For a correct build system none of these things should matter (anywhere order does matter, you should be specifying it explicitly) but clearly there's something about your system which is not deterministic. Your only choices are to either (a) continue to use 3.81, or (b) investigate the crash with a debugger or similar and discover why it happens and then figure out what part of your makefile is not repeatable and fix it. Or (c), you could try using the pre-release for the next version of GNU make and see if the problem disappears as mysteriously as it appeared: https://alpha.gnu.org/gnu/make/make-4.2.91.tar.gz If it were me I'd prefer (b): just because it gets fixed in a newer version doesn't mean it won't break again if you don't understand the reason and stop it from happening. _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make