Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Why can't I use -J4 anymore in Build Steps Additional Arguments ?
Forum Updated to NodeBB v4.3 + New Features

Why can't I use -J4 anymore in Build Steps Additional Arguments ?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 3 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    elpidiovaldez5
    wrote on last edited by
    #1

    I always use -J4 as an additional build option to get faster build times by using 4 threads. Suddenly I can't use it any more. I have just installed Qtcreator 4.1.0. Perhaps that is the culprit, but surely this is still possible.

    If I add the option the build does not start and just shows a red progress bar. I am sure I am doing something really obviously wrong, but I can't see it ! The following message is printed:

    02:06:18: Running steps for project Robot...
    02:06:18: Starting: "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" /home/paul/Documents/C++/Robot2016/Robot/Robot/Robot.pro -spec linux-g++-64 CONFIG+=debug -J4
    Usage: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake [mode] [options] [files]
    
    QMake has two modes, one mode for generating project files based on
    some heuristics, and the other for generating makefiles. Normally you
    shouldn't need to specify a mode, as makefile generation is the default
    mode for qmake, but you may use this to test qmake on an existing project
    
    Mode:
      -project       Put qmake into project file generation mode
                     In this mode qmake interprets files as files to
                     be built,
                     defaults to *; *; *; *.ts; *.xlf; *.qrc
                     Note: The created .pro file probably will 
                     need to be edited. For example add the QT variable to 
                     specify what modules are required.
      -makefile      Put qmake into makefile generation mode (default)
                     In this mode qmake interprets files as project files to
                     be processed, if skipped qmake will try to find a project
                     file in your current working directory
    
    Warnings Options:
      -Wnone         Turn off all warnings; specific ones may be re-enabled by
                     later -W options
      -Wall          Turn on all warnings
      -Wparser       Turn on parser warnings
      -Wlogic        Turn on logic warnings (on by default)
      -Wdeprecated   Turn on deprecation warnings (on by default)
    
    Options:
       * You can place any variable assignment in options and it will be     *
       * processed as if it was in [files]. These assignments will be parsed *
       * before [files].                                                     *
      -o file        Write output to file
      -d             Increase debug level
      -t templ       Overrides TEMPLATE as templ
      -tp prefix     Overrides TEMPLATE so that prefix is prefixed into the value
      -help          This help
      -v             Version information
      -after         All variable assignments after this will be
                     parsed after [files]
      -norecursive   Don't do a recursive search
      -recursive     Do a recursive search
      -set <prop> <value> Set persistent property
      -unset <prop>  Unset persistent property
      -query <prop>  Query persistent property. Show all if <prop> is empty.
      -cache file    Use file as cache           [makefile mode only]
      -spec spec     Use spec as QMAKESPEC       [makefile mode only]
      -nocache       Don't use a cache file      [makefile mode only]
      -nodepend      Don't generate dependencies [makefile mode only]
      -nomoc         Don't generate moc targets  [makefile mode only]
      -nopwd         Don't look for files in pwd [project mode only]
    ***Unknown option -J4
    02:06:18: The process "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" exited with code 1.
    Error while building/deploying project Robot (kit: Desktop)
    When executing step "qmake"
    02:06:18: Elapsed time: 00:00.
    
    jsulmJ 1 Reply Last reply
    0
    • Paul ColbyP Offline
      Paul ColbyP Offline
      Paul Colby
      wrote on last edited by Paul Colby
      #2

      Hi @elpidiovaldez5

      As far as I know, qmake has never had support for running multiple jobs in parallel. I wouldn't really expect it to either, since its simply a build script generator (albeit a pretty advanced one). It's actually the make (most platforms) or nmake (Windows) commands that control the builds, so its those commands that you'd want to use -j4 (or equivalent) with.

      For example, on Linux:

      qmake
      make -j4
      

      or on Windows:

      qmake
      nmake /MP4
      

      Cheers.

      1 Reply Last reply
      1
      • E elpidiovaldez5

        I always use -J4 as an additional build option to get faster build times by using 4 threads. Suddenly I can't use it any more. I have just installed Qtcreator 4.1.0. Perhaps that is the culprit, but surely this is still possible.

        If I add the option the build does not start and just shows a red progress bar. I am sure I am doing something really obviously wrong, but I can't see it ! The following message is printed:

        02:06:18: Running steps for project Robot...
        02:06:18: Starting: "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" /home/paul/Documents/C++/Robot2016/Robot/Robot/Robot.pro -spec linux-g++-64 CONFIG+=debug -J4
        Usage: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake [mode] [options] [files]
        
        QMake has two modes, one mode for generating project files based on
        some heuristics, and the other for generating makefiles. Normally you
        shouldn't need to specify a mode, as makefile generation is the default
        mode for qmake, but you may use this to test qmake on an existing project
        
        Mode:
          -project       Put qmake into project file generation mode
                         In this mode qmake interprets files as files to
                         be built,
                         defaults to *; *; *; *.ts; *.xlf; *.qrc
                         Note: The created .pro file probably will 
                         need to be edited. For example add the QT variable to 
                         specify what modules are required.
          -makefile      Put qmake into makefile generation mode (default)
                         In this mode qmake interprets files as project files to
                         be processed, if skipped qmake will try to find a project
                         file in your current working directory
        
        Warnings Options:
          -Wnone         Turn off all warnings; specific ones may be re-enabled by
                         later -W options
          -Wall          Turn on all warnings
          -Wparser       Turn on parser warnings
          -Wlogic        Turn on logic warnings (on by default)
          -Wdeprecated   Turn on deprecation warnings (on by default)
        
        Options:
           * You can place any variable assignment in options and it will be     *
           * processed as if it was in [files]. These assignments will be parsed *
           * before [files].                                                     *
          -o file        Write output to file
          -d             Increase debug level
          -t templ       Overrides TEMPLATE as templ
          -tp prefix     Overrides TEMPLATE so that prefix is prefixed into the value
          -help          This help
          -v             Version information
          -after         All variable assignments after this will be
                         parsed after [files]
          -norecursive   Don't do a recursive search
          -recursive     Do a recursive search
          -set <prop> <value> Set persistent property
          -unset <prop>  Unset persistent property
          -query <prop>  Query persistent property. Show all if <prop> is empty.
          -cache file    Use file as cache           [makefile mode only]
          -spec spec     Use spec as QMAKESPEC       [makefile mode only]
          -nocache       Don't use a cache file      [makefile mode only]
          -nodepend      Don't generate dependencies [makefile mode only]
          -nomoc         Don't generate moc targets  [makefile mode only]
          -nopwd         Don't look for files in pwd [project mode only]
        ***Unknown option -J4
        02:06:18: The process "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" exited with code 1.
        Error while building/deploying project Robot (kit: Desktop)
        When executing step "qmake"
        02:06:18: Elapsed time: 00:00.
        
        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @elpidiovaldez5 To add to @Paul-Colby : shouldn't it be -j4 (not -J4)?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        E 1 Reply Last reply
        1
        • jsulmJ jsulm

          @elpidiovaldez5 To add to @Paul-Colby : shouldn't it be -j4 (not -J4)?

          E Offline
          E Offline
          elpidiovaldez5
          wrote on last edited by
          #4

          @jsulm @Paul-Colby

          Both of you are right, but the stupid thing, that I could not see, was that I was using the qmake arguments field in QtCreator instead of the make arguments field.

          Thanks very much.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved