# Linuxdeployqt vs Qt Assistant

**URL:** <https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337>\
**Category:** Creating AppImages\
**Created:** [April 24, 2018, 9:20pm UTC](https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337 "2018-04-24T21:20:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Silicomancer](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/silicomancer/32/133_2.png) [@Silicomancer](https://discourse.appimage.org/u/Silicomancer)\
**Post date:** [April 24, 2018, 9:20pm UTC](https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337/1 "2018-04-24T21:20:55Z")

</div>

I tried to add Qt Assistant to the AppImage of my Qt Application. I passed it as an additional `executable=` parameter to `linuxdeployqt`. When my script runs, `linuxdeployqt` now complains about a missing `libmysqlclient.so.18` library that obviously is required by Qt Assistant through `libqsqlmysql.so`.

What I don’t understand… I could not find `libmysqlclient.so.18` on my Linux system at all. Qt Assistant seems to work well without.

Maybe someone can give a hint: Why does `linuxdeployqt` detect this library as a dependency if Qt Assistants doesn’t actually need it? What should I do to resolve the problem?

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [May 4, 2018, 10:37pm UTC](https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337/2 "2018-05-04T22:37:35Z")

</div>

Probably Qt Assistant has a dependency on something (e.g., `libqsqlmysql.so`) that has a dependency on `libmysqlclient.so.18`. Apparently, Qt Assistant can still run even if the`libqsqlmysql.so` plugin fails to load.

`linuxdeployqt` uses `ldd` to recursively walk the dependencies of the main executable and any of the Qt libraries and plugins that get deployed. If you run it with maximum verbosity, you should be able to see which piece pulls in `libmysqlclient.so.18`.

A workaround may be to delete (temporarily move away) `libqsqlmysql.so` from your Qt installation before running `linuxdeployqt`.

---

<div class="post-metadata">

**Author:** ![Silicomancer](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/silicomancer/32/133_2.png) [@Silicomancer](https://discourse.appimage.org/u/Silicomancer)\
**Post date:** [May 4, 2018, 11:47pm UTC](https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337/3 "2018-05-04T23:47:26Z")

</div>

That workaround sounds a bit awkward. Isn’t there a clean solution?

Why doesn’t linuxdeployqt (optionally) check if needed libraries are actually installed on the system?

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [May 5, 2018, 7:48am UTC](https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337/4 "2018-05-05T07:48:51Z")

</div>

> [@Silicomancer](#):
>
> Why doesn’t linuxdeployqt (optionally) check if needed libraries are actually installed on the system?

Well… it does, using `ldd`. If they are not, it stops running and throws an error.

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [May 5, 2018, 7:49am UTC](https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337/5 "2018-05-05T07:49:26Z")

</div>

> [@Silicomancer](#):
>
> Isn’t there a clean solution?

What would a clean solution be? The cleanest solution is to stop and throw an error if we encounter an unmet dependency.

---

<div class="post-metadata">

**Author:** ![Silicomancer](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/silicomancer/32/133_2.png) [@Silicomancer](https://discourse.appimage.org/u/Silicomancer)\
**Post date:** [May 5, 2018, 9:01am UTC](https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337/6 "2018-05-05T09:01:41Z")

</div>

Hmm. I am not sure about the clean solution. I have not enough knowledge in this area. I assume technically there is no difference between a mandatory dependency and an optional dependency. So `linuxdeployqt` can’t do it better by itself.

Since `linuxdeployqt` is Qt specific, could it make a difference between Qt plugins and other libraries and create warnings instead of errors for missing plugins?

Or maybe `linuxdeployqt` could provide an explicit command line parameter for optional libraries so the programmer can tell `linuxdeployqt` to include the passed dependency if it exists on the build system or skip the dependency without error if it doesn’t exist.

---

<div class="post-metadata">

**Author:** ![Silicomancer](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/silicomancer/32/133_2.png) [@Silicomancer](https://discourse.appimage.org/u/Silicomancer)\
**Post date:** [May 7, 2018, 1:39pm UTC](https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337/7 "2018-05-07T13:39:39Z")

</div>

I played around with the `-exclude-libs` option of `linuxdeployqt` but I couldn’t solve the problem.

First I tried to exclude `libmysqlclient.so.18` but `ldd` still fails internally (obviously `-exclude-libs` has no influence on the recursive dependencies).

Then I tried to exclude the `libqsqlmysql.so` plugin but assistant keeps loading it and fetches an older version from my linux installation (exiting with the beloved error “Cannot mix incompatible Qt library”).

So currently I am kind of stuck.

The only option I see is to either significantly modify my applications help system or to do the assistant dependency management manually (which kind of reduces the usability of `linuxdeployqt` significantly).

Any more ideas?

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [May 13, 2018, 6:23pm UTC](https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337/8 "2018-05-13T18:23:29Z")

</div>

> [@Silicomancer](#):
>
> Or maybe `linuxdeployqt` could provide an explicit command line parameter for optional libraries so the programmer can tell `linuxdeployqt` to include the passed dependency if it exists on the build system

Currently you need to run `linuxdeployqt` twice and copy in the libraries in question manually in between the two runs.

Is your application on GitHub so that I could have a look?

---

<div class="post-metadata">

**Author:** ![Silicomancer](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/silicomancer/32/133_2.png) [@Silicomancer](https://discourse.appimage.org/u/Silicomancer)\
**Post date:** [May 13, 2018, 11:08pm UTC](https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337/9 "2018-05-13T23:08:53Z")

</div>

Hm. Ok, I see. I will think about that. Running twice is easy. But managing the libs manually is nasty anyway.

No, my project is not in any public repository. What information do you need? Is something unclear about the configuration? Try to include the Qt Assistant into some random Qt AppImage and you will probably see the same error.

---

<div class="post-metadata">

**Author:** ![Silicomancer](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/silicomancer/32/133_2.png) [@Silicomancer](https://discourse.appimage.org/u/Silicomancer)\
**Post date:** [May 18, 2018, 11:51am UTC](https://discourse.appimage.org/t/linuxdeployqt-vs-qt-assistant/337/10 "2018-05-18T11:51:15Z")

</div>

> [@probono](#):
>
> A workaround may be to delete (temporarily move away) `libqsqlmysql.so` from your Qt installation before running `linuxdeployqt` .

I finally did it that way. I also had to move away libqsqlpsql.so.

Still I think `linuxdeployqt` should provide better plugin control.
