Clone this wiki locally
Table of Contents
This project is a version of GNU Make 3.82 that has been modified to fix a few bugs that mainly affect users of Microsoft Windows. We call this version "GNU Make 3.82-pololu2". It was originally created to support users of the Pololu Wixel, but it is full-featured and suitable for anyone. Windows users can download a precompiled make.exe binary in the download section.
This project is based on the official GNU Make 3.82 source distribution.
The official version of GNU Make 3.82 has a bug that causes it to crash and display an error message like this:
make: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x425073)This problem only occurs if the official GNU Make tries to execute a command that requires use of the shell (for example "a && b") and the shell detected by Make has parentheses in its path. This is a problem for Windows users because various programs such as MsysGit install a copy of sh.exe inside the "Program Files (x86)" folder and put it on the PATH. The official GNU Make will detect that copy of sh.exe, try to use it as the shell, and crash. We fixed this bug in Make 3.82-pololu1. We have submitted a patch (#7522) to fix this issue in the offical version of Make. A maintainer of Make acknowledged it and made a similar change so this bug should be gone in Make 4.0.
The official version of GNU Make 3.82 has another bug that occurs whenever it parses a list of prerequisite names and one of the names contains a parenthesis. For example, if your Makefile consisted of the single line "a : b(c" this bug could affect you. The bug causes Make to read past the end of a string into unallocated memory. Sometimes this causes an Access Violation crash and sometimes this causes other symptoms. The bug was fixed in the Make CVS repository in August 2010, but there has been no official release of GNU Make since then. We fixed this bug in Make 3.82-pololu2.
- Install MinGW.
- Download the pololu/make source code from GitHub.
- Run "build_w32.bat gcc release" at a Command Prompt in the source directory. If this completes without errors, the result will be a file named gnumake.exe.
- After following the instructions above to install the prerequisites, run "build_w32.bat gcc debug" at a Command Prompt in the source directory. If this completes without errors, the result will be a file named gnumake.exe.
- If you need to, copy gnumake.exe to a directory that is on your PATH.
- Go to the appropriate directory to reproduce the problem you are having.
- Run 'gdb gnumake'.
- At the gdb prompt, type "run".
- If make crashes, you will see a message like "Program received signal SIGSEGV, Segmentation fault."
- At the gdb prompt, type "where". This command will show you the call stack when the command occurred.
- At the gdb prompt, you can type "help" to get information about more commands.