Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Parallel build make not working as expected
Parallel build make not working as expected [message #1859427] Wed, 07 June 2023 11:27 Go to next message
Giulio Fieramosca is currently offline Giulio FieramoscaFriend
Messages: 2
Registered: June 2023
Junior Member
Hi

I am currently using Eclipse CDT version 2023-03 on Windows, with several "C Managed Build" projects.
At the moment, in the C/C++ Build > Behavior tab I have "Enable parallel build" checked, with "Use optimal jobs" selected. But the actual build operation is sequential and a complete build takes over one minute. If I select the "unlimited jobs" option the parallel build is done in a few seconds.
I have no issue on Linux platform, nor on an older eclipse version, CDT 8.3.0, where some of the projects were created.

I may migrate all the projects to "unlimited jobs" setting, but I'm hoping there is a most efficient way to solve this issue.
Re: Parallel build make not working as expected [message #1859501 is a reply to message #1859427] Mon, 12 June 2023 19:45 Go to previous messageGo to next message
Kabiru Usman is currently offline Kabiru UsmanFriend
Messages: 42
Registered: April 2023
Member

  1. Update your Eclipse and CDT: Although you're already using Eclipse CDT version 2023-03, it might be possible that you're missing some important updates. Ensure your Eclipse and CDT are up-to-date.
  2. Check your machine's core utilization: The "Use optimal jobs" option is designed to use the maximum number of cores available in your machine. If there are other resource-intensive processes running that might be limiting the number of cores available for Eclipse, it could be causing the sequential builds.
  3. Manual Core Allocation: If automatic core allocation isn't working as expected, you could manually set the number of cores Eclipse can use for builds. Instead of "Use optimal jobs", choose "Fixed amount of jobs" and specify the number of cores your machine has.
  4. Modify the ".cproject" file: Each Eclipse CDT project has a ".cproject" file where project-specific settings are stored, including the build configuration. You can try manually modifying this file. Locate the line <option IS_VALUE_EMPTY="false" VALUE="Use optimal jobs" superClass="cdt.managedbuild.tool.gnu.c.compiler.option.jobs"/> and replace "Use optimal jobs" with "unlimited jobs". Make sure to backup the original file before making any changes.


Before applying any changes, make sure to clean the project and rebuild it, to ensure that it isn't a transient issue.
[SOLVED] Re: Parallel build make not working as expected [message #1859505 is a reply to message #1859501] Mon, 12 June 2023 20:06 Go to previous message
Giulio Fieramosca is currently offline Giulio FieramoscaFriend
Messages: 2
Registered: June 2023
Junior Member
Hi Kabiru

Unfortunately I read the forum alert regarding the migration on Github after posting here.
Thinking the message would be discarded, I posted on Github too, my fault.

Anyways, the discussion took place on Github Discussions.
Briefly, the solution was to update make from version 3.81, which was provided by the toolchain environment, to a newer version.
Version 4.4.90 works well, I have to try with stable 4.4.1.

The different behavior between older and newer CDT is due to how makefiles are generated. With CDT 2023-03 there is a nested make call. make v3.81 can't inherit -j option between nested calls while newer one can.
CDT 8.3.0 works well because no nested calls are involved in generated makefiles.

Thank you all for the support
Previous Topic:use own error parser under dosn't work under Linux
Next Topic:compiler error
Goto Forum:
  


Current Time: Mon Jan 20 03:47:15 GMT 2025

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

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

Back to the top