Code::Blocks Forums

User forums => Help => Topic started by: guitarro17 on March 24, 2009, 01:29:20 am

Title: Compilation / Build Freezes
Post by: guitarro17 on March 24, 2009, 01:29:20 am
Hello! I have a problem...

Sometimes, when I try to build some project, the compilation freezes forever...
And it stops only if I finish the process "mingw32-g++" and "as.exe"...

It occours about 50~60% of the time, and another times the building is normally...

What can be?

Thx! And sorry for my english, I don't speak english very well :P
Title: Re: Compilation / Build Freezes
Post by: stahta01 on March 24, 2009, 03:23:42 am
It be your hard drive is going bad.
Title: Re: Compilation / Build Freezes
Post by: ollydbg on March 24, 2009, 06:35:54 am
I didn't meet this problem.
I have built OpenCV library, code::blocks , wxWidget library. All these libraries will take several minutes to finish, but the compiler haven't froze. :D
Title: Re: Compilation / Build Freezes
Post by: guitarro17 on March 24, 2009, 04:42:37 pm
It be your hard drive is going bad.


I think you are right, because this happen with the most simple of the codes and with complex too... all codes :(
Title: Re: Compilation / Build Freezes
Post by: bubo on March 24, 2009, 04:55:20 pm
I had this problem too.
If you have Vista:

1. download all recomended OS updates (especialy 1st service pack)
2. download mingw3.4.5 patch for vista (or use newer mingw 4.2.1)
3. DON'T use parallel build (Compiler settings -> "Number of processes for parallel build":  set it to 1!)
4. if you use thirdparty libraries -> rebuild them all with new mingw

Optionaly:
Rarely it freezes when my notebook is in "battery saving" mode (follow 3rd point about parallel build)

I hope it will help
Regards
Title: Re: Compilation / Build Freezes
Post by: guitarro17 on March 24, 2009, 10:14:56 pm
I had this problem too.
If you have Vista:

1. download all recomended OS updates (especialy 1st service pack)
2. download mingw3.4.5 patch for vista (or use newer mingw 4.2.1)
3. DON'T use parallel build (Compiler settings -> "Number of processes for parallel build":  set it to 1!)
4. if you use thirdparty libraries -> rebuild them all with new mingw

Optionaly:
Rarely it freezes when my notebook is in "battery saving" mode (follow 3rd point about parallel build)

I hope it will help
Regards

I don't use Vista, but I will try this!
Where can I find this "Numer of process for parallel build" ?? I can't find this on "Settings -> Compiler and debugger"...

Is it in another place?
Title: Re: Compilation / Build Freezes
Post by: guitarro17 on March 24, 2009, 10:20:12 pm
I found... this is seted to 1 :(
Title: Re: Compilation / Build Freezes
Post by: bubo on March 25, 2009, 11:50:00 am
It freezes when compiler can't create binary (".o") file wich is opened in another process.

Do in Windows:
check disk for errors + defragmentation (standard OS system tools)

Also check this:
Every file, dir, library, search path ... shouldn't have spaces!! Mingw can not handle this well.
Also mingw installation dir shouldn't have space (e.g "C:\Program Files\mingw" is wrong install dir).
Before build your project, look in windows's Task Manager if there isn't any hanging mingw process (cc1.exe cc1plus.exe collect2.exe). If yes end them, rebuild project!
Title: Re: Compilation / Build Freezes
Post by: bubo on March 25, 2009, 12:01:58 pm
OH and I forget one important thing:

When mingw is installed on drive C:\ and project or library is located on another drive (e.g. D:\) mingw goes MAD!