I'm using make
to build a large project on OSX Lion. The scripts worked fine on OSX up to Snow Leopard, but now it fails.
What happens is that after building certain modules, I get an error similar to the following:
touch my.app/Contents/Resources
touch my.app
make[2]: write error
make[1]: *** [all] Error 1
make: *** [all] Error 1
If I then type make
again it resumes from where it fails and builds successfully (until it hits another such error). It always happens for the same two modules of the project, and I can't for the life of me work out why.
Please let me know if there's any more information I can provide that would be helpful.
Here's the output of make -d
:
...
Finished prerequisites of target file `DesktopConn.o'.
Prerequisite `DesktopConn.cxx' is older than target `DesktopConn.o'.
No need to remake target `DesktopConn.o'.
Considering target file `List.o'.
Looking for an implicit rule for `List.o'.
Trying pattern rule with stem `List'.
Trying implicit prerequisite `/bin/sh: line 1: 6733 Segmentation fault: 11 make all
Reaping losing child 0x102d0ae70 PID 6471
make[1]: *** [all] Error 1
Removing child 0x102d0ae70 PID 6471 from chain.
Reaping losing child 0x10560ee20 PID 6342
make: *** [all] Error 1
Removing child 0x10560ee20 PID 6342 from chain.
I've put the whole make -d
output (extremely verbose) on pastebin.
I've uploaded the Makefile too.
I've downloaded the source for make, built from source on my machine. It still fails at the same point. I've also tried using the make binary from Snow Leopard.
Try taking the SEGV at face value. make is either dereferencing an out-of-bounds pointer, or trying to write memory somewhere out of bounds, or it is trying to extend the stack beyond the process stack size limit. There's nothing you can do about the first two without debugging GNU make, but you can increase the stack limit. Using bash:
ulimit -s hard
raises the soft limit to the hard limit, giving you as much stack space as possible. Try it and see if make can run to completion without crashing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With