# Packaging problem on Linux with Qt 5.15.0

**URL:** <https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245>\
**Category:** Development\
**Tags:** package\
**Created:** [August 31, 2020, 10:11am UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245 "2020-08-31T10:11:42Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [August 31, 2020, 10:11am UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/1 "2020-08-31T10:11:42Z")

</div>

I packaged a Slicer using the latest nightly and Ubuntu 18.04, gcc 7.5.0, and Qt 5.15.0, and when unpacking and executing it, Slicer fails to start due to an error  
`.../Slicer-4.11.0-2020-08-26-linux-amd64/bin/SlicerApp-real: error while loading shared libraries: libQt5QmlModels.so.5: cannot open shared object file: No such file or directory`

When I manually copy the files `libQt5QmlModels.so.*` to the package, it works without problems.

There is some uncertainty about using Qt on Linux (see [what I posted about it few days ago](https://discourse.slicer.org/t/linux-build-instructions-lead-to-using-qt-5-9-5-on-ubuntu-18-04/13188)). Also note that the factory builds still use an older Qt (5.11.2).

So I have two questions:

1. Does anyone has an idea how to make sure the missing files are included in the package?
2. Are there plans updating the Linux build to 5.15.0? The build instructions (Qt 5.9.5), the actual version used by the factory (5.11.2), and the long-term Slicer plans (5.15.0) don’t seem to match.

Thank you!

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [August 31, 2020, 12:17pm UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/2 "2020-08-31T12:17:38Z")

</div>

The Linux build was updated to Qt 5.15 for a short period when the other platforms were being updated. However there were those errors as you explained above and there wasn’t any more effort in resolving those. You can read about the issues in [https://github.com/Slicer/SlicerBuildEnvironment/issues/15](https://github.com/Slicer/SlicerBuildEnvironment/issues/15)

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [August 31, 2020, 12:21pm UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/3 "2020-08-31T12:21:28Z")

</div>

An attempt was tried to update the SlicerBlockInstallQt.cmake but then that broke Windows packaging so it was reverted. [https://github.com/Slicer/Slicer/commit/7da2ff7067218b28111f3c4ea1d6ad76147e0175](https://github.com/Slicer/Slicer/commit/7da2ff7067218b28111f3c4ea1d6ad76147e0175)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [August 31, 2020, 1:04pm UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/4 "2020-08-31T13:04:34Z")

</div>

Thanks @jamesobutler for the summary! Looking at the topics it seems two different problems. I only encountered one of them. I’ll take a look at the packaging issue in case I find a good solution.

---

<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:** [August 31, 2020, 1:28pm UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/5 "2020-08-31T13:28:52Z")

</div>

@cpinter @jamesobutler Thanks for your help working on this 🙏

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 1, 2020, 8:36am UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/6 "2020-09-01T08:36:02Z")

</div>

The only thing that occurred to me so far is adding QmlModels only for Unix-type OS.

@Sam_Horvath @jcfr Do you guys remember how [adding it](https://github.com/Slicer/Slicer/commit/2a99657052a2cad890f7d1a754ba2ae76496aa76) broke the Windows packaging?

---

<div class="post-metadata">

**Author:** ![Davide\_Punzo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/davide_punzo/32/66104_2.png) [@Davide\_Punzo](https://discourse.slicer.org/u/Davide_Punzo)\
**Post date:** [September 1, 2020, 8:40am UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/7 "2020-09-01T08:40:57Z")

</div>

Following this configuration [https://github.com/Punzo/SlicerAstroApp#linux](https://github.com/Punzo/SlicerAstroApp#linux) I had no issues, but it is true that then the binaries ([https://github.com/Punzo/SlicerAstroApp/releases](https://github.com/Punzo/SlicerAstroApp/releases)), in practise, will work only for other ubuntu 20.04 users.

Addittionally, at the kapteyn they built a working version of SlicerAstroApp on centos 7 ([https://www.astro.rug.nl/~slicerastro/](https://www.astro.rug.nl/~slicerastro/)) with Qt5.15.0 (I’ll ask all the building info later on and I’ll report), but then users on pretty old linux flavours got this at startup (as for the packing os information, I’ll write the os information asap):

_ **qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.** _  
_ **This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.** _  
_ **Available platform plugins are: xcb.** _

@vdhulst if you have the packing os info of centos 7, can you post them? thanks!

---

<div class="post-metadata">

**Author:** ![Davide\_Punzo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/davide_punzo/32/66104_2.png) [@Davide\_Punzo](https://discourse.slicer.org/u/Davide_Punzo)\
**Post date:** [September 1, 2020, 10:01am UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/8 "2020-09-01T10:01:42Z")

</div>

the centos binaries in [https://www.astro.rug.nl/~slicerastro/](https://www.astro.rug.nl/~slicerastro/) have been compiled and packed with the slicer/buildenv-qt5-centos7:latest in [https://github.com/Slicer/SlicerBuildEnvironment](https://github.com/Slicer/SlicerBuildEnvironment), i.e.:

centos 7.8  
cmake 3.17.1  
gcc 5.3.1 (Red Hat 5.3.1-6 from devtoolset 4)  
qt 5.15.0

and it seems that the qt plugin error in the previos post was because of the missing of the library libxcb-xinerama0 in the old user machine.

Now they are testing the build using the 4.11-2018.10.17 from [https://github.com/Slicer/SlicerBuildEnvironment](https://github.com/Slicer/SlicerBuildEnvironment)

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [September 1, 2020, 12:20pm UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/9 "2020-09-01T12:20:48Z")

</div>

> [@cpinter](#):
>
> Do you guys remember how [adding it](https://github.com/Slicer/Slicer/commit/2a99657052a2cad890f7d1a754ba2ae76496aa76) broke the Windows packaging?

It led to the following on Windows:

> [@Latest nightly build won´t work](https://discourse.slicer.org/t/latest-nightly-build-won-t-work/11827/1):
>
> I kept receiving messages saying a series of dll files were missing (Qt5Core, Qt5Gui, Qt5Network, Qt5WebChannel, Qt5WebEngineWidgets, Qt5Widgets and Qt5Xml).

and on Linux:

> [@Error executing version Slicer-4.11.0-2020-06-01-linux-amd64.tar.gz on Ubuntu 16.04](https://discourse.slicer.org/t/error-executing-version-slicer-4-11-0-2020-06-01-linux-amd64-tar-gz-on-ubuntu-16-04/11834/1):
>
> qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.  
> This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

---

<div class="post-metadata">

**Author:** ![Lucas\_Formighieri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lucas_formighieri/32/3266_2.png) [@Lucas\_Formighieri](https://discourse.slicer.org/u/Lucas_Formighieri)\
**Post date:** [September 1, 2020, 5:12pm UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/10 "2020-09-01T17:12:04Z")

</div>

Hello,

I did not find a way around this installation problem. I reinstalled Windows and reinstalled Slicer. Since then, everything is running great.

Regards,

Lucas

---

<div class="post-metadata">

**Author:** ![Davide\_Punzo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/davide_punzo/32/66104_2.png) [@Davide\_Punzo](https://discourse.slicer.org/u/Davide_Punzo)\
**Post date:** [September 3, 2020, 1:56pm UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/11 "2020-09-03T13:56:49Z")

</div>

P.S.: @cpinter we tried the following kitware factory machine configuration:

centos 7.6  
cmake 3.13.4  
5.3.1 (Red Hat 5.3.1-6 from devtoolset 4)  
qt 5.11.2

and it produced a version working on all the linux flavours  
[https://www.astro.rug.nl/~slicerastro/linux/SlicerAstro-1.1.2-el7-qt5.11.2.tar.gz](https://www.astro.rug.nl/~slicerastro/linux/SlicerAstro-1.1.2-el7-qt5.11.2.tar.gz)

It would be nice to have the Qt5.15.0 version. However, we didn’t manage to make a fully working Qt5.15.0 version on all the linux flavours and os versions. Although it was working on the majority of them, the recent ones at least, on old linux os you can have issues with libxcb-xinerama0 and also require an hack for packing krb5-libs. The configuration is:

centos 7.8  
cmake 3.17.1  
gcc 5.3.1 (Red Hat 5.3.1-6 from devtoolset 4)  
qt 5.15.0

P.S.2: I confirm that the packing wih [https://github.com/Punzo/SlicerAstroApp#linux](https://github.com/Punzo/SlicerAstroApp#linux), but then the users need relatively “new” os linux versions.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 3, 2020, 2:36pm UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/12 "2020-09-03T14:36:11Z")

</div>

> [@Davide\_Punzo](#):
>
> Although it was working on the majority of them, the recent ones at least

Do you mean that `libQt5QmlModels.so.*` was successfully added to the package?

---

<div class="post-metadata">

**Author:** ![Davide\_Punzo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/davide_punzo/32/66104_2.png) [@Davide\_Punzo](https://discourse.slicer.org/u/Davide_Punzo)\
**Post date:** [September 3, 2020, 8:25pm UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/13 "2020-09-03T20:25:15Z")

</div>

I didn’t ckecked. I should have done. But we had no issue in running the app (however, I did’t check either if it was using system libraries for eventual missing ones). I’ll check tomorrow and I’ll let you know.

---

<div class="post-metadata">

**Author:** ![Davide\_Punzo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/davide_punzo/32/66104_2.png) [@Davide\_Punzo](https://discourse.slicer.org/u/Davide_Punzo)\
**Post date:** [September 4, 2020, 8:33am UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/14 "2020-09-04T08:33:23Z")

</div>

@cpinter so I checked on the version built with [GitHub - Punzo/SlicerAstroApp: Astronomy (HI) customization of 3DSlicer with SlicerAstro (https://github.com/Punzo/SlicerAstro)](https://github.com/Punzo/SlicerAstroApp#linux) (ubuntu 20.04, gcc9.3, cmake 3.17.3, qt5.15.0). It is true that the libQt5QmlModels libraries are not packed, but from a fast analysis with ldd on SlicerAstroApp-real and few libs in the libs folder, I didn’t see any depedepence from libQt5QmlModels.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/a/ca82e0a59c72a6c41d783dd8fcfb90f42aba03dc.png)

Can you point out which one require libQt5QmlModels?

P.S.: SlicerAstroApp is at Slicer commit 1ed419ef83bebe918cefbf78039cfc9d84967571 (14-08-2020)

P.S.2: I am interested to know, since I told to people that the Qt5.15 version in [Release 1.1.2 · Punzo/SlicerAstroApp · GitHub](https://github.com/Punzo/SlicerAstroApp/releases/tag/1.1.2) if used on ubuntu 20.04 will work 🙂 (and at least on 1 another laptop it worked)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 30, 2020, 2:25pm UTC](https://discourse.slicer.org/t/packaging-problem-on-linux-with-qt-5-15-0/13245/15 "2020-09-30T14:25:57Z")

</div>

After the recent changes in Slicer CMake, the `libQt5QmlModels.so.*` files are properly packaged on Linux as well.
