Re: [Qbs] Reducing clazy noise
On 24 April 2017 at 03:52, Elyzabeth von Reuenthal wrote: > Hi, > > I'm using the clazy plugin[0] for clang to check my source code during > compile. I enabled it like this: > >> // enable clazy if using clang >> Properties { >> condition: cpp.compilerName.contains("clang") >> cpp.cxxFlags: ["-Xclang", "-load", "-Xclang", "ClangLazy.so", "-Xclang", >> "-add-plugin", "-Xclang", "clang-lazy"] >> } > > This however produces warning for both my code, and Qt headers. To fix this, > the readme says: >> If you want to suppress warnings from headers of Qt or 3rd party code, >> include them with -isystem instead of -I. > > How can I achieve this with qbs? I have no clue and I'm looking forward to know the answer too! ;) Chris > > Thanks, > > Ely > > [0]: https://github.com/KDE/clazy > ___ > Qbs mailing list > Qbs@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > ___ Qbs mailing list Qbs@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [Qbs] (no subject)
On 15 December 2016 at 11:20, Ch'Gans wrote: > On 14 December 2016 at 22:51, Christian Kandeler > wrote: >> On 12/13/2016 11:44 PM, Ch'Gans wrote: >>> On 13 December 2016 at 10:22, Ch'Gans wrote: >>>> On 13 December 2016 at 07:32, Jake Petroules wrote: >>>>> Also fails on MinGW :) >>>> >>>> So, i take that this test still passes on non-windows hosts. >>>> Not sure i will have some time today, which is a pity b/c i have >>>> Qt-5.7 on windows here, ans later at home, i only have linux and >>>> macos... :( >>> >>> Any update? Unfortunately, i don't have MCVS 2015, only 2008 and 2013 :( >> >> For MSVC, this was required: https://codereview.qt-project.org/#/c/179583/ >> I don't know about the mingw case. > > I'm not sure clang-check can understand MSVC compiler commands (clang > itself can with 'clang.exe --driver-mode=cl' or simply using > clang-cl.exe). I've found some discussion threads about doing this, > but no concrete solutions. I've just send an email to the clang user > ML, will keep updated. > > Is this failure a regression? Or is it a new test configuration? > > Simply replacing /D with -D might not be enough. > > maybe these 2 clang-check options could come handy: > -extra-arg=- Additional argument to append to the > compiler command line > -extra-arg-before= - Additional argument to prepend to the > compiler command line > > eg, -extra-arg-before=--driver-mode=cl, or something along these lines... This trick does the job to get rid of clang-check complains about 'linker' input unused, and i think is way better than https://codereview.qt-project.org/#/c/179583/ The corecrt.h issue seems to be related to MSVC2015 A quick googling around points to some weird bug about missing an include and lib path, eg: https://llvm.org/bugs/show_bug.cgi?id=23275 https://devtalk.nvidia.com/default/topic/969047/cuda-8-vs2015-corecrt-h-error/?offset=7 The guy's solution was to setup these env: INCLUDE="C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt" LIB="C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64" Maybe qbs-setup-toolchains needs some MSVC2015 tweaks? Chris > > No clue about the mingw case, i would need to try it here... > > Chris > >> >> >> Christian > ___ > Qbs mailing list > Qbs@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs ___ Qbs mailing list Qbs@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
[Qbs] (no subject)
On 14 December 2016 at 22:51, Christian Kandeler wrote: > On 12/13/2016 11:44 PM, Ch'Gans wrote: >> On 13 December 2016 at 10:22, Ch'Gans wrote: >>> On 13 December 2016 at 07:32, Jake Petroules wrote: >>>> Also fails on MinGW :) >>> >>> So, i take that this test still passes on non-windows hosts. >>> Not sure i will have some time today, which is a pity b/c i have >>> Qt-5.7 on windows here, ans later at home, i only have linux and >>> macos... :( >> >> Any update? Unfortunately, i don't have MCVS 2015, only 2008 and 2013 :( > > For MSVC, this was required: https://codereview.qt-project.org/#/c/179583/ > I don't know about the mingw case. I'm not sure clang-check can understand MSVC compiler commands (clang itself can with 'clang.exe --driver-mode=cl' or simply using clang-cl.exe). I've found some discussion threads about doing this, but no concrete solutions. I've just send an email to the clang user ML, will keep updated. Is this failure a regression? Or is it a new test configuration? Simply replacing /D with -D might not be enough. maybe these 2 clang-check options could come handy: -extra-arg=- Additional argument to append to the compiler command line -extra-arg-before= - Additional argument to prepend to the compiler command line eg, -extra-arg-before=--driver-mode=cl, or something along these lines... No clue about the mingw case, i would need to try it here... Chris > > > Christian ___ Qbs mailing list Qbs@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Android and Qbs profiles
On 22 September 2016 at 14:29, Ch'Gans wrote: > Hi all, [...] > According to [4]: "...uploading an APK with armeabi native code will > target 12 more devices than uploading an APK containing armeabi-v7a > native code. The reason for this is that all devices running the > armeabi-v7a are also able to execute the armeabi native code." > > To relate this "12 more devices", the actual numbers of supported > devices are: 7998 for armeabi vs 7986 for armeabi-v7a. Which actually > means that out of 7998 ARM/32 based devices in the Google Play Store > Device database, only 12 don't support armeabi-v7, 12 out of 7998 = > 0.15%, and this number will only go down with time. And Qt has itself dropped ARMv5 starting with Qt-5.6 Chris ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
[QBS] Android and Qbs profiles
Hi all, As highlighted recently on the list, there seems to be a problem with android profiles when trying to build applications. The Qbs Application item infers the "profiles" property. I'm copy/pasting the documentation here for convenience: The profiles for which the product should be built. For each profile listed here, one instance of the product will be built according to the properties set in the respective profile. This property is only relevant for projects that require products being built for different architectures. Otherwise it can be left at its default value. There are a couple of problems with this: - Only ARMv5 and ARMv7 are supported by defaults (no x86-32/64, no ARM-64) - This makes qbs try to build for profiles that don't always exist, without telling the user what is the problem (eg, ERROR: ... The profile 'qt57-and49_x86-armv5te' does not exist.) - This works only if you tell qbs to build using the "android" base profile, and you have used qbs-setup-android to create your android profiles (which will be automatically named "android-$arch") - Combination of the above: doesn't work with Qt profiles or any custom profile unless a strict naming convention is used. And it's not Qbs business to tell user how to name their profiles or is it? - I couldn't find anything about all of these in Qbs documentation Now what is the rational behind all of these? I'm not an Android expert, but after looking on the net, I have the feeling that it is related to multi-arch per APK vs multi-APK for an application relying on native code. And Qbs seems to take the multi-arch per APK approach, that's why it needs to infer the per-arch profiles based on a list of supported architectures. Shouldn't qbs, at least, allow the user to create an APK for a single architecture of his/her choice? Finally, is it really worth all the hassle, for a final result of supporting only two arm architectures, one of each being outdated? Android 4.4+ requires ARMV7 [1], [2] (although, custom builds exists for ARMv6 (aka ARM11) [3]). As of late 2016, 4.4+ mean 4.4, 5.0, 5.1, 6.0 and 7.0 According to [4]: "...uploading an APK with armeabi native code will target 12 more devices than uploading an APK containing armeabi-v7a native code. The reason for this is that all devices running the armeabi-v7a are also able to execute the armeabi native code." To relate this "12 more devices", the actual numbers of supported devices are: 7998 for armeabi vs 7986 for armeabi-v7a. Which actually means that out of 7998 ARM/32 based devices in the Google Play Store Device database, only 12 don't support armeabi-v7, 12 out of 7998 = 0.15%, and this number will only go down with time. Now, you may argue that removing support for ARMv5 won't solve the problem, since multi-arch APK are still useful for supporting both ARMv7 and ARMv8 at the same time... And you would definitely be right! :) As a solution, what about letting the user specify the muli-arch profiles in a master profile? For example, one has to "qbs config profiles.MyProfile.baseProfile MyBaseProfile", what about then: "qbs config profiles.MyProfile.apkProfiles MyQtProfileArmv7,MyQtProfileArmv8,MyQtProfileX86" with MyProfile.apkProfiles defaulting to [MyProfile.baseProfile] This could be complimentary to the current approach: 1. The responsibility of specifying profile association is shifted to the user (or qbs-setup-android + qbs-setup-qt) 2. No hard-coding (even partial) is needed in Qbs support files 3. Application.profiles could be deduced from both Application.architectures and project.profile (I don't know if it's possible in this context to access the "apkProfiles" property of a Qbs profile given it's name) Does that make sense? Chris [1] http://source.android.com/compatibility/cdd.html [2] http://source.android.com/compatibility/4.4/android-4.4-cdd.xhtml#section-3.3 [3] http://stackoverflow.com/questions/28926101/is-it-safe-to-support-only-armeabi-v7a-for-android-4-and-above [4] https://androidbycode.wordpress.com/tag/armeabi-v7a/ ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Support for Qt on Android
Hi Salatix, I finally manage to reproduce your problem! (Update: and found a work around too!) On windows (with git-bash): $ qbs --version 1.6.0 $ qbs-setup-android.exe --ndk-dir /e/Programs/Android/ndk/ --sdk-dir /e/Programs/Android/sdk/ android $ qbs-setup-qt.exe /e/Programs/qt/unified/5.7/android_armv7/bin/qmake.exe qt57-and49_armv7 $ qbs config profiles.qt57-and49_armv7.baseProfile android-armv7a $ cat > helloworld.qbs < main.cpp < int main(int argc, char **argv) { std::cout << "Hello world!" << std::endl; return 0; } EOF $ qbs profile:qt57-and49_armv7 No build graph exists yet for this configuration. Resolving project for configuration default ERROR: H:\test-qbs-android\helloworld.qbs:3:1 The profile 'qt57-and49_armv7-armv5te' does not exist. And now, let's have some fun: $ qbs-setup-qt.exe /e/Programs/qt/unified/5.7/android_x86/bin/qmake.exe qt57-and49_x86 Skipping prl file 'E:/Programs/qt/unified/5.7/android_x86/lib/libQt5Bootstrap.prl', because it cannot be opened (No such file or directory). Skipping prl file 'E:/Programs/qt/unified/5.7/android_x86/lib/libQt5QmlDevTools.prl', because it cannot be opened (No such file or directory). Creating profile 'qt57-and49_x86'. Setting profile 'android-x86' as the base profile for this profile. $ # In this case, Qbs setup the base profile automatically, nice! $ # Let's give it a try... $ qbs build profile:qt57-and49_x86 No build graph exists yet for this configuration. Resolving project for configuration default ERROR: H:\test-qbs-android\helloworld.qbs:3:1 The profile 'qt57-and49_x86-armv5te' does not exist. I don't know how to fix this, but i've pinpointed tricks that won't definitely work in /imports/qbs/base/{Application,Library}.qbs: > property bool isForAndroid: qbs.targetOS.contains("android") > property stringList architectures: isForAndroid ? ["armv5te"] : undefined > profiles: architectures ? architectures.map(function(arch) { return > project.profile + '-' + arch; }) : [project.profile] This is where the '-armv5te' is appended... Since Qbs.Application is a thin wrapper around Qbs.Product, you could try this: $ cat > helloworld.qbs < wrote: > On 20 September 2016 at 03:03, wrote: >> I cleaned up my profiles the way you described and recreated them "manually", >> But sadly I still get error for the missing ...-armv5 profile. >> >> My android toolchains looks just like yours. >> >>> Can you try this, and send the full output (w/o any sort of editing, >>> ideally in an attached file): >>> $ qbs --version >>> $ qbs config --list >> >> I attached the output in txt-Files to the E-Mail. > > Can you try to run your setup on a dead-simple hello world project? > Like, eg helloworld.qbs from > http://doc-snapshots.qt.io/qbs/language-introduction.html > > Chris > >> >> Many thanks, >> >> Tobias >> >>> Gesendet: Montag, 19. September 2016 um 14:09 Uhr >>> Von: Ch'Gans >>> An: sala...@web.de >>> Cc: "qbs@qt-project.org" >>> Betreff: Re: Re: Re: [QBS] Support for Qt on Android >>> >>> On 19 September 2016 at 20:39, wrote: >>> > I followed your instructions to setup the toolchain for Android >>> > but when I try to build a project with >>> > $ qbs profile:"qt57-andgcc49_armv7 >>> > I still get the same error: >>> > "The profile 'qt57-andgcc49_armv7-armv5te' does not exist.". >>> >>> Weird, if your profile is named "qt57-andgcc49_armv7", why Qbs >>> complains about "qt57-andgcc49_armv7-armv5te"? (w/ an extra '-armv5te' >>> suffix) >>> >>> Are you sure you have all the correct Android toolchains installed? >>> >>> Here is my NDK setup (latest release available online): >>> krys@krys-pc:~$ ls -1 /opt/android/android-ndk-r12b/toolchains/ >>> aarch64-linux-android-4.9 >>> arm-linux-androideabi-4.9 >>> llvm >>> mips64el-linux-android-4.9 >>> mipsel-linux-android-4.9 >>> x86-4.9 >>> x86_64-4.9 >>> krys@krys-pc:~$ ls -1 /opt/android/android-ndk-r12b/prebuilt/ >>> android-arm >>> android-arm64 >>> android-mips >>> android-mips64 >>> android-x86 >>> android-x86_64 >>> linux-x86_64 >>> >>> > I also tried using older Qt Version but they did not work either. >>> > At the moment I don't know what else to try. >>> >>> Can you try this, and send the full output (w/o any sort of edit
Re: [QBS] Support for Qt on Android
On 20 September 2016 at 03:03, wrote: > I cleaned up my profiles the way you described and recreated them "manually", > But sadly I still get error for the missing ...-armv5 profile. > > My android toolchains looks just like yours. > >> Can you try this, and send the full output (w/o any sort of editing, >> ideally in an attached file): >> $ qbs --version >> $ qbs config --list > > I attached the output in txt-Files to the E-Mail. Can you try to run your setup on a dead-simple hello world project? Like, eg helloworld.qbs from http://doc-snapshots.qt.io/qbs/language-introduction.html Chris > > Many thanks, > > Tobias > >> Gesendet: Montag, 19. September 2016 um 14:09 Uhr >> Von: Ch'Gans >> An: sala...@web.de >> Cc: "qbs@qt-project.org" >> Betreff: Re: Re: Re: [QBS] Support for Qt on Android >> >> On 19 September 2016 at 20:39, wrote: >> > I followed your instructions to setup the toolchain for Android >> > but when I try to build a project with >> > $ qbs profile:"qt57-andgcc49_armv7 >> > I still get the same error: >> > "The profile 'qt57-andgcc49_armv7-armv5te' does not exist.". >> >> Weird, if your profile is named "qt57-andgcc49_armv7", why Qbs >> complains about "qt57-andgcc49_armv7-armv5te"? (w/ an extra '-armv5te' >> suffix) >> >> Are you sure you have all the correct Android toolchains installed? >> >> Here is my NDK setup (latest release available online): >> krys@krys-pc:~$ ls -1 /opt/android/android-ndk-r12b/toolchains/ >> aarch64-linux-android-4.9 >> arm-linux-androideabi-4.9 >> llvm >> mips64el-linux-android-4.9 >> mipsel-linux-android-4.9 >> x86-4.9 >> x86_64-4.9 >> krys@krys-pc:~$ ls -1 /opt/android/android-ndk-r12b/prebuilt/ >> android-arm >> android-arm64 >> android-mips >> android-mips64 >> android-x86 >> android-x86_64 >> linux-x86_64 >> >> > I also tried using older Qt Version but they did not work either. >> > At the moment I don't know what else to try. >> >> Can you try this, and send the full output (w/o any sort of editing, >> ideally in an attached file): >> $ qbs --version >> $ qbs config --list >> >> For a quick glance at my Qbs setup: >> krys@krys-pc:~$ qbs config profiles | grep architecture >> profiles.android-arm64.qbs.architecture: "arm64" >> profiles.android-armv5te.qbs.architecture: "armv5te" >> profiles.android-armv7a.qbs.architecture: "armv7a" >> profiles.android-mips.qbs.architecture: "mips" >> profiles.android-mips64.qbs.architecture: "mips64" >> profiles.android-x86.qbs.architecture: "x86" >> profiles.android-x86_64.qbs.architecture: "x86_64" >> profiles.clang.qbs.architecture: "x86_64" >> profiles.gcc.qbs.architecture: "x86_64" >> krys@krys-pc:~$ qbs config profiles | grep baseProfile >> profiles.android-arm64.baseProfile: "android" >> profiles.android-armv5te.baseProfile: "android" >> profiles.android-armv7a.baseProfile: "android" >> profiles.android-mips.baseProfile: "android" >> profiles.android-mips64.baseProfile: "android" >> profiles.android-x86.baseProfile: "android" >> profiles.android-x86_64.baseProfile: "android" >> profiles.qbs_autotests.baseProfile: "gcc" >> profiles.qt55-lnxclang38_64.baseProfile: "clang" >> profiles.qt55-lnxgcc53_64.baseProfile: "gcc" >> profiles.qt56-lnxclang38_64.baseProfile: "clang" >> profiles.qt56-lnxgcc53_64.baseProfile: "gcc" >> profiles.qt57-andgcc49_armv7.baseProfile: "android-armv7a" >> profiles.qt57-lnxclang38_64.baseProfile: "clang" >> profiles.qt57-lnxgcc53_64.baseProfile: "gcc" >> krys@krys-pc:~$ qbs config profiles.android >> profiles.android.Android.ndk.appStl: "gnustl_shared" >> profiles.android.Android.ndk.hostArch: "linux-x86_64" >> profiles.android.Android.ndk.ndkDir: "/opt/android/android-ndk-r12b" >> profiles.android.Android.ndk.toolchainVersion: "4.9" >> profiles.android.Android.ndk.toolchainVersionNumber: "4.9" >> profiles.android.Android.sdk.ndkDir: "/opt/android/android-ndk-r12b" >> profiles.android.Android.sdk.sdkDir: "/opt/android/android-sdk-linux" >> profiles.android.qbs.targetOS: ["android", "linux", "unix"] >> prof
Re: [QBS] Support for Qt on Android
On 20 September 2016 at 12:37, Christian Kandeler wrote: > Ch'Gans wrote: > >> BTW, why do i have to set minimumQbsVersion="1.6" in all my >> sub-projects? I thought this was enough to set that up in the >> top-level project... > > Should be fixed in 1.6.1: > https://codereview.qt-project.org/#/c/169207/ Nice one liner bug fix! ;) Will 1.6.1 be pushed in Qt online installer updates? Thanks, Chris > > > Christian > ___ > QBS mailing list > QBS@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Support for Qt on Android
On 19 September 2016 at 20:39, wrote: > I followed your instructions to setup the toolchain for Android > but when I try to build a project with > $ qbs profile:"qt57-andgcc49_armv7 > I still get the same error: > "The profile 'qt57-andgcc49_armv7-armv5te' does not exist.". Weird, if your profile is named "qt57-andgcc49_armv7", why Qbs complains about "qt57-andgcc49_armv7-armv5te"? (w/ an extra '-armv5te' suffix) Are you sure you have all the correct Android toolchains installed? Here is my NDK setup (latest release available online): krys@krys-pc:~$ ls -1 /opt/android/android-ndk-r12b/toolchains/ aarch64-linux-android-4.9 arm-linux-androideabi-4.9 llvm mips64el-linux-android-4.9 mipsel-linux-android-4.9 x86-4.9 x86_64-4.9 krys@krys-pc:~$ ls -1 /opt/android/android-ndk-r12b/prebuilt/ android-arm android-arm64 android-mips android-mips64 android-x86 android-x86_64 linux-x86_64 > I also tried using older Qt Version but they did not work either. > At the moment I don't know what else to try. Can you try this, and send the full output (w/o any sort of editing, ideally in an attached file): $ qbs --version $ qbs config --list For a quick glance at my Qbs setup: krys@krys-pc:~$ qbs config profiles | grep architecture profiles.android-arm64.qbs.architecture: "arm64" profiles.android-armv5te.qbs.architecture: "armv5te" profiles.android-armv7a.qbs.architecture: "armv7a" profiles.android-mips.qbs.architecture: "mips" profiles.android-mips64.qbs.architecture: "mips64" profiles.android-x86.qbs.architecture: "x86" profiles.android-x86_64.qbs.architecture: "x86_64" profiles.clang.qbs.architecture: "x86_64" profiles.gcc.qbs.architecture: "x86_64" krys@krys-pc:~$ qbs config profiles | grep baseProfile profiles.android-arm64.baseProfile: "android" profiles.android-armv5te.baseProfile: "android" profiles.android-armv7a.baseProfile: "android" profiles.android-mips.baseProfile: "android" profiles.android-mips64.baseProfile: "android" profiles.android-x86.baseProfile: "android" profiles.android-x86_64.baseProfile: "android" profiles.qbs_autotests.baseProfile: "gcc" profiles.qt55-lnxclang38_64.baseProfile: "clang" profiles.qt55-lnxgcc53_64.baseProfile: "gcc" profiles.qt56-lnxclang38_64.baseProfile: "clang" profiles.qt56-lnxgcc53_64.baseProfile: "gcc" profiles.qt57-andgcc49_armv7.baseProfile: "android-armv7a" profiles.qt57-lnxclang38_64.baseProfile: "clang" profiles.qt57-lnxgcc53_64.baseProfile: "gcc" krys@krys-pc:~$ qbs config profiles.android profiles.android.Android.ndk.appStl: "gnustl_shared" profiles.android.Android.ndk.hostArch: "linux-x86_64" profiles.android.Android.ndk.ndkDir: "/opt/android/android-ndk-r12b" profiles.android.Android.ndk.toolchainVersion: "4.9" profiles.android.Android.ndk.toolchainVersionNumber: "4.9" profiles.android.Android.sdk.ndkDir: "/opt/android/android-ndk-r12b" profiles.android.Android.sdk.sdkDir: "/opt/android/android-sdk-linux" profiles.android.qbs.targetOS: ["android", "linux", "unix"] profiles.android.qbs.toolchain: "gcc" In the past, I had to nuke my full qbs config because i mixed release and git version of qbs. Since then I'm trying to keep my profiles clean and well organised as I do native Linux/Mac/Windows builds using Gitlab CI system. So, to start from a completely clean state: 1. First, make sure that QtCreator doesn't mess up with your user's Qbs profiles, the checkbox "Store profiles in Qt Creator settings directory" in "Tools->Options->Qbs->Profiles" should be *checked*. 2. Then, try to do a "soft nuke", like: $ mv ~/.config/QtProject/qbs/ ~/.config/QtProject/qbs.old $ mv ~/.config/QtProject/qbs.conf ~/.config/QtProject/qbs.conf.old 3. Finally, start from scratch setting up Qt and Android from the console (not from Qtc). If you have same Android SDK/NDK, same Qbs and same setup as I described (I hope i didn't forget anything), then it should work "same as me"! ;) > I would like to know which version of Qbs you were using? Qbs 1.6.0 that comes with Qtc 4.1.0 as installed/updated by the Qt online installer (released with Qt-5.7 I believe). > and what the Qbs file you are building looks like? Well, i did the test on a "big" project and i didn't save the modifications (project is not ready for android), maybe i should try with a very simple project. Anyway you seem to have a problem with your Qbs profile(s), which should be 100% independent of your Qbs building files. Hope this helps! Chris > Thank you very much for your effort :) > > Tobias &g
Re: [QBS] Support for Qt on Android
On 16 September 2016 at 15:47, Ch'Gans wrote: > On 16 September 2016 at 01:49, wrote: >> I am building on linux. I also tried setting up the toolchain with >> qbs-setup-toolchains but it would not >> detect the android toolchain. So I tried to configure it in the >> qbs-config-ui but it didn't help either >> because I still got the error of the missing armv5 profile (which does not >> make any sense to me >> because I am using armv7...). >> In Qt Creator the profile looks fine to me and the profile it refers to >> actually exists in $HOME/.config >> /QtProject/qbs/ but as I soon as QtC tries to parse the qbs it is looking >> for an armv5 profile which >> does not exist. The issue is similiar to one of the bugs Jake referred to >> https://bugreports.qt.io >> /browse/QBS-881. >> >> Were you able to parse a qbs project with your profile for qt on Android? >> >> Thanks for helping with my problem :) > > This is how far i manage to go: > > # After failing setting up the toolchain manually, i discovered a new > qbs tool... ;) > $ qbs-setup-android --ndk-dir /opt/android/android-ndk-r12b/ --sdk-dir > /opt/android/android-sdk-linux/ android > # Et voilà! (almost) > > $ qbs-setup-qt /opt/Qt/5.7/android_armv7/bin/qmake qt57-andgcc49_armv7 > Creating profile 'qt57-andgcc49_armv7'. > WARNING: You need to set up toolchain information before you can use > this Qt version for building. However, no toolchain profile was found. > Either create one using qbs-setup-toolchains and set it as this > profile's base profile or add the toolchain settings manually to this > profile. > > $ qbs config profiles.qt57-andgcc49_armv7.baseProfile android-armv7a > > # Cannot build my project, qbs tells me to set these up > $ qbs config profiles.android.Android.ndk.toolchainVersion 4.9 > $ qbs config profiles.android.Android.ndk.hostArch linux-x86_64 > $ qbs config profiles.android.Android.ndk.toolchainVersionNumber 4.9 > > At this stage, i can run qbs, but my build fails, due to some weird > STL issues i am currently investigating... (can't find "algorithm" > header) > Qbs tries to build my code with > "-isystem/opt/android/android-ndk-r12b/sources/cxx-stl/system/include", > which should be instead > "-isystem/opt/android/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/" > This is where the header is located, and this is where android-g++ > mkspec points to. > I'm currently investigating the source of > /opt/Qt/Tools/QtCreator/share/qtcreator/qbs/share/qbs/modules/cpp/android-gcc.qbs > > Just found a workaround, i'm pretty sure i should set that in my own > qbs files, but will do for now > $ qbs config profiles.android.Android.ndk.appStl gnustl_shared > > And now trying to solve another issue: > arm-linux-androideabi-g++: error: unrecognized command line option > '--fix-cortex-a8' > > Which is set in > /opt/Qt/Tools/QtCreator/share/qtcreator/qbs/share/qbs/modules/Android/ndk/utils.js > when abi is "armeabi-v7a", which is my case, ... weird! This one is related to the new way (Qbs-1.6) of declaring linkerFlags, I got a warning message about this: WARNING: Enabling linker flags compatibility mode. cpp.linkerFlags and cpp.platformLinkerFlags escaping is handled automatically beginning in Qbs 1.6. When upgrading to Qbs 1.6, you should only pass raw linker flags to these properties; do not escape them using -Wl or -Xlinker. This allows Qbs to automatically supply the correct linker flags regardless of whether the linker chosen is the compiler driver or system linker (see the documentation for cpp.linkerMode for more information). This message can be silenced by setting your Project's minimumQbsVersion to 1.6 (and the new behavior will take effect). My understanding is that the old behaviour is kept if i don't explicitly require Qbs 1.6 (which is my case so far), yet modules/Android/ndk/utils.js returns linker flags without the -Wl prefix, which seems to cause troubles... OK, I have now switched to minimumQbsVersion="1.6", and the error is gone. BTW, why do i have to set minimumQbsVersion="1.6" in all my sub-projects? I thought this was enough to set that up in the top-level project... So, FYI, I am now able to build my whole project for Android as described above! \o/ I now have to work on deployment, and see if it runs! Chris > > Will keep posted! > > Chris > >> >> >>> Gesendet: Donnerstag, 15. September 2016 um 02:07 Uhr >>> Von: "Chris Gagneraud" >>> An: sala...@web.de >>> Cc: "Jake Petroules" , "qbs@qt-project.org" >>> >>> Betre
Re: [QBS] Support for Qt on Android
On 16 September 2016 at 01:49, wrote: > I am building on linux. I also tried setting up the toolchain with > qbs-setup-toolchains but it would not > detect the android toolchain. So I tried to configure it in the > qbs-config-ui but it didn't help either > because I still got the error of the missing armv5 profile (which does not > make any sense to me > because I am using armv7...). > In Qt Creator the profile looks fine to me and the profile it refers to > actually exists in $HOME/.config > /QtProject/qbs/ but as I soon as QtC tries to parse the qbs it is looking for > an armv5 profile which > does not exist. The issue is similiar to one of the bugs Jake referred to > https://bugreports.qt.io > /browse/QBS-881. > > Were you able to parse a qbs project with your profile for qt on Android? > > Thanks for helping with my problem :) This is how far i manage to go: # After failing setting up the toolchain manually, i discovered a new qbs tool... ;) $ qbs-setup-android --ndk-dir /opt/android/android-ndk-r12b/ --sdk-dir /opt/android/android-sdk-linux/ android # Et voilà! (almost) $ qbs-setup-qt /opt/Qt/5.7/android_armv7/bin/qmake qt57-andgcc49_armv7 Creating profile 'qt57-andgcc49_armv7'. WARNING: You need to set up toolchain information before you can use this Qt version for building. However, no toolchain profile was found. Either create one using qbs-setup-toolchains and set it as this profile's base profile or add the toolchain settings manually to this profile. $ qbs config profiles.qt57-andgcc49_armv7.baseProfile android-armv7a # Cannot build my project, qbs tells me to set these up $ qbs config profiles.android.Android.ndk.toolchainVersion 4.9 $ qbs config profiles.android.Android.ndk.hostArch linux-x86_64 $ qbs config profiles.android.Android.ndk.toolchainVersionNumber 4.9 At this stage, i can run qbs, but my build fails, due to some weird STL issues i am currently investigating... (can't find "algorithm" header) Qbs tries to build my code with "-isystem/opt/android/android-ndk-r12b/sources/cxx-stl/system/include", which should be instead "-isystem/opt/android/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/" This is where the header is located, and this is where android-g++ mkspec points to. I'm currently investigating the source of /opt/Qt/Tools/QtCreator/share/qtcreator/qbs/share/qbs/modules/cpp/android-gcc.qbs Just found a workaround, i'm pretty sure i should set that in my own qbs files, but will do for now $ qbs config profiles.android.Android.ndk.appStl gnustl_shared And now trying to solve another issue: arm-linux-androideabi-g++: error: unrecognized command line option '--fix-cortex-a8' Which is set in /opt/Qt/Tools/QtCreator/share/qtcreator/qbs/share/qbs/modules/Android/ndk/utils.js when abi is "armeabi-v7a", which is my case, ... weird! Will keep posted! Chris > > >> Gesendet: Donnerstag, 15. September 2016 um 02:07 Uhr >> Von: "Chris Gagneraud" >> An: sala...@web.de >> Cc: "Jake Petroules" , "qbs@qt-project.org" >> >> Betreff: Re: [QBS] Support for Qt on Android >> >> > QtCreator manage its own Qbs profiles, that you cannot (easily) re-use >> > "manually". >> > Have you try to run "qbs setup-toolchain" and see if it picks up the >> > android one? >> > >> >Chris >> I've just tried here, after installing all Android, Java and Qt >> packages and selecting an android kit, QtC tells me: >> >> Cannot find the android build step. >> Error while building/deploying project XYZ (kit: Android for >> armeabi-v7a (GCC 4.9, Qt 5.7.0)) >> When executing step "Deploy to Android device" >> >> Tools->Options->Qbs seems to be setup correctly >> (cpp.toolchainInstallPath/Prefix points to my Android NDK toolchain) >> >> I had a quick go at setting up the toolchain manually with >> qbs-setup-toolchain, but it refuses to detect the toolchain >> >> Anyway, your problem seems to be different since your associated Qbs >> profile look corrupted/missing. >> >> Which platform are you building on? >> >> On Linux, QtC profiles are stored under $HOME/.config/QtProject/qtcreator/qbs >> >> Whereas your "regular" qbs profiles are stored under >> $HOME/.config/QtProject/qbs/ >> >> Chris > >> ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Support for Qt on Android
On 15 September 2016 at 12:08, Ch'Gans wrote: > On 14 September 2016 at 22:35, wrote: >> Is the Qbs support for Android sufficient to build an Android application >> with Qbs without Qt Creator or would you recommend reverting to qmake in >> order to build for Android? >> Gesendet: Dienstag, 13. September 2016 um 16:24 Uhr >> Von: "Jake Petroules" >> An: "sala...@web.de" >> Cc: "qbs@qt-project.org" >> Betreff: Re: [QBS] Support for Qt on Android >> Android support in Qt Creator with Qbs is unfortunately not yet supported. >> For now, you'll have to build on the command line. >> >> See QBS-881, QBS-992, QBS-991 >> >> >> On Sep 13, 2016, at 5:50 AM, sala...@web.de wrote: >> >> Hi, >> am trying to port an qt application from desktop to Android but so far I am >> out of luck, because I use the qbs build system with a lot of submodules >> also using qbs. When I try to build my application for Android I get the >> following error: >> >> The profile 'qtc_Android__37e8f197-armv5te' does not exist. > > QtCreator manage its own Qbs profiles, that you cannot (easily) re-use > "manually". > Have you try to run "qbs setup-toolchain" and see if it picks up the > android one? I've just tried here, after installing all Android, Java and Qt packages and selecting an android kit, QtC tells me: Cannot find the android build step. Error while building/deploying project XYZ (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.0)) When executing step "Deploy to Android device" Tools->Options->Qbs seems to be setup correctly (cpp.toolchainInstallPath/Prefix points to my Android NDK toolchain) I had a quick go at setting up the toolchain manually with qbs-setup-toolchain, but it refuses to detect the toolchain Anyway, your problem seems to be different since your associated Qbs profile look corrupted/missing. Which platform are you building on? On Linux, QtC profiles are stored under $HOME/.config/QtProject/qtcreator/qbs Whereas your "regular" qbs profiles are stored under $HOME/.config/QtProject/qbs/ Chris > > Chris > >> >> So I would like to know if qbs is supported for qt on Android? >> >> I am using Qt Creator 4.1.0, Qt 5.3.2, and qbs 1.6. >> >> Thanks in advance >> >> Regards, >> >> Tobias >> ___ >> QBS mailing list >> QBS@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs >> >> >> -- >> Jake Petroules - jake.petrou...@qt.io >> Consulting Services Engineer - The Qt Company >> Qbs build tool evangelist - qbs.io >> >> ___ >> QBS mailing list >> QBS@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs >> ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Support for Qt on Android
On 14 September 2016 at 22:35, wrote: > Is the Qbs support for Android sufficient to build an Android application > with Qbs without Qt Creator or would you recommend reverting to qmake in > order to build for Android? > Gesendet: Dienstag, 13. September 2016 um 16:24 Uhr > Von: "Jake Petroules" > An: "sala...@web.de" > Cc: "qbs@qt-project.org" > Betreff: Re: [QBS] Support for Qt on Android > Android support in Qt Creator with Qbs is unfortunately not yet supported. > For now, you'll have to build on the command line. > > See QBS-881, QBS-992, QBS-991 > > > On Sep 13, 2016, at 5:50 AM, sala...@web.de wrote: > > Hi, > am trying to port an qt application from desktop to Android but so far I am > out of luck, because I use the qbs build system with a lot of submodules > also using qbs. When I try to build my application for Android I get the > following error: > > The profile 'qtc_Android__37e8f197-armv5te' does not exist. QtCreator manage its own Qbs profiles, that you cannot (easily) re-use "manually". Have you try to run "qbs setup-toolchain" and see if it picks up the android one? Chris > > So I would like to know if qbs is supported for qt on Android? > > I am using Qt Creator 4.1.0, Qt 5.3.2, and qbs 1.6. > > Thanks in advance > > Regards, > > Tobias > ___ > QBS mailing list > QBS@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > > > -- > Jake Petroules - jake.petrou...@qt.io > Consulting Services Engineer - The Qt Company > Qbs build tool evangelist - qbs.io > > ___ > QBS mailing list > QBS@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Referencing Rule properties
On 30 July 2016 at 07:08, Dennis Tomas wrote: > Am 29.07.2016 um 21:05 schrieb Dennis Tomas: >> >> Rule { >> property string fileName: "resources" > > Sorry, should be baseName of course. Doesn't work either... Have you tried outer.baseName? My 2 cents. >> >> multiplex: true >> Artifact { >> filePath: baseName + ".qrc" // ReferenceError >> fileTags: ["qrc"] >> } >> prepare: { >> [...] >> } >> } > > > ___ > QBS mailing list > QBS@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] How to generate 2 objects from the same source file
On 29 July 2016 at 20:04, Ch'Gans wrote: > On 29 July 2016 at 01:20, Christian Kandeler wrote: >> On 07/28/2016 03:07 PM, Ch'Gans wrote: >>> >>> For testing the clang DB generator[1] I would like to generate 2 >>> objects from the same source file (clang tools should normally check >>> the same source file twice with the 2 different compile commands). >>> >>> Is there a simple way to do that? >>> To keep it simple i would like first.o and second.o to be generated >>> with different preprocessor flags. >> >> >> You can >> - put the files into different products or >> - make a copy of the file or >> - parameterize the respective properties (e.g. cpp.defines) >> and call the generate command twice with different values >> for that parameter. > > I think that what I need is different products with different cpp.defines. > > Any way, right now i'm fighting hard to get the test project "loaded". > > My first step is simply to get the generator running, i have several choices: > - 1 run qbs with a QProcess like TestBlackbox::runQbs() > - 2 use CommandLineFrontend > - 3 instantiate Project "manually" like TestApi::doBuildProject() > > But i'm a bit overwhelmed by the amount of boiler plate i have to write! > Solution 1 seems the less-difficult of all... > Which profile should i use? How to retrieve the profile that has been > used for building Qbs itself? Does it even make sense to attempt to > retrieve it? > Surely, there is to be a way to get a ready-to-use profile for the > auto-tests, still searching tho... > > I would highly appreciate if someone could shed some light on how to > get started. Actually, I thinnk i found my way, running Qbs with QProcess is not that difficult in my case, i don't need all the details I saw in tst_api and tst_buildgraph. For the profile (my user's config doesn't have a default profile), i'm simply capturing the profile name in my test's cpp.defines, and re-use it to call qbs from within the test suite... It feels like a gross hack tho, this won't work if the user built qbs with other important command line arguments, like settings-dir, etc... Anyway, at least i can generate the clang db from within the tests! Chris > > Chris > > >> >> >> Christian >> >> ___ >> QBS mailing list >> QBS@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] How to generate 2 objects from the same source file
On 29 July 2016 at 01:20, Christian Kandeler wrote: > On 07/28/2016 03:07 PM, Ch'Gans wrote: >> >> For testing the clang DB generator[1] I would like to generate 2 >> objects from the same source file (clang tools should normally check >> the same source file twice with the 2 different compile commands). >> >> Is there a simple way to do that? >> To keep it simple i would like first.o and second.o to be generated >> with different preprocessor flags. > > > You can > - put the files into different products or > - make a copy of the file or > - parameterize the respective properties (e.g. cpp.defines) > and call the generate command twice with different values > for that parameter. I think that what I need is different products with different cpp.defines. Any way, right now i'm fighting hard to get the test project "loaded". My first step is simply to get the generator running, i have several choices: - 1 run qbs with a QProcess like TestBlackbox::runQbs() - 2 use CommandLineFrontend - 3 instantiate Project "manually" like TestApi::doBuildProject() But i'm a bit overwhelmed by the amount of boiler plate i have to write! Solution 1 seems the less-difficult of all... Which profile should i use? How to retrieve the profile that has been used for building Qbs itself? Does it even make sense to attempt to retrieve it? Surely, there is to be a way to get a ready-to-use profile for the auto-tests, still searching tho... I would highly appreciate if someone could shed some light on how to get started. Chris > > > Christian > > ___ > QBS mailing list > QBS@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
[QBS] How to generate 2 objects from the same source file
Hi there, For testing the clang DB generator[1] I would like to generate 2 objects from the same source file (clang tools should normally check the same source file twice with the 2 different compile commands). Is there a simple way to do that? To keep it simple i would like first.o and second.o to be generated with different preprocessor flags. Thanks Chris ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] How to run autotests from install-root
On 1 July 2016 at 19:15, Christian Kandeler wrote: > On 07/01/2016 05:23 AM, Ch'Gans wrote: >> >> Some of my unit tests require that the project is fully built and >> installed, and that they run from the same directory as the real >> application. > > > Makes sense. > >> By default "qbs build -p autotest-runner" execute the tests from their >> build directory, is there any way to get qbs run them from the install >> root? > > > Unfortunately not, but it shouldn't be hard to add that. Can you please file > a bug report? Here you go: https://bugreports.qt.io/browse/QBS-993 Chris > > > Christian > > ___ > QBS mailing list > QBS@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] How to run autotests from install-root
On 1 July 2016 at 18:21, BUSSE Andre - Contractor wrote: > Hi Chris, > try this: > > $> qbs run -p autotest-runner Hi Andre, Doesn't work here (Qbs 1.5.1): ERROR: Cannot run: Product 'autotest-runner' is not an application. Chris > > Good Luck! > > CU, > Andre > > > -Ursprüngliche Nachricht- > Von: QBS > [mailto:qbs-bounces+andre.busse=external.thalesgroup@qt-project.org] Im > Auftrag von Ch'Gans > Gesendet: Freitag, 1. Juli 2016 05:24 > An: qbs > Betreff: [QBS] How to run autotests from install-root > > Hi there, > > Some of my unit tests require that the project is fully built and installed, > and that they run from the same directory as the real application. > By default "qbs build -p autotest-runner" execute the tests from their build > directory, is there any way to get qbs run them from the install root? > > Here is my Autotest.qbs: > -- > import qbs > > Product { > type: ["application", "autotest"] > Depends { name: "Qt.test" } > targetName: "tst_" + name.split(' ').join("") > destinationDirectory: project.bin_path > > Group { > fileTagsFilter: product.type > qbs.install: true > qbs.installDir: project.bin_path > } > } > -- > > Thanks, > Chris > ___ > QBS mailing list > QBS@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
[QBS] How to run autotests from install-root
Hi there, Some of my unit tests require that the project is fully built and installed, and that they run from the same directory as the real application. By default "qbs build -p autotest-runner" execute the tests from their build directory, is there any way to get qbs run them from the install root? Here is my Autotest.qbs: -- import qbs Product { type: ["application", "autotest"] Depends { name: "Qt.test" } targetName: "tst_" + name.split(' ').join("") destinationDirectory: project.bin_path Group { fileTagsFilter: product.type qbs.install: true qbs.installDir: project.bin_path } } -- Thanks, Chris ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Autotest runner and Qt plugin path
On 19 June 2016 at 20:51, Ch'Gans wrote: > On 19 June 2016 at 19:38, Jake Petroules wrote: >> AutotestRunner (https://doc.qt.io/qbs/autotestrunner-item.html) provides an >> environment property that you can use to control the environment that your >> tests are run with. Create an item derived from AutotestRunner, like so: >> >> AutotestRunner { >> Depends { name: "Qt.core" } >> environment: base.concat(["QT_PLUGIN_PATH=" + Qt.core.pluginPath]) >> } > > Thanks a lot Jake, somehow I missed that one! Actually it now works in CI environment, but it broke executing the tests via QtC. The work-around is to set the environement to 'clean' *and* unset *all* QtC overrides (namely LD_LIBRARY_PATH, PATH, QBS_RUN_FILE_PATH and QTDIR. I tried to selectively unset them (in a combinatorial-ish way) and it seem that I really need to unset *all* of them. Not sure what's going on there... Chris > >> >> ...and then use that in place of AutotestRunner. In fact, I'd argue that we >> should provide this by default in qbs as "QtAutotestRunner", so maybe look >> for that in a future release. :) > > Sounds like a good idea, if this is a typical workaround people have to do. > > Thanks again, > Chris > >> >> Good luck! >> >> On Jun 19, 2016, at 12:23 AM, Ch'Gans wrote: >> >> Hi there, >> >> I'm using the Autorunner for my project to run my automated unit tests. >> I am using multi QBS profile (Qt version/toolchains) with no default >> profile. >> >> When using QtCreator on my dev machine to run my autotests everything >> is fine, when using qbs command line within my CI system the tests >> fail because of the app being unable unable to find the required Qt >> Plugins. >> My command looks like: qbs build -p autotest-runner profile:qt57-lnxgcc53_64 >> >> One way to solve this on CI is to export QT_QPA_PLATFORM_PLUGIN_PATH >> in the shell before running Qbs, something I don't want to do since >> the plugin path depends on the profile and i want to use a clean and >> predictable shell env. (Note: exporting QTDIR didn't do the trick) >> >> I have tried to use 'qbs.setupBuildEnvironment: { >> Environment.putEnv('QT_QPA_PLATFORM_PLUGIN_PATH', Qt.core.pluginPath); >> }' inside my product definition, but then Qbs complains that it cannot >> find the variable 'Qt'. >> >> Ideally i would like a simple solution that work out of the box. I >> don't want to go with qt.conf or the likes. >> >> So my question is: What is the best way to build/setup my >> autotest-runner environment so that it can load Qt plugins correctly? >> >> Notes: >> * CI doesn't have an XServer runniing, so i'm trying to use the >> 'offscreen' platform plugin, anyway this is not the source of my >> problem, since by default the testapp try to load xcb and it doesn't >> work for the reason explained above >> * my test application's rpath contains >> "/path/to/qt/unifed/5.X/gcc_64/lib" where 5.X correspond to the Qt >> version defined for the Qbs profile in use. >> * For now I'm only dealing with Linux, but later I would like to exec >> my tests on Windows, and eventually on MacOSX too. >> >> Thanks in advance for any information that could shed some light on >> how to achieve that 'the right way' (tm) with Qbs, >> Chris >> ___ >> QBS mailing list >> QBS@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs >> >> >> -- >> Jake Petroules - jake.petrou...@qt.io >> Consulting Services Engineer - The Qt Company >> Qbs build system evangelist - qbs.io >> ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Autotest runner and Qt plugin path
On 19 June 2016 at 19:38, Jake Petroules wrote: > AutotestRunner (https://doc.qt.io/qbs/autotestrunner-item.html) provides an > environment property that you can use to control the environment that your > tests are run with. Create an item derived from AutotestRunner, like so: > > AutotestRunner { > Depends { name: "Qt.core" } > environment: base.concat(["QT_PLUGIN_PATH=" + Qt.core.pluginPath]) > } Thanks a lot Jake, somehow I missed that one! > > ...and then use that in place of AutotestRunner. In fact, I'd argue that we > should provide this by default in qbs as "QtAutotestRunner", so maybe look > for that in a future release. :) Sounds like a good idea, if this is a typical workaround people have to do. Thanks again, Chris > > Good luck! > > On Jun 19, 2016, at 12:23 AM, Ch'Gans wrote: > > Hi there, > > I'm using the Autorunner for my project to run my automated unit tests. > I am using multi QBS profile (Qt version/toolchains) with no default > profile. > > When using QtCreator on my dev machine to run my autotests everything > is fine, when using qbs command line within my CI system the tests > fail because of the app being unable unable to find the required Qt > Plugins. > My command looks like: qbs build -p autotest-runner profile:qt57-lnxgcc53_64 > > One way to solve this on CI is to export QT_QPA_PLATFORM_PLUGIN_PATH > in the shell before running Qbs, something I don't want to do since > the plugin path depends on the profile and i want to use a clean and > predictable shell env. (Note: exporting QTDIR didn't do the trick) > > I have tried to use 'qbs.setupBuildEnvironment: { > Environment.putEnv('QT_QPA_PLATFORM_PLUGIN_PATH', Qt.core.pluginPath); > }' inside my product definition, but then Qbs complains that it cannot > find the variable 'Qt'. > > Ideally i would like a simple solution that work out of the box. I > don't want to go with qt.conf or the likes. > > So my question is: What is the best way to build/setup my > autotest-runner environment so that it can load Qt plugins correctly? > > Notes: > * CI doesn't have an XServer runniing, so i'm trying to use the > 'offscreen' platform plugin, anyway this is not the source of my > problem, since by default the testapp try to load xcb and it doesn't > work for the reason explained above > * my test application's rpath contains > "/path/to/qt/unifed/5.X/gcc_64/lib" where 5.X correspond to the Qt > version defined for the Qbs profile in use. > * For now I'm only dealing with Linux, but later I would like to exec > my tests on Windows, and eventually on MacOSX too. > > Thanks in advance for any information that could shed some light on > how to achieve that 'the right way' (tm) with Qbs, > Chris > ___ > QBS mailing list > QBS@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > > > -- > Jake Petroules - jake.petrou...@qt.io > Consulting Services Engineer - The Qt Company > Qbs build system evangelist - qbs.io > ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
[QBS] Autotest runner and Qt plugin path
Hi there, I'm using the Autorunner for my project to run my automated unit tests. I am using multi QBS profile (Qt version/toolchains) with no default profile. When using QtCreator on my dev machine to run my autotests everything is fine, when using qbs command line within my CI system the tests fail because of the app being unable unable to find the required Qt Plugins. My command looks like: qbs build -p autotest-runner profile:qt57-lnxgcc53_64 One way to solve this on CI is to export QT_QPA_PLATFORM_PLUGIN_PATH in the shell before running Qbs, something I don't want to do since the plugin path depends on the profile and i want to use a clean and predictable shell env. (Note: exporting QTDIR didn't do the trick) I have tried to use 'qbs.setupBuildEnvironment: { Environment.putEnv('QT_QPA_PLATFORM_PLUGIN_PATH', Qt.core.pluginPath); }' inside my product definition, but then Qbs complains that it cannot find the variable 'Qt'. Ideally i would like a simple solution that work out of the box. I don't want to go with qt.conf or the likes. So my question is: What is the best way to build/setup my autotest-runner environment so that it can load Qt plugins correctly? Notes: * CI doesn't have an XServer runniing, so i'm trying to use the 'offscreen' platform plugin, anyway this is not the source of my problem, since by default the testapp try to load xcb and it doesn't work for the reason explained above * my test application's rpath contains "/path/to/qt/unifed/5.X/gcc_64/lib" where 5.X correspond to the Qt version defined for the Qbs profile in use. * For now I'm only dealing with Linux, but later I would like to exec my tests on Windows, and eventually on MacOSX too. Thanks in advance for any information that could shed some light on how to achieve that 'the right way' (tm) with Qbs, Chris ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Lib problems with MSVC
On 6 November 2015 at 13:58, Petroules Jake EXT wrote: > > On Nov 5, 2015, at 4:13 PM, Ch'Gans wrote: > > Hi there, > > I'm using Qbs exclusively for my project, which is composed of an app, > some libs and plugins. > I've wrote all my qbs files by lamely copying QtC ones and tweeking them a > bit. > It has always worked on Linux, but it fails on Windows with MSVC > (MinGW fails too, but it's a different issue) > > With MSVC I got an error saying it cannot open d.lib (same > error in release mode) > > My understanding is that this .lib file contains metadata (linkage > info?), dll's are creating thought. > > I'm using the latest Qt SDK release with up to date MSVC2013/64 (AFAIK) > > Has anyone encountered this kind of problem before? Any point out welcome. > > Regards, > Chris > ___ > QBS mailing list > QBS@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > > > Do your DLLs actually have any exported classes/functions? See > https://bugreports.qt.io/browse/QBS-219 and > https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application#Creating_a_shared_library Hi Jake, That was it! Thanks a lot! I now remember when I started this project, as I didn't have access to a windows computer I didn't care about it, my bad! Thanks again, Chris > -- > Jake Petroules - jake.petrou...@theqtcompany.com > Consulting Services Engineer - The Qt Company, Inc. > ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
[QBS] Lib problems with MSVC
Hi there, I'm using Qbs exclusively for my project, which is composed of an app, some libs and plugins. I've wrote all my qbs files by lamely copying QtC ones and tweeking them a bit. It has always worked on Linux, but it fails on Windows with MSVC (MinGW fails too, but it's a different issue) With MSVC I got an error saying it cannot open d.lib (same error in release mode) My understanding is that this .lib file contains metadata (linkage info?), dll's are creating thought. I'm using the latest Qt SDK release with up to date MSVC2013/64 (AFAIK) Has anyone encountered this kind of problem before? Any point out welcome. Regards, Chris ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs