Node:General trouble, Next:, Previous:Linker accesses other drives, Up:Trouble

6.14 Other kinds of trouble

Q: I've installed DJGPP just like explained in the README.* files, but when I run gcc, my machine crashes/hangs/needs cold boot.

Q: I get errors I can't figure out when I try to compile something.

A: Add the -v switch to the GCC command line and run it again. It will print all the subprograms (compiler passes) it is running. Then you can see which subprogram caused the error, or where your machine crashes. This might give you a hint on what's wrong.

One cause of such problems might be that your system is set up inefficiently. If GCC doesn't get enough free RAM, it will run very slowly, and you might think it crashed when in fact it didn't. (This kind of problem usually happens on memory-starved machines.) Invoking go32-v2 with no arguments will report the amount of memory available to DJGPP programs; large programs might require up to 20MBytes to compile, sometimes more. If you run from the DOS box on Windows 9X, set its DPMI memory property to 65535KB (64MB) and try again. Check out the system configuration advice, earlier in this FAQ list, for other suggestions about your system configuration.

Sometimes, if the TMPDIR environment variable points to a full disk, GCC may hang or crash as well. Make sure you have enough free disk space where TMPDIR points.

A similar case is when DJGPP programs are run off a CD-ROM: in this case, the default setting of TMPDIR points to the CD drive, which is unwritable. You need to point TMPDIR to a writable directory.