# Should I build Qt 5.10 from source on Linux?

**URL:** <https://discourse.slicer.org/t/should-i-build-qt-5-10-from-source-on-linux/2484>\
**Category:** Development\
**Created:** [March 30, 2018, 11:28pm UTC](https://discourse.slicer.org/t/should-i-build-qt-5-10-from-source-on-linux/2484 "2018-03-30T23:28:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaoyi.cn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gaoyi.cn/32/1422_2.png) [@gaoyi.cn](https://discourse.slicer.org/u/gaoyi.cn)\
**Post date:** [March 30, 2018, 11:28pm UTC](https://discourse.slicer.org/t/should-i-build-qt-5-10-from-source-on-linux/2484/1 "2018-03-30T23:28:53Z")

</div>

Thanks JC!

Should I build Qt5 from source or the binary coming with Ubuntu works?

Best,  
yi

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [March 30, 2018, 11:35pm UTC](https://discourse.slicer.org/t/should-i-build-qt-5-10-from-source-on-linux/2484/2 "2018-03-30T23:35:58Z")

</div>

> [@Why do I get build error "class vtkOBJExporter has no member named SetOBJFileComment" when building Slicer against Qt4?](https://discourse.slicer.org/t/why-do-i-get-build-error-class-vtkobjexporter-has-no-member-named-setobjfilecomment-when-building-slicer-against-qt4/2482/3):
>
> Should I build Qt5 from source or the binary coming with Ubuntu works?

Assuming you have a recent version of Ubuntu, downloading Qt 5.10 should work well.

Make sure you install (at least) the following components:

> <https://github.com/Slicer/SlicerBuildEnvironment/blob/8bb9e47882968d7f23cde1d3a6d5857671171ac1/Docker/qt5-centos7/qt-installer-noninteractive.qs#L50-L54>

These two pages are also useful resources:

- [Qt for X11 Requirements | Qt 5.15](https://doc.qt.io/qt-5/linux-requirements.html)
- [Supported Platforms | Qt 5.15](https://doc.qt.io/qt-5/supported-platforms-and-configurations.html#qt-5-10)

---

<div class="post-metadata">

**Author:** ![gaoyi.cn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gaoyi.cn/32/1422_2.png) [@gaoyi.cn](https://discourse.slicer.org/u/gaoyi.cn)\
**Post date:** [March 30, 2018, 11:46pm UTC](https://discourse.slicer.org/t/should-i-build-qt-5-10-from-source-on-linux/2484/3 "2018-03-30T23:46:17Z")

</div>

Hi Jc,

On the page of

> **[GitHub - jcfr/qt-easy-build: Scripts allowing to easily build Qt with OpenSSL...](https://github.com/jcfr/qt-easy-build)**
>
> Scripts allowing to easily build Qt with OpenSSL support on Linux, macOS or Windows - GitHub - jcfr/qt-easy-build: Scripts allowing to easily build Qt with OpenSSL support on Linux, macOS or Windows

I went in the link behind “Scripts available for these Qt versions: 5.10.0”, this leads me to:

> **[GitHub - jcfr/qt-easy-build at 5.10.0](https://github.com/jcfr/qt-easy-build/tree/5.10.0#readme)**
>
> 5.10.0

Then in the script:  
curl -s [https://raw.githubusercontent.com/jcfr/qt-easy-build/5.9.1/Build-qt.sh](https://raw.githubusercontent.com/jcfr/qt-easy-build/5.9.1/Build-qt.sh) -o Build-qt.sh && chmod u+x Build-qt.sh  
./Build-qt.sh -j 4

I assume I should change the 5.9.1 in the path to 5.10.0?

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [March 30, 2018, 11:49pm UTC](https://discourse.slicer.org/t/should-i-build-qt-5-10-from-source-on-linux/2484/4 "2018-03-30T23:49:56Z")

</div>

Note: We still need to update the build instruction.

Since you are using Ubuntu 16.04 (based on the message of your last post), you do not need to build Qt.

Could could even do it from the command line doing something like this:

> <https://github.com/Slicer/SlicerBuildEnvironment/blob/8bb9e47882968d7f23cde1d3a6d5857671171ac1/Docker/qt5-centos7/Dockerfile#L72-L75>

Just make sure to update `qt-installer-noninteractive.qs` and change the location.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [March 30, 2018, 11:54pm UTC](https://discourse.slicer.org/t/should-i-build-qt-5-10-from-source-on-linux/2484/5 "2018-03-30T23:54:39Z")

</div>

> [@gaoyi.cn](#):
>
> I assume I should change the 5.9.1 in the path to 5.10.0?

Indeed. And thanks for reporting the issue. Is is now fixed in [README: Fix documentation · jcfr/qt-easy-build@fe97a49 · GitHub](https://github.com/jcfr/qt-easy-build/commit/fe97a49bf32d15ac951b4ba6380c86985229ae29)

---

<div class="post-metadata">

**Author:** ![gaoyi.cn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gaoyi.cn/32/1422_2.png) [@gaoyi.cn](https://discourse.slicer.org/u/gaoyi.cn)\
**Post date:** [March 30, 2018, 11:55pm UTC](https://discourse.slicer.org/t/should-i-build-qt-5-10-from-source-on-linux/2484/6 "2018-03-30T23:55:18Z")

</div>

Yes I’m doing both ways. It’s always healthy to build from source. 🙂

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [March 31, 2018, 12:04am UTC](https://discourse.slicer.org/t/should-i-build-qt-5-10-from-source-on-linux/2484/7 "2018-03-31T00:04:46Z")

</div>

> [@gaoyi.cn](#):
>
> always healthy to build from source

That said, note that the version of openssl we are still using in qt-easy-build is obsolete, since 2 days ago, version `1.0.2o` should be used.

See [https://www.openssl.org/news/secadv/20180327.txt](https://www.openssl.org/news/secadv/20180327.txt)

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [March 31, 2018, 8:04pm UTC](https://discourse.slicer.org/t/should-i-build-qt-5-10-from-source-on-linux/2484/8 "2018-03-31T20:04:54Z")

</div>

> [@jcfr](#):
>
> qt-unified-linux-x64-online.run

Maybe this should be a pinned release? (reproducible build…)

---

<div class="post-metadata">

**Author:** ![GalKer](https://avatars.discourse-cdn.com/v4/letter/g/b5a626/32.png) [@GalKer](https://discourse.slicer.org/u/GalKer)\
**Post date:** [November 7, 2018, 4:48pm UTC](https://discourse.slicer.org/t/should-i-build-qt-5-10-from-source-on-linux/2484/9 "2018-11-07T16:48:11Z")

</div>

Hi,  
Trying to install from qt-east-build, however installation fail during QT configuration phase.

I get this output:

- cd qtbase
- /home/qt-easy-build/qt-easy-build/qt-everywhere-src-5.10.0/qtbase/configure -top-level -prefix /home/qt-easy-build/qt-easy-build/qt-everywhere-build-5.10.0 -release -opensource -confirm-license -c++std c++11 -nomake examples -nomake tests -silent -openssl -I /home/qt-easy-build/qt-easy-build/qt-everywhere-deps-5.10.0/openssl-1.0.2n/include -L /home/qt-easy-build/qt-easy-build/qt-everywhere-deps-5.10.0/openssl-1.0.2n  
Creating qmake…  
.Done.  
**Could not find qmake configuration file .**  
Error processing project file: /home/qt-easy-build/qt-easy-build/qt-everywhere-src-5.10.0

any idea which configuration file is missing and where to place it?
