Using Qt Linux Deployment Tool to build an installation package

1724
4
09-12-2019 09:47 AM
SakshamGupta
New Contributor

Can I build an installation package for an ArcGIS application using qt linux deployment tool (https://github.com/probonopd/linuxdeployqt). While trying to build it with Qt 5.13 and using ldd I am getting the following error:

./libEsriCommonQt.so: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.12' not found (required by ./libEsriCommonQt.so)

is there any way to build the installer package using Qt 5.13?

Thanks

Tags (4)
0 Kudos
4 Replies
by Anonymous User
Not applicable

Hi Saksham,

Could you give me a bit more info on:

* What is the exact `linuxdeployqt` command you are trying to run.

* If you run `objdump -x libEsriCommonQt.so | grep PATH` - what are the RPATH and RUNPATH values you see? The tool should have edited the runpath to display `RUNPATH $ORIGIN`

* Do you have patchelf and appimagetool installed? I believe these are prerequistes for linuxdeployqt.

By the looks of your error, libEsriCommonQt has not been correctly pulled and patched to point to the $ORIGIN folder, and so is instead falling back on the default Qt 5 installation that came with your OS. You can use `patchelf` to change the RUNPATH/RPATH of a library at-will and see if this works also. But it sounds more like a problem with linuxdeployqt.

You can try running with debug-logging and see what it is attempting to do to patch libEsriCommonQt.so after it has been copied into the lib folder.

0 Kudos
by Anonymous User
Not applicable

To clarify, the issue here is not that ArcGISRuntime for Qt doesn't work with Qt 5.13. The issue is that the version of Qt found here: `/usr/lib/x86_64-linux-gnu/libQt5Core.so.5` is likely going to be Qt 5.6 or Qt 5.9. (Though you might need to confirm that for me.)

0 Kudos
SakshamGupta
New Contributor

Hey,

I am trying to run "./linuxdeployqt-6-x86_64.AppImage ../build-application-Desktop_Qt_5_13_0_GCC_64bit-Release/application"

Initially if I run the `ldd` command it says libEsriCommonQt.so => not found and libruntimecore.so => not found.

So, to mitigate that I do `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/arcgis/runtime_sdk/qt100.5/sdk/linux/x64/lib/`

and sudo ldconfig, which finds the path in the next ldd.

But using the above command gives:

ERROR: ldd outputLine: "/arcgis/runtime_sdk/qt100.5/sdk/linux/x64/lib/libEsriCommonQt.so: /anaconda3/lib/libQt5Core.so.5: version `Qt_5.12' not found (required by /arcgis/runtime_sdk/qt100.5/sdk/linux/x64/lib/libEsriCommonQt.so)"
ERROR: for binary: "/arcgis/runtime_sdk/qt100.5/sdk/linux/x64/lib/libEsriCommonQt.so"

Running `objdump -x libEsriCommonQt.so | grep PATH`

gives me :    objdump: 'libEsriCommonQt.so': No such file

0 Kudos
by Anonymous User
Not applicable

Is `/anaconda3/lib/libQt5Core.so` the correct location of your Qt install? It seems likelyto me you have Qt libs that came with your OS that are conflicting with your current Qt libs.

Try adding -qmake=<path> to your commands to point to the correct qmake binary to use, or set LD_LIBRARY_PATH to also point to the desired Qt libs as well.

For example, if I built and used Qt installed at `/home/Qt/5.13.0` then I need the qmake that exists at `/home/Qt/5.13.0/bin/qmake` to make sure that linuxdeployqt doesn't pick up the Qt libs that exist in my `/usr/lib/` directory.

0 Kudos