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. Qbs profile confusion!
Qt 6.11 is out! See what's new in the release blog

Qbs profile confusion!

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
7 Posts 3 Posters 1.6k Views
  • 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
    eamoc
    wrote on last edited by
    #1

    Hi, newbie here
    So I'm setting up my toolchain configuration as per:

    https://doc.qt.io/qbs/configuring.html
    I go:
    ➜ qbs setup-toolchains --detect
    Trying to detect gcc...
    Profile 'gcc' created for '/bin/gcc'.
    Trying to detect clang...
    Profile 'clang' created for '/bin/clang'.

    I can list my profiles by doing:
    ➜ qbs config --list profiles
    profiles.clang.cpp.toolchainInstallPath: "/bin"
    profiles.clang.qbs.toolchain: ["clang", "llvm", "gcc"]
    profiles.gcc.cpp.toolchainInstallPath: "/bin"
    profiles.gcc.qbs.toolchain: "gcc"

    Then I cd into an example project as instructed:
    cd /usr/share/qtcreator/qbs/share/qbs/examples/helloworld-minimal

    But when I go:
    sudo qbs profile:gcc
    Password:

    I get this:

    Build graph does not yet exist for configuration 'default'. Starting from scratch.
    Resolving project for configuration default
    ERROR: /usr/share/qtcreator/qbs/share/qbs/examples/helloworld-minimal/hello.qbs:53:1 Error while handling product 'HelloWorld-minimal':
    /usr/share/qtcreator/qbs/share/qbs/examples/helloworld-minimal/hello.qbs:53:1 Profile 'gcc' does not exist.

    Profile gcc does not exist, even though it does as per the above command:
    ➜ qbs config --list profiles

    Am I missing something here or?

    aha_1980A 1 Reply Last reply
    0
    • E eamoc

      Hi, newbie here
      So I'm setting up my toolchain configuration as per:

      https://doc.qt.io/qbs/configuring.html
      I go:
      ➜ qbs setup-toolchains --detect
      Trying to detect gcc...
      Profile 'gcc' created for '/bin/gcc'.
      Trying to detect clang...
      Profile 'clang' created for '/bin/clang'.

      I can list my profiles by doing:
      ➜ qbs config --list profiles
      profiles.clang.cpp.toolchainInstallPath: "/bin"
      profiles.clang.qbs.toolchain: ["clang", "llvm", "gcc"]
      profiles.gcc.cpp.toolchainInstallPath: "/bin"
      profiles.gcc.qbs.toolchain: "gcc"

      Then I cd into an example project as instructed:
      cd /usr/share/qtcreator/qbs/share/qbs/examples/helloworld-minimal

      But when I go:
      sudo qbs profile:gcc
      Password:

      I get this:

      Build graph does not yet exist for configuration 'default'. Starting from scratch.
      Resolving project for configuration default
      ERROR: /usr/share/qtcreator/qbs/share/qbs/examples/helloworld-minimal/hello.qbs:53:1 Error while handling product 'HelloWorld-minimal':
      /usr/share/qtcreator/qbs/share/qbs/examples/helloworld-minimal/hello.qbs:53:1 Profile 'gcc' does not exist.

      Profile gcc does not exist, even though it does as per the above command:
      ➜ qbs config --list profiles

      Am I missing something here or?

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @eamoc why do you use sudo?

      That will change your user profile and that is the reason your config is reset.

      I strongly recommend against building software with sudo!

      Qt has to stay free or it will die.

      1 Reply Last reply
      3
      • E Offline
        E Offline
        eamoc
        wrote on last edited by eamoc
        #3

        I was using sudo because I couldn't figure out the error I was getting without it.
        This is what I get otherwise
        ➜ qbs profile: "gcc" ( I also tried it with out quotes )
        ERROR: Unexpected command line parameter 'gcc'.
        Expected an assignment of the form <property>:<value>, profile:<profile-name> or config:<configuration-name>.

        I'm new to qbs, so I figure I'm missing something trivial

        jsulmJ 1 Reply Last reply
        0
        • E eamoc

          I was using sudo because I couldn't figure out the error I was getting without it.
          This is what I get otherwise
          ➜ qbs profile: "gcc" ( I also tried it with out quotes )
          ERROR: Unexpected command line parameter 'gcc'.
          Expected an assignment of the form <property>:<value>, profile:<profile-name> or config:<configuration-name>.

          I'm new to qbs, so I figure I'm missing something trivial

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @eamoc I'm not a QBS expert, but maybe you just need to remove the space:

          qbs profile:gcc
          

          ?

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

          E 1 Reply Last reply
          1
          • jsulmJ jsulm

            @eamoc I'm not a QBS expert, but maybe you just need to remove the space:

            qbs profile:gcc
            

            ?

            E Offline
            E Offline
            eamoc
            wrote on last edited by eamoc
            #5

            @jsulm
            wow, I never thought of that! ... ( sarcasm)

            when I remove the space, I get a different error:

            ➜ qbs profile:gcc
            WARNING: Failed to remove empty directory '/usr/share/qtcreator/qbs/share/qbs/examples/helloworld-minimal/default'.
            ERROR: Cannot lock build graph file '/usr/share/qtcreator/qbs/share/qbs/examples/helloworld-minimal/default/default.bg': Failed to create directory.

            There is no directory called default in there

            jsulmJ 1 Reply Last reply
            0
            • E eamoc

              @jsulm
              wow, I never thought of that! ... ( sarcasm)

              when I remove the space, I get a different error:

              ➜ qbs profile:gcc
              WARNING: Failed to remove empty directory '/usr/share/qtcreator/qbs/share/qbs/examples/helloworld-minimal/default'.
              ERROR: Cannot lock build graph file '/usr/share/qtcreator/qbs/share/qbs/examples/helloworld-minimal/default/default.bg': Failed to create directory.

              There is no directory called default in there

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @eamoc That's because normal users do not have write access to /usr
              You can try to copy this stuff to some directory you have write access to.

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

              E 1 Reply Last reply
              2
              • jsulmJ jsulm

                @eamoc That's because normal users do not have write access to /usr
                You can try to copy this stuff to some directory you have write access to.

                E Offline
                E Offline
                eamoc
                wrote on last edited by
                #7

                @jsulm
                Thats why I resorted to using sudo earlier.
                Thanks for your reply

                Eamonn

                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