Unsolved Qbs profile confusion!
-
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-minimalBut 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 profilesAm I missing something here or?
-
@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!
-
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
-
-
@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
-
@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. -
@jsulm
Thats why I resorted to using sudo earlier.
Thanks for your replyEamonn