<font color='black' size='2' face='Arial, Helvetica, sans-serif'>Thank you very much Carlos. However, i have got below error when i tried to configure it on Ubuntu 18.04, 
<div><br>
</div>

<div><span style="font-size: 13.3333px;">ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && features.xkbcommon && libs.xcb' failed.</span></div>

<div><br>
</div>

<div>What i am missing?</div>

<div><br>
</div>

<div>Regards,</div>

<div>Khuram Ali<br>
<br>
<br>

<div style="font-family:arial,helvetica;font-size:10pt;color:black">-----Ursprüngliche Mitteilung-----<br>
Von: Carlos Enrique Pérez Sánchez <ceperez1996@gmail.com><br>
An: development <development@qt-project.org><br>
Verschickt: Fr, 19. Apr. 2019 2:14<br>
Betreff: Re: [Development] Qt Static Package<br>
<br>

<div id="yiv2721199537">
<div>
<div dir="ltr">
<div><h3 class="yiv2721199537gmail-iw"><span class="yiv2721199537gmail-qu"><span class="yiv2721199537gmail-gD">Alexander Nassian:</span></span></h3></div>
<blockquote class="yiv2721199537gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;">There are many ways that are much better and do not have the problems static linking involves.</blockquote>
<div><br clear="none"></div>

<div>
<div>Many ways much better?</div>

<div>Static linking is the recommended 
approach on Linux. And the people from the company uses static linking 
to build some Qt tools for linux (I have already checked that).</div>

<div><br clear="none"></div>
<blockquote class="yiv2721199537gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;">
<div><span class="yiv2721199537gmail-im">Why
 should anyone recommend static linking for applications that use Qt? 
What should the advantages be? TQC would probably, with their posionous 
view on L-GPL usage.</span></div>
</blockquote>
<div> </div>

<div>
<div>Static linking is indeed an interesting topic when we take licenses
 into account. And that is something that is already documented in Qt 
Help. However I think that with the resource system and with the "new" 
QML engine that can get the QML files from resources, the problems of 
static linking are no much different from the problems of dynamic 
linking, taking in account that all data in dynamic linking eighter is 
binary or can be embedded as a binary resource.<br clear="none"></div>

<div>I recommend static linking because:</div>

<div>1. The size of the application is less than the overall size of app+libs+etc in dynamic linking.</div>

<div>2. The deployment process is cleaner, easier, simpler.</div>

<div>3. You end with a lot less dependencies issues on Linux.</div>

<div>4. You can make your own custom installer for a specific application.</div>

<div><br clear="none"></div>

<div>The
 use case of installers is indeed a point: you can't have an installer 
that links dynamically. Qt Installer Framework has some issues 
concerning offline updates, and many people have migrate to other 
installer frameworks like NSIS, but they are usually not cross-platform 
or ugly, or no intuitive. Qt Inst. Frw. is built statically, but it uses
 Qt Widgets. Just Imagine a fluid UI on Qt Installer Framework using Qt 
Quick Controls 2. That will provide the best UX possible. It must be 
built against a static version of Qt. I don't know if they have done so 
or not, but I can't statically link with QQC2 (and I have been trying 
for 2 years), so building Qt Statically must be, at least, well 
documented.</div>

<div><br clear="none"></div>

<div>The issue is classified as P2 (important), and they assignee agree about providing static packages on the online installer.</div>

<div><h3 class="yiv2721199537gmail-iw"><span class="yiv2721199537gmail-qu"><span class="yiv2721199537gmail-gD">Thiago:</span></span></h3></div>
<blockquote class="yiv2721199537gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;">
<div>Better yet: instead of upvoting, omeone post the full command-line that <br clear="none">
produces a working build.</div>
</blockquote>
<div><br clear="none"></div>

<div>
<div>I agree, Thiago. But the issue is classified as P2, so I think that, at least, they will try. My best command line result is:</div>

<div><br clear="none"></div>

<div>For LINUX:  <br clear="none"></div>

<div>```</div>

<div>./configure
 -prefix "/somePath/Qt512Static" -static -release -opensource 
-confirm-license -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -fontconfig 
-qt-xcb -opengl desktop -sql-sqlite -make libs -make tools -nomake 
examples -nomake tests -skip qtwebengine<br clear="none"></div>

<div>```</div>

<div><br clear="none"></div>

<div>For WINDOWS:  <br clear="none"></div>

<div>```</div>

<div>configure
 -prefix "C:/somePath/QtStatic" -static -static-runtime -release 
-opensource -confirm-license -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg 
-opengl desktop -sql-sqlite -qt-freetype -make libs -make tools -nomake 
examples -nomake tests -skip qtwebengine</div>

<div>```</div>

<div><br clear="none"></div>

<div>Sadly
 that does not work well with the QQC2 module (mainly under Windows), as
 applications shows no effects (elevation, shadows, etc). It may be a 
linking problem (I hope so) or maybe a problem with the Qt Graphical 
Effects module. Not sure.</div>
</div>
</div>
</div>
</div>
<br clear="none">
<div class="yiv2721199537yqt4499091624" id="yiv2721199537yqt47306">
<div class="yiv2721199537gmail_quote">
<div class="yiv2721199537gmail_attr" dir="ltr">El dom., 14 abr. 2019 a las 19:47, Carlos Enrique Pérez Sánchez (<<a rel="noopener noreferrer" shape="rect" ymailto="mailto:ceperez1996@gmail.com" target="_blank" href="mailto:ceperez1996@gmail.com">ceperez1996@gmail.com</a>>) escribió:<br clear="none"></div>
<blockquote class="yiv2721199537gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;">
<div dir="ltr">
<div dir="ltr">
<div>What do people think about providing official static packages?</div>

<div><br clear="none"></div>

<div>The reason is that the distribution of an application is much easier in a single executable. For that reasons I've made many static qt builds and it's always a lot of work to make it running.</div>

<div>I have success in building qt statically for console and widgets applications, but I have not success on building Qt Quick Controls 2 applications statically, mainly on Windows, because the graphics effects are off, no shadows, no layer, no elevation, etc.</div>

<div><br clear="none"></div>

<div>There internet is full of people trying to build Qt statically, because Qt Docs lacks information about building static packages and there are not examples of commands to pass to configure. People even migrated to other frameworks because they like static applications, and in Qt doing that is always a pain.<br clear="none"></div>

<div><br clear="none"></div>

<div>There is a Jira suggestion:</div>

<div><a rel="noopener noreferrer" shape="rect" target="_blank" href="https://bugreports.qt.io/browse/QTBUG-72810">https://bugreports.qt.io/browse/QTBUG-72810</a></div>

<div><br clear="none"></div>

<div>Please give an upvote there it if you agree.<br clear="none"></div>
</div>
</div>

</blockquote></div>
</div>
</div>
</div>

<div class="yqt4499091624" id="yqt36609">_______________________________________________<br clear="none">Development mailing list<br clear="none"><a shape="rect" ymailto="mailto:Development@qt-project.org" rel="noopener noreferrer" href="mailto:Development@qt-project.org">Development@qt-project.org</a><br clear="none"><a shape="rect" target="_blank" rel="noopener noreferrer" href="https://lists.qt-project.org/listinfo/development">https://lists.qt-project.org/listinfo/development</a><br clear="none"></div>
</div>
</div>
</font>