Using the -j option is ignored. About two weeks ago I found out that cmake was compiling with only one thread but everything was ok a couple of months ago. I’m using Debian Trixie which is still in testing so I thought it was a bug, but after many system updates I didn’t saw cmake being updated. I couldn’t find anything after a some searches. Another related issue is that I recently compiled a new version of a qt app with an edit box to set the number of threads for running LLMs, after the last compilation it doesn’t allow to set more than one. Any clue?

  • otacon239@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    I know when I’m doing compiling myself, I add my ‘-j’ along with my make command. I’m a total noob at compiling so this may just be me not understanding that you can put it on either command.

    • corvus@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      yeah, both have same the option, -j N lets you execute the compiling with N parallel jobs. In the case of make using -j without arguments it compiles without setting a limit for parallel jobs.

  • jergos@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    20 days ago

    What build system are you using? Ninja is multithreaded by default so it will be ignored but systems like msbuild, Make, xcodebuild, iirc are single threaded by default and you can promote them to multi threaded by using -j or just passing their multithreaded option like

    cmake --build <binarydir> --config Debug -- /m # msbuild
    

    if cmake is actually ignoring the -j flag. If it is you should create a ticket on cmakes gitlab repo

    • corvus@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      13 days ago

      Both make and cmake are ignoring the j option and some of the software compiled with them also run in a single thread when they shouldn’t, it seems a system problem, could it be an env variable?