I’ve been chasing a bug for the last hour or so and found something very bad. I have a very large project with loads of header files and loads of source files that include those header files. I just noticed that when I change a header file in my project it doesn’t rebuild all the source files that include the header files!!!
Has anyone else seen this? It appears that I have to do a “clean” build every time I change a header file. To me, this is a showstopper bug for any build environment.
Please can you elaborate on the use case?
Seems working when all concerned files are part of the same project. Are you including files outside of the workspace, or from another project location?
Please can you provide a concrete (and if possible small) example project reproducing the issue, to let us investigate.
Thanks.
I have hundreds of file, many of which include many of the same header files. If I change a header file then I expect ALL source files which include the header file to be rebuilt. Instead, it appears that it will rebuilt one source file, which include the changed header file, but not all of them. I havn’t been able to figure out the reason why certain source files are rebuilt but not ALL of the others. In one case I have a “configuration.h” header file that is included in ALL of my source files. If I changed it, only one file is rebuilt.
I can’t exactly send you my whole project but if I you want to get in touch with me through the US FAE out of RTP I would be more than glad to setup a net meeting and show you my build environment and reproduce this problem for you.
But that is really just an admission that build system is broken
If you’re going to have to do a full “clean” build every time, there is no point in messing about with all this arcane makefile and dependency stuff - you might as well just have a simple batch file that just compiles each & every file every time.
Right now I always to a “clean” when I change the header file. Even with this system building faster, my project is so large it still takes many minutes to build my project from scratch. I see this as a temperary work around instead of a solution.
No, I get errors in “generated.c”, and when I click on one of those errors, M2MStudio throws up loads of errors and says that it can’t open the editor!
M2M Studio 1.1.1
Copyright (c) Sierra Wireless 2009
Build Version 1.1.1.200911160856-R3160
Before uploading the zip file, I made sure that I could import the project without problems. However, today I get the same problem that you describe. In fact it goes deeper than that, so I’m going to create a new thread for this problem.
However, back to the topic at hand. As importing the previously attached project doesn’t work well, here are some revised steps:
Create a new project in M2M studio, using the default settings.
Copy main.c from the attached zip file to the src directory.
Copy HeaderTest.h from the attached zip file to the inc directory.
Refresh the project.
Build the project with Project->Build All.
In theory, the project should now compile without errors. However, if this is not the case, fix any errors before continuing.
Comment out the line in HeaderTest.h.
Save HeaderTest.h.
Select “Build All” from the the “Project” menu.
The last line of the console output will read “Nothing to build for ”.
Select “Clean…” from the “Project” menu.
Make sure the project is selected, then click “OK”
The build will fail because the macro used in main.c is no longer defined. HeaderTest2.zip (419 Bytes)
1.1.2 has now been released. The problem still exists. Can we at least get official confirmation that this bug has been reproduced by Sierra Wireless? A target date/version for a fix would also be nice.
As far as I am concerned, this bug falls just short of critical. If you can’t trust your build system, how can you trust your application?
I can confirm it. The 1.1.1 and the 1.1.2 has this bug. I will make a clean install on a maschine that has never seen M2MStudio, sorry no… Develeper Studio ( yeah another name change just to confuse everybody ) and start the ExternalStorage_IIC sample just to check it. But if i understand well, the package installer does not leave entries in registry or anywhere else and if we are using different workspaces it shouldn’t be a problem.
Update:
I made a clean install. Installed to defaults. Not changed anything in options. The bug is still there just trying with ExternalStorage_IIC sample.
After investigations and tests, it appears that the bug seems to be fixed in a more recent Eclipse CDT version (6.0.2; Developer Studio 1.1.2 currently includes CDT 6.0.1).
We are preparing a new 1.1.2 build based on this version, and will make it available as a release candidate ASAP. We will communicate this release’s update URL when it will be available.