5

After some pain and suffering, i managed to install everything necessary for MinGW to work on a computer not on the network.

It worked nicely for a couple days, but now I'm experiencing very long delays before anything starts to happen after i give the "make" command to build my project.

I tried disabling the network, as suggested here: Why is MinGW very slow? But it didn't help.

Note that it's not the actual compilation / linking progress that is slow, but the startup of those processes seems to take forever. 5-10 minutes. Except if i just did it, then it starts in 10-30 seconds.

I know, it used to take a lot longer to load those tapes on Commodore, but over the years I have grown impatient.

Any ideas?

manlio
  • 18,345
  • 14
  • 76
  • 126
0xbaadf00d
  • 2,535
  • 2
  • 24
  • 46
  • trying to connect a license server for some commercial compiler/tool chain, or connecting to SVN server to check version of current code being compiled (calling svn-version from makefile) are the causes which made `make` take long for my case. – Kamyar Souri Dec 20 '11 at 06:49
  • Thanks! The folder does not have any svn tags nor does it use any such tools. I hope someone else has that as a problem and finds that comment helpful :) – 0xbaadf00d Dec 20 '11 at 06:57
  • Are you sure the right `make` is invoked? maybe you have other `make`s in your search paths ? – user1071136 Dec 20 '11 at 14:06
  • 5-10 minutes sounds excessive; even 10-30 seconds before compilation starts seems a lot. When it was working nicely, was that with the same project? You may want to ask this question on the MinGW mailing list. – eriktous Dec 21 '11 at 15:17
  • I made a test using a stop watch this morning, i stopped it at 3:37. It did do something with the disk the whole time, but it wasn't compiling. To my disappointment all i got was "No rule to make target xxx" – 0xbaadf00d Dec 22 '11 at 05:42
  • 2
    Have you tried running `make -d` to see what it's doing behind the scenes? It might help you discern if it is actually doing lots of things before it starts compiling, or if instead the few things that are being done are just incedibly slow. – eriktous Dec 22 '11 at 12:27
  • I'll try that one the next chance I get, Thanks! – 0xbaadf00d Dec 29 '11 at 12:29
  • Oh and it was the same project – 0xbaadf00d Dec 29 '11 at 13:27
  • It's doing a lot of things before it starts to compile, I need to figure out a way to give the log file for use (11 MiB). I can't use dropbox from where I'm now. I wish i had a log file of what happened when it was running faster.. – 0xbaadf00d Jan 02 '12 at 06:52

1 Answers1

10

Try doing make -r (without implicit rules). For me it was a difference between 30 seconds and fraction of a second for single cpp file.

Explanation:

I've had the same problem MinGW make long ago. I've used make -d to investigate. It was then obvious that make uses a gazillion of implicit rules for every dependency file - if my file had dep on shared_ptr.hpp then make checked for shared_ptr.hpp(o|c|cc|v|f|r|.. and dozens other combinations). Of course those files didn't exist. It looks like checking for file mod time/existence (when it doesn't really exist) on Windows platform is a lot slower than on Linux (becouse with Linux i didn't see any difference with/without -r switch).

Sergey K.
  • 24,894
  • 13
  • 106
  • 174