[Qt-creator] Building Qt Creator and QBS separately

Andrzej Telszewski atelszewski at gmail.com
Tue May 3 02:58:33 CEST 2016

On 26/04/16 09:26, Christian Kandeler wrote:
> On 04/25/2016 07:54 PM, Andrzej Telszewski wrote:
>> I have now built QBS with:
>> qmake-qt5 qbs.pro \

$LIBDIRSUFFIX is set to 64, would be empty for 32 bit arch.

>>    CONFIG+=qbs_enable_project_file_updates
>> make
>> make docs
>> make install INSTALL_ROOT=$PKG/usr
> What is $PKG?

$PKG is path to where to temporarily install the files.
Later, the distribution package is created from within this path.
And then the packages is installed.

>> and QTC with:
>> qmake-qt5 qtcreator.pro \
> Shouldn't this be $PKG/usr?

No. If I'm not mistaken, QBS_INSTALL_DIR is where the Qt Creator build 
system is searching for QBS. The same applies for LLVM_INSTALL_DIR, for 
having Clang Code Model. And since both QBS and LLVM are already 
installed under /usr, /usr is the correct value to set.

>> make
>> make install INSTALL_ROOT=$PKG/usr
>> make docs
>> make install_docs INSTALL_ROOT=$PKG/usr
>> Now I have a small issue. When I start Qt Creator, I receive the message:
>> WARNING: Plugin path '/usr/lib//qbs/plugins' does not exist.
> If $PKG is not empty, then that is expected. Otherwise this path should
> be correct; at least that's what a cursory look at the project files
> suggests. Where is qbs/plugins actually located now?

First of all, I forgot to mention that, despite the warning, my QBS 
based project actually builds fine.

As I mentioned before, after the QBS is compiled, the files are 
installed in the $PKG temporary location and a packages is created.

Then the QBS package is installed and QBS plugins can be found under:


 > (Note: Qt Creator hardcodes "lib" when looking for plugins, so you
 > cannot set QBS_LIBRARY_DIRNAME to anything else.)

You're correct on that one. I traced down where the "lib" is hardcoded 
and wrote a small patch to deal with that.

Now the warning does not appear anymore.

The patch is attached. Since I'm not yet (maybe never;)) involved in Qt 
Creator development, feel free to upstream the patch. Naturally, 
provided that it is correctly written ;)

I'll be off for a few days and cannot deal with it now. But if nobody 
stands for it till I return, I'll probably get on upstreaming it myself.

>> I guess that I still mess something with QBS_LIBRARY_DIRNAME and/or
>> IDE_LIBRARY_BASENAME there is something missing?
> IDE_LIBRARY_BASENAME is irrelevant when building against an
> "independent" qbs.

But I think IDE_LIBRARY_BASENAME is relevant at least with Qt Creator 
itself. That is building on 64-bit arch will place the Qt Creator 
libraries under:


and not under:


And of course, it is now relevant to my patch ;)

To sum up, this is what I have now and it finally seems to be working fine:

qmake-qt5 qbs.pro \
make install INSTALL_ROOT=$PKG/usr

$ create the QBS distribution package ...
$ install the QBS package ...

*Qt Creator*
qmake-qt5 qtcreator.pro \
   LLVM_INSTALL_DIR="/usr" \
make install INSTALL_ROOT=$PKG/usr

$ create the Qt Creator distribution package ...
$ install the Qt Creator package ...

> Christian
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

Best regards,
Andrzej Telszewski
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qbs_plugins_basedir.patch
Type: text/x-patch
Size: 765 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20160503/17a8f417/attachment.bin>

More information about the Qt-creator mailing list