Bug 448251 - KDevelop runs make with wrong number of jobs
Summary: KDevelop runs make with wrong number of jobs
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: Make (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-11 09:59 UTC by Benjamin Huth
Modified: 2022-01-13 14:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.8.220400
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Huth 2022-01-11 09:59:15 UTC
SUMMARY
When I use the Unix Makefiles Generator with cmake projects, I can override the default number of jobs for make in the project settings. However, there I see a strange behaviour:
* When I put in 1 job, KDevelop runs "make -j1" as expected
* When I put in 2 jobs, KDevelop also runs "make -j1" -> NOT EXPECTED
* When I put in 3 jobs, KDevelop again runs "make -j3" as expected


STEPS TO REPRODUCE
1. Make a new project, plain cmake C++ e.g.
2. Configure cmake with Unix Makefiles
3. Go to project settings -> make -> check the "override number of jobs"
4. Put in "2" in the field for the jobs

OBSERVED RESULT
KDevelop runs "make -j1"

EXPECTED RESULT
KDevelop should run "make -j2"

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 34, Linux Kernel 5.15.12
(available in About System)
KDE Plasma Version: 5.22.5 (plasmashell --version)
KDE Frameworks Version: KDE Frameworks 5.85.0
Qt Version: Qt 5.15.2 (built against 5.15.2)


ADDITIONAL INFORMATION
KDevelop is compiled by myself against KDE Frameworks from the Fedora repositories
Comment 1 Bug Janitor Service 2022-01-11 14:33:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/323
Comment 2 Igor Grkavac 2022-01-13 14:54:36 UTC
Git commit 9d2ee199b78376a0066d99e5802465ca7153e482 by Igor Grkavac.
Committed on 12/01/2022 at 17:12.
Pushed by igorkushnir into branch 'master'.

makebuilder: Change default number of jobs from 2 to 1

Default NumberOfJobs in makejob.cpp (1) and makebuilderconfig.kcfg (2)
is different. Kdevelop already tries to find the optimal number of threads
if NumberOfJobs field is not overridden. The current default makes
it impossible to override a number of jobs to 2 as NumberOfJobs will
switch to 1 due to makejob.cpp.
FIXED-IN: 5.8.220400

M  +1    -1    plugins/makebuilder/makebuilderconfig.kcfg

https://invent.kde.org/kdevelop/kdevelop/commit/9d2ee199b78376a0066d99e5802465ca7153e482