Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Managing additional external DLLs when packaging binary release with Qt dependency #191

Open
mlaveaux opened this issue Sep 18, 2023 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@mlaveaux
Copy link

Comment:

For our application we are depending on Qt5 and so far I have been using the binary installer provided by Qt itself. Then I use windeployqt.exe to copy all the required DLL dependencies by Qt next to the executable to package a binary release using cpack. This has been working fine so far, the package can be used on other machines as well. However, switching to conda-forge qt-main it seems that linking Qt (for example Qt5Core.dll) now also required several other DLLs such as:

pcre2-16.dll
liblzma.dll
Lerc.dll
zlib.dll
tiff.dll
libpng16.dll

However, these are not copied by windeployqt.exe since they are external to the Qt project. This means that it is no longer possible to create a package as easily since now we need to include these DLLs as well and they are kind of external to the build system. In fact I am unsure how to resolve this issue in general. Is this a limitation of using the qt-main package or is there something that I am missing?

@mlaveaux mlaveaux added the question Further information is requested label Sep 18, 2023
@hmaarrfk
Copy link
Contributor

I have not tried to use windeployqt.

We do link to the shared conda-forge libraries, see system flags
https://github.com/conda-forge/qt-main-feedstock/blob/main/recipe/bld.bat#L88

I think we might have to patch
https://code.qt.io/cgit/qt/qttools.git/tree/src/windeployqt/main.cpp?h=5.15

to find these external shared libraries.

not sure how though. patches would be welcome.

@hmaarrfk
Copy link
Contributor

There are a few upstream bug reports and some hints for workarounds too
https://bugreports.qt.io/browse/QTBUG-58088?jql=text+%7E+%22windeployqt%22

@mlaveaux
Copy link
Author

mlaveaux commented Oct 2, 2023

I suppose patching windeployqt might work, will have to see about that since I am not so familiar with Conda behind the scenes. For deploying Linux the assumption is that these system provided libraries are always available? For Mac deployment the macdeployqt tool also might have to be adapted. Right now there is a bit of a pitfall between deploying binaries using the official Qt distribution vs using the Conda package.

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Oct 2, 2023

conda(-forge) aims to provide as much of the libraries as it can. some must be provided by the operating system.

Library resolution between the different operations at runtime is quite different though.

@hmaarrfk hmaarrfk added enhancement New feature or request help wanted Extra attention is needed labels May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants