Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: tinyn on August 20, 2007, 02:36:18 am

Title: [FIXED] Build is always fully rebuilding? Recent change?
Post by: tinyn on August 20, 2007, 02:36:18 am
I updated Code::blocks from SVN a few days ago, and noticed that ever since, a Build is always fully rebuilding the project, even if all it needs to do is compile a single .cpp and relink. Was there some change, and code::blocks doesn't know where to look for the current .o's? Is this something I can fix in my project settings, or is this a bug?
Title: Re: Build is always fully rebuilding? Recent change?
Post by: thomas on August 20, 2007, 08:58:10 am
It's not doing that here, so I would guess it's a local problem.
Title: Re: Build is always fully rebuilding? Recent change?
Post by: tinyn on August 22, 2007, 12:50:43 am
Is there anything I can look into to see why its deciding to rebuild everything? I set the build log to print everything, and it just does what commands were executed, it doesn't include anything about how it makes decisions about which files to rebuild, or how it built its internal dependency tree
Title: Re: Build is always fully rebuilding? Recent change?
Post by: stahta01 on August 22, 2007, 01:27:13 am
Is there anything I can look into to see why its deciding to rebuild everything? I set the build log to print everything, and it just does what commands were executed, it doesn't include anything about how it makes decisions about which files to rebuild, or how it built its internal dependency tree

This problem is normally caused by bad file dates, first verify your system clock is correct and then look for files with dates newer than current date and time.

Tim S
Title: Re: Build is always fully rebuilding? Recent change?
Post by: tinyn on August 22, 2007, 03:00:58 am
That was the first thing I checked. System clock is set correctly, ticking along normally. All the file times in my project look right.
Title: Re: Build is always fully rebuilding? Recent change?
Post by: kayamel on August 22, 2007, 04:27:19 pm
I just logged on the forum for the same issue. It's pretty annoying as I have  ots of files in the project.
Title: Re: Build is always fully rebuilding? Recent change?
Post by: tinyn on August 24, 2007, 12:13:47 am
Where in the world does Code::blocks do the modified time check to see if a file needs to be rebuilt? Ive been going over the compiler plugin stuff and I can't find a line thats anything like "fsourcename.GetModifierTime() >= fobjectname.GetModifiedTime()" anywhere in here.
Title: Re: Build is always fully rebuilding? Recent change?
Post by: tinyn on August 25, 2007, 09:19:32 pm
Well, I reverted to svn 4338 (Aug 01) and it still does a full rebuild every time, so I don't think its a recent change. I now think its a project config option set wrong somewhere, but I can't figure out what.
Title: Re: Build is always fully rebuilding? Recent change?
Post by: tinyn on August 26, 2007, 08:07:36 pm
Solution found!

http://forums.codeblocks.org/index.php?topic=6783.msg52004;topicseen#new

Theres a GCC 4.2 bug thats breaking the needs to compile time stuff in plugins/compilergcc/depslib. I fixed it by hand editing the makefile that ./configure created in "src/plugins/compilergcc/depslib/src/Makefile" to make sure it had "-fno-strict-aliasing" in the  "CFLAGS" and "CXXFLAGS" lines. If there is a way to get this done at the ./configure level I would love to hear about it.

The GCC bug is fixed in 4.2.1 I think. Too bad its not in gentoo portage yet.