Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Incremental build not working correctly
Incremental build not working correctly [message #1842516] Tue, 22 June 2021 05:49 Go to next message
Nissan Aloni is currently offline Nissan AloniFriend
Messages: 6
Registered: June 2021
Junior Member
Hi,

I've been advised to duplicate my topic into this forum.
The original thread can be found here: https://www.eclipse.org/forums/index.php?t=msg&th=1108294&goto=1842478&#msg_1842478

I will also copy paste my messages with all the information below this one.

THanks.
Re: Incremental build not working correctly [message #1842517 is a reply to message #1842516] Tue, 22 June 2021 05:50 Go to previous messageGo to next message
Nissan Aloni is currently offline Nissan AloniFriend
Messages: 6
Registered: June 2021
Junior Member
Hi,

I am working with an Eclipse based IDE.
My workspace is composed of 3 projects:
1. BSP
2. A SW library
3. A system project that uses the BSP and library and builds the final target

I noticed that the incremental build has strange behavior.
On first clean - it build all the sources.
On following build nothing is built - as expected.
On a consecutive build - all the files in the 3rd project are built again.
Then nothing is built and then again everything is rebuilt.

How can I debug it?
How can I tell what is causing this behavior - is it a problematic configuration? Is it something that the IDE supplier changed in Eclipse? Is it a bug in Eclipse?

Which log files should I include/investigate to understand the root cause?

Cheers.
Re: Incremental build not working correctly [message #1842518 is a reply to message #1842517] Tue, 22 June 2021 05:50 Go to previous messageGo to next message
Nissan Aloni is currently offline Nissan AloniFriend
Messages: 6
Registered: June 2021
Junior Member
Hi,

I am building C based projects.

I have tried contacting the vendor that supplied the IDE - but so far didn't get any response or support. I was hoping the good and professional folks of this community might more knowledgeable and can direct on where to look for and maybe what to look for.

I saw the following log files are created:
myproj_Debug.build.ui.log
But I didn't see any clue to why the incremental build triggered a full build.

There is also IDE.log file in the workspace. I didn't see anything useful there as well.


Here's the content of .\.metadata\.plugins\org.eclipse.cdt.ui\global-build.log



Nothing to build in platform 'trenz_wrapper'

17:36:11 **** Incremental Build of configuration Debug for project sw_c ****
make -j8 all
make: Nothing to be done for 'all'.
17:36:14 **** Incremental Build of configuration Debug for project myproj ****
make all
make: Nothing to be done for 'all'.
17:36:15 **** Incremental Build of configuration Debug for project myproj_system ****
make -j8 all


but on a consecutive build

Nothing to build in platform 'trenz_wrapper'

17:38:12 **** Incremental Build of configuration Debug for project sw_c ****
make -j8 all
make: Nothing to be done for 'all'.
17:38:15 **** Clean-only build of configuration Debug for project myproj****
make clean


Thanks.
Re: Incremental build not working correctly [message #1842520 is a reply to message #1842518] Tue, 22 June 2021 06:57 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
This will be hard to debug.

Assuming it's a Make problem
Part of the problem might be the -j8 option which may be causing a race condition.
You can get a print out of what make thinks is going on with the --debug=v option
Quote:
includes messages about which makefiles were parsed, prerequisites that did not need to be rebuilt, etc.

For more info:
https://www.gnu.org/software/make/manual/html_node/Options-Summary.html

You might want to get a string of your own debug messages
using the $(info text...) macro
From the Make manual:
https://www.gnu.org/software/make/manual/html_node/Make-Control-Functions.html

Will be very hard to follow when using a parallel build.
All of the above assumes GNU Make.

Possible CDT error
CDT might be causing this behavior.
If so, submit a bug report.
But don't expect much if using a third party plugin.

You should try to debug as much of this as you can before doing so.
Try to form a minimum case that exhibits the problem.
Don't expect any quick fixes but you may get a workaround.

[Updated on: Tue, 22 June 2021 06:58]

Report message to a moderator

Re: Incremental build not working correctly [message #1854613 is a reply to message #1842516] Tue, 30 August 2022 07:16 Go to previous messageGo to next message
Yonatan Lehman is currently offline Yonatan LehmanFriend
Messages: 2
Registered: August 2022
Junior Member
I have also seen this behavior - when I run the make file directly from the shell instead of from Eclipse it works as expected - I only get unexpected builds when building the makefile from Eclipse.

Using --debug=b tells me that it is building because the .o file does not exist - but it's definitely there and even if it's not - it's created and on the next build make says it's not there and builds again.

Did you ever solve this problem or discover the cause ? My workaround will be to always build from the command line - GUIs are for the weak-hearted ;-)
Re: Incremental build not working correctly [message #1854614 is a reply to message #1842516] Tue, 30 August 2022 07:43 Go to previous message
Yonatan Lehman is currently offline Yonatan LehmanFriend
Messages: 2
Registered: August 2022
Junior Member
Found the answer here (mangled so that I can pass a URL get rid of the space)
mcuoneclipse.com / 2015 / 06 / 06 / eclipse-project-refresh-policy-broken-incremental-build-with-external-make/
Make sure your Project Properties > C/C++ Build Refresh policy has your project folder as a Resource
You will need to add it for all configurations
Unfortunately, you will need to check/fix it for all Configurations
Previous Topic:Windows - Importing a Makefile project creates a project with internal builder
Next Topic:Edit Map and Linker File
Goto Forum:
  


Current Time: Thu Apr 25 01:25:08 GMT 2024

Powered by FUDForum. Page generated in 0.03422 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top