Link Error Migrating App from 100.1.0 to 100.5.0

822
4
05-23-2019 07:21 PM
RainerFarsch1
New Contributor II

I have an existing application that was developed and run on the following:

(1) RHEL 7.2 WS

(2) Qt 5.9.1

(3) devtoolset-4

(4) ArcGIS Runtime SDK for Qt 100.1.0

I've upgraded to use the following:

(1) RHEL 7.5 WS

(2) Qt 5.12.3

(3) devtoolset-4

(4) ArcGIS Runtime SDK for Qt 100.5.0

I changed the .pro file to use: ARCGIS_RUNTIME_VERSION = 100.5

When building I'm getting some warnings that setSelectionColor() is deprecated -- I see there is blog to address this issue. But at the link stage of the build I'm getting the following error:

~/arcgis/runtime_sdk/qt100.5/sdk/linux/x64/lib/libEsriCommonQt.so: undefined reference to `qt_version_tag@Qt_5.12'

collect2: error: ld returned 1 exit status

According to the requirements (System requirements for 100.5.0—ArcGIS Runtime SDK for Qt | ArcGIS for Developers), 100.5.0 requires Qt 5.12.0 or higher. I've set up my kits accordingly and I see includes to -I/usr/local/Qt-5.12.3/...during compiles, and -L/usr/local/Qt-5.12.3/lib during the link stage.

So what could be the issue?

I appreciate any help with this!

Thanks!

-Rainer


0 Kudos
4 Replies
by Anonymous User
Not applicable

Hi Rainer,

Would you mind trying this out for me?

In the folder where you have installed arcgis, navigate to:

runtime_sdk/qt100.5/sdk/ideintegration/argis_runtime_qml_cpp.pri

and remove line 125 which should read as: -L/usr/lib64 \

runtime_sdk/qt100.5/sdk/ideintegration/argis_runtime_qml.pri

and remove line 111 which should read as: -L/usr/lib64 \

runtime_sdk/qt100.5/sdk/ideintegration/argis_runtime_toolkit_cpp.pri

and remove line 80 which should read as: -L/usr/lib64 \

runtime_sdk/qt100.5/sdk/ideintegration/esri_runtime_qt.pri

and remove line 96 which should read as: -L/usr/lib64 \

You will need to close then reopen Qt creator, and do a fresh build from clean. If this does work do let me know.

Kind regards,

Neil

0 Kudos
RainerFarsch1
New Contributor II

Hi Neil,

Thanks for the quick response. I modified the four .pri files you cited and it worked -- that is it finished linking without the qt_version_tag@Qt_5.12 error. (Seems I need to debug some other issues to get the application fully running.)

So, what is the issue? Is this something I need to be aware of if I re-install onto another machine. Known bug?

Thanks!

-Rainer

0 Kudos
by Anonymous User
Not applicable

Hi Rainer,

Thanks for confirming!

I believe what you are experiencing is a conflict between the Qt 5.12 libraries that come with RHEL 7.5, and the Qt 5.12 libraries you intended to link against.

Linking is prioritized by whatever comes first in the list of arguments, by de-prioritising /usr/lib64, the preference is then given to the Qt libs you had originally intended. /usr/lib64 is automatically included by the linker anyway at the very end, so you shouldn't need to add it back in manually.

Unfortunately yes, any RHEL 7.5 installation you have will require some editing of the *.pri files before the linker will go down the correct path. Sorry about that! I will see about getting a fix in.

0 Kudos
RainerFarsch1
New Contributor II

Hi Neil,

I suspected the same. When I installed RHEL 7.5 WS using the 'Development and Creative Workstation' option, I also got Qt 3.3.8, Qt 4.8.7, and 5.9.2 installed. For example, on a terminal: '$ echo $QTDIR' gives back '/usr/lib64/qt-3.3'. Annoying. I believe the Qt5 libraries installed in /usr/lib are Qt 5.9.2, and therefore the issue at hand.

Thanks for getting to this as quickly as you did.

-Rainer

0 Kudos