<div dir="ltr"><div>Hmm... I faced that problem some time ago, and I solved it but now I'm not sure about how I did it. I thought that was by installed that dependencies. I am not sure anymore, sorry. I will compile Qt statically soon (both Linux and Windows) and see what happens this time. I'm only waiting to see if Mitch have any word on this.</div><div><br></div><div>By the way, try replying to the original mail (the one that does not have the <b>Re: [Development]</b>), because the replies on the developer mailing list are being ordered strangely.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El sáb., 20 abr. 2019 a las 16:02, Khuram Ali (<<a href="mailto:khuram.ali@aim.com">khuram.ali@aim.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font size="2" face="Arial, Helvetica, sans-serif" color="black">I have already installed the dependencies list from Jeff Tranter. However, it doesn't help. The only difference between your ./config command and mine is that, i am also linking openssl. The error remain same. 
<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 <<a href="mailto:ceperez1996@gmail.com" target="_blank">ceperez1996@gmail.com</a>><br>
An: Khuram Ali <<a href="mailto:khuram.ali@aim.com" target="_blank">khuram.ali@aim.com</a>>; development <<a href="mailto:development@qt-project.org" target="_blank">development@qt-project.org</a>><br>
Verschickt: Sa, 20. Apr. 2019 1:43<br>
Betreff: Re: [Development] Qt Static Package<br>
<br>

<div id="gmail-m_-4928904522147658328yiv6812836987">
<div>
<div dir="ltr">
<div dir="ltr">
<div>As Thiago said:</div>
<blockquote class="gmail-m_-4928904522147658328yiv6812836987gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>Please note the -qt-zlib option and family: if you choose to use the bundled <br clear="none">
versions from Qt, you'll need to monitor those upstreams for security issues <br clear="none">
and, if any is found, rebuild your application after applying the fix to the <br clear="none">
sources bundled in Qt.<br clear="none">
<br clear="none">
Far better to use -system-zlib and family.</div>
</blockquote>
<div><br clear="none"></div>

<div>However, I faced the same problem time ago. I solved it by installing the following dependencies with the `<b>sudo apt install command</b>` bellow:<br clear="none"></div>

<div>```</div>

<div>Install dependences (thanks to Jeff Tranter): (you may already have most of them installed):<br clear="none"><br clear="none">sudo apt install build-essential perl python ruby bison flex gperf libasound2-dev libatkmm-1.6-dev libbz2-dev libcap-dev libcups2-dev libdrm-dev libegl1-mesa-dev libglu1-mesa-dev libfontconfig1-dev libfreetype6-dev libgcrypt11-dev libgcrypt20-dev libgstreamer1.0-dev libicu-dev libnss3-dev libpci-dev libpulse-dev libssl-dev libudev-dev libx11-dev libx11-xcb-dev libxcb-composite0 libxcb-composite0-dev libxcb-cursor-dev libxcb-cursor0 libxcb-damage0 libxcb-damage0-dev libxcb-dpms0 libxcb-dpms0-dev libxcb-present-dev libxcb-present0 libxcb-randr0 libxcb-randr0-dev libxcb-record0 libxcb-record0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-render0 libxcb-render0-dev libxcb-res0 libxcb-res0-dev libxcb-screensaver0 libxcb-screensaver0-dev  libxcb-shape0 libxcb-shape0-dev libxcb-shm0 libxcb-shm0-dev libxcb-sync-dev libxcb-sync1 libxcb-util-dev libxcb-util0-dev libxcb-util1 libxcb1 libxcb1-dev libxcb-xf86dri0 libxcb-xf86dri0-dev libxcb-xfixes0 libxcb-xfixes0-dev libxcb-xinerama0 libxcb-xinerama0-dev libxcb-xkb1 libxcb-xkb-dev  libxcb-xtest0 libxcb-xtest0-dev  libxcb-xv0 libxcb-xv0-dev libxcb-xvmc0 libxcb-xvmc0-dev libxcomposite-dev  libxcursor-dev libxdamage-dev libxext-dev  libxfixes-dev libxi-dev libxrandr-dev libxrender-dev libxslt1-dev libxss-dev libxtst-dev<br clear="none"><br clear="none">NOTE: Jeff Tranter is a Qt Consulting Manager at ICS. Jeff oversees the architectural and high-level design of software systems for clients. Jeff’s leadership organizes global teams of developers on desktop and embedded applications.<br clear="none"></div>

<div>```</div>
</div>
</div>
<br clear="none">
<div class="gmail-m_-4928904522147658328yiv6812836987yqt4028554700" id="gmail-m_-4928904522147658328yiv6812836987yqt36301">
<div class="gmail-m_-4928904522147658328yiv6812836987gmail_quote">
<div class="gmail-m_-4928904522147658328yiv6812836987gmail_attr" dir="ltr">El vie., 19 abr. 2019 a las 3:43, Khuram Ali (<<a rel="noopener noreferrer" shape="rect" href="mailto:khuram.ali@aim.com" target="_blank">khuram.ali@aim.com</a>>) escribió:<br clear="none"></div>
<blockquote class="gmail-m_-4928904522147658328yiv6812836987gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font size="2" face="Arial, Helvetica, sans-serif" color="black">Thank you very much Carlos. However, i have got below error when i tried to configure it on Ubuntu 18.04, 
</font>
<div><br clear="none">
</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 clear="none">
</div>



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



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



<div>Regards,</div>



<div>Khuram Ali<br clear="none">
<br clear="none">
<br clear="none">


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


<div id="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537">

<div>

<div dir="ltr">

<div><h3 class="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail-iw"><span class="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail-qu"><span class="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail-gD">Alexander Nassian:</span></span></h3></div>

<blockquote class="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail_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="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div><span class="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail-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="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail-iw"><span class="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail-qu"><span class="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail-gD">Thiago:</span></span></h3></div>

<blockquote class="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail_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="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537yqt4499091624" id="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537yqt47306">

<div class="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail_quote">

<div class="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail_attr" dir="ltr">El dom., 14 abr. 2019 a las 19:47, Carlos Enrique Pérez Sánchez (<<a rel="noopener noreferrer" shape="rect" href="mailto:ceperez1996@gmail.com" target="_blank">ceperez1996@gmail.com</a>>) escribió:<br clear="none"></div>

<blockquote class="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yiv2721199537gmail_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" href="https://bugreports.qt.io/browse/QTBUG-72810" target="_blank">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="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yqt4499091624" id="gmail-m_-4928904522147658328yiv6812836987gmail-m_4356202970046427113gmail-m_-1160926327007439558yqt36609">_______________________________________________<br clear="none">Development mailing list<br clear="none"><a rel="noopener noreferrer" shape="rect" href="mailto:Development@qt-project.org" target="_blank">Development@qt-project.org</a><br clear="none"><a rel="noopener noreferrer" shape="rect" href="https://lists.qt-project.org/listinfo/development" target="_blank">https://lists.qt-project.org/listinfo/development</a><br clear="none"></div>

</div>

</div>

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