Hello Nikhil, On Sat, Sep 28, 2019 at 1:54 AM nikhil jain <jainnikhi...@gmail.com> wrote:
> I am seeing very different behaviors in my build between make version 3.81 > and 4.2 > > My build compiles correctly but fails with segmentation fault on 4.2 > version. > My build compiles correctly and executes also correctly on 3.81 version. > As others have pointed out, without knowing which process segmentation faults, it is impossible to know. Also, as others have pointed out, GNU make does not create any artifacts, it only orchestrates the actual tools like preprocessors, compilers, assemblers, librarians, linkers which create the actual artifacts. It is much more likely that the problem was in the Makefile already, and that the switch from GNU make 3.81 to GNU make 4.2 only triggered the issue. For example, when running with -j, there could be a race condition from the dependency tree. The update can shift the timing just slightly enough to trigger the issue. If you want to really know what's going on, it's probably best to install GNU make 3.81 and GNU make 4.2 in parallel. You can run your build in one directory with GNU make 3.81 and in the other directory with GNU make 4.2. Then use a tool like diff to compare the binary files created by the build. Depending on your build tools, they may or may not include timestamps and absolute paths in the files. I hope your build tools don't, because that would make comparing more difficult, you have to take that into account. That comparison can show you what runs differently. Another go could be to run make without -s. I hope that your Makefile doesn't make extensive use of command echo suppression. Command echo suppression should not be used as a replacement of -s, it makes Makefiles difficult to debug. Run both versions of GNU make in parallel and compare the output and run sequence to find out where your Makefile and your tools go wrong with the new version of make. I know you didn't want to install the old version of make. But if you seriously want to understand what is going on and where the problem is, I fear that there is no other way. And in case your Makefile failes, I suggest you better do. Because if you just hotfix the problem to go away without properly understanding it, there's a chance it comes back with the next update or even other unrelated changes to your setup. The build failed with error message related to THREADS. > Is that message coming from GNU make itself or from one of the tools invoked by GNU make? Is there some change in 3.81 vs 4.2 related to threads ? > When it comes to threads, for sure there is, even if the logic is not changed, the other changes will have an influence on the timing behavior. However, such changes should be fine if the Makefile is written correctly, such changes happen between all versions, and such changes in timing can even happen with the same binary if you run on a different CPU, or with different processes in parallel, or even just replace RAM. Please reply. It is urgent for me to provide a Correct compiled product to > my users. > I do not want to switch back to 3.81. > Who wants to, GNU make 4.2 is so much better than 3.81. -- Christian Hujer E: christian.hu...@gmail.com T: @christianhujer +91 77 2003 6661 _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make