Select to view content in your preferred language

windows installation trouble

2281
23
04-20-2023 09:19 AM
Labels (3)
arcgisdev007
New Contributor III

I am able to install QT 6.5 on Mac but I have trouble running the display-a-map on Windows to verify the installation.  Specifically, I have mingui64.  When I run the display-a-map, I got ole32.lib not found.

 

 

Thomas

 

0 Kudos
23 Replies
arcgisdev007
New Contributor III

on Windows, I am using Pixel 6 Pro API 30.  I got the following when I am running the display_a_map:

E linker : library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/~~qDapSXv0adHSFzqwqTNT6A==/org.qtproject.example.test2androidqmake-SZ5w_92GDdbv_U9OuXXYRw==/lib/x86/libQt6Core_x86.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/~~qDapSXv0adHSFzqwqTNT6A==/org.qtproject.example.test2androidqmake-SZ5w_92GDdbv_U9OuXXYRw==/lib/x86:/data/app/~~qDapSXv0adHSFzqwqTNT6A==/org.qtproject.example.test2androidqmake-SZ5w_92GDdbv_U9OuXXYRw==/base.apk!/lib/x86", permitted_paths="/data:/mnt/expand:/data/data/org.qtproject.example.test2androidqmake"]
W qt.tlsbackend.ossl: : Failed to load libssl/libcrypto.
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
I TetheringManager: registerTetheringEventCallback:org.qtproject.example.test2androidqmake
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
W qt.network.ssl: : The backend "cert-only" does not support QSslSocket
W qt.network.ssl: : The backend named "cert-only" does not support TLS
W qt.network.ssl: : QSslSocket::connectToHostEncrypted: TLS initialization failed
I chatty : uid=10123(org.qtproject.example.test2androidqmake) QNetworkAccessM identical 3 lines
W qt.network.ssl: : QSslSocket::connectToHostEncrypted: TLS initialization failed

0 Kudos
arcgisdev007
New Contributor III

On Windows, I got the following when running the display_a_map on Android emulator:

 

E linker : library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/~~qDapSXv0adHSFzqwqTNT6A==/org.qtproject.example.test2androidqmake-SZ5w_92GDdbv_U9OuXXYRw==/lib/x86/libQt6Core_x86.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/~~qDapSXv0adHSFzqwqTNT6A==/org.qtproject.example.test2androidqmake-SZ5w_92GDdbv_U9OuXXYRw==/lib/x86:/data/app/~~qDapSXv0adHSFzqwqTNT6A==/org.qtproject.example.test2androidqmake-SZ5w_92GDdbv_U9OuXXYRw==/base.apk!/lib/x86", permitted_paths="/data:/mnt/expand:/data/data/org.qtproject.example.test2androidqmake"]
W qt.tlsbackend.ossl: : Failed to load libssl/libcrypto.
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
I TetheringManager: registerTetheringEventCallback:org.qtproject.example.test2androidqmake
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
W qt.network.ssl: : The backend "cert-only" does not support QSslKey
W qt.network.ssl: : Active TLS backend does not support key creation
W qt.network.ssl: : The backend "cert-only" does not support QSslSocket
W qt.network.ssl: : The backend named "cert-only" does not support TLS
W qt.network.ssl: : QSslSocket::connectToHostEncrypted: TLS initialization failed
I chatty : uid=10123(org.qtproject.example.test2androidqmake) QNetworkAccessM identical 3 lines
W qt.network.ssl: : QSslSocket::connectToHostEncrypted: TLS initialization failed

0 Kudos
JamesBallard1
Esri Regular Contributor

@arcgisdev007we have seen the 'ASSERT: "!parsed.isError()' error but only with debug builds on iOS. Can you please confirm you're getting that on mac as well? We will look into it in that case.

Anywhere you're seeing that assert, try running with a release build for the time being. That should alleviate those issues.

For the "The backend name 'cert-only' does not support TLS" issue, your app will likely require OpenSSL on Android.

In Qt Creator, in the Projects setting, under the "Build Android APK" section, there is a section called "Additional Libraries" where you can include the prebuilt SSL libs. See attached for what this looks like

Screen Shot 2023-04-25 at 10.55.23 AM.png

Your paths and libraries may be different. This is just the general workflow to enable SSL in Android apps.

0 Kudos
arcgisdev007
New Contributor III

will try it out soon and keep u posted.

 

Thank you.

 

Thomas

 

0 Kudos
arcgisdev007
New Contributor III

Thank you for your help

1. I am able to run qml app on Windows and  Android emulator in Windows.

2. I am able to run qml app on MacOS and Android emulator.

3. I am able to run cpp app on MacOS, Android emulator and iOS emulator.

    But the Android debugger is not working.

 

I am not able to run qml app on iOS emulator with the follow error:

 

if (!window)
{
qCritical("Error: Your root item has to be a Window.");

return -1;
}

Thomas

0 Kudos
JamesBallard1
Esri Regular Contributor

@arcgisdev007that's good progress.

Can you share some more details about the Android debugger not working? That may fall under general app development and nothing specific with using the ArcGIS Maps SDK for Qt.

When running a QML app on iOS Simulator, try adding this to main.cpp and check if there's any additional output that will help identify the culprit.

qputenv("QT_DEBUG_PLUGINS", "1");

 

I just did a quick test and I was able to build and run on iOS Simulator with this config:

  • Xcode 14.2
  • macOS Monterey 12.6.5
  • Qt 6.4.3
  • CMake
  • Intel mac
  • iOS Simulator iPhone SE (3rd generation) iOS 16.2
  • Build config: Release
  • ArcGIS Maps SDK for Qt: 200.1.0

 

0 Kudos
arcgisdev007
New Contributor III

the following is my config:

 

  • Xcode 14.2
  • macOS Ventura 13.3.1
  • Qt 6.4.3
  • QMake
  • Intel mac
  • iOS Simulator iPhone 14 Pro Max iOS 16.4 and iPhone SE (3rd generation) iOS 16.4
  • Build config: Release
  • ArcGIS Maps SDK for Qt: 200.1.0

auto topLevelObject = appEngine.rootObjects().value(0);
auto window = qobject_cast<QQuickWindow*>(topLevelObject);
if (!window)
{
qCritical("Error: Your root item has to be a Window.");

return -1;
}

 

the above code return -1;

 

The following is the qml:

import QtQuick
import QtQuick.Controls
import Esri.ArcGISRuntime

ApplicationWindow {
id: appWindow
width: 800
height: 600
title: "Test10qmlqmakeall20"

// add a mapView component
MapView {
anchors.fill: parent
// set focus to enable keyboard navigation
focus: true

// add a map to the mapview
Map {
// add the ArcGISStreets basemap to the map
initBasemapStyle: Enums.BasemapStyleArcGISStreets
}
}
}

-------------------

Also the qml with cmake, i got the following:

 

import Esri.ArcGISRuntime  <- QML module not found.

------------------

I am able to run and debug cpp app with qmake.

0 Kudos
JamesBallard1
Esri Regular Contributor

@arcgisdev007it's taking me some time to track down that exact config so we can try it on our end. I have everything except macOS Ventura, and I'm not sure if that alone would make much difference. I even tried again with the exact project name and it still worked.

Are you able to try the qputenv mentioned above early in main.cpp and see if that helps to identify any additional issues? You should get some extra logging when you try to run the app that may be useful.

Can you confirm this block of code exists in main.cpp? We just recently put this in as a workaround for compatibility problems with Qt 6.3 and later on iOS.

#if defined(Q_OS_IOS)
#  if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0)
    extern const QStaticPlugin qt_static_plugin_ArcGISRuntimePlugin_compatibility();
    qRegisterStaticPluginFunction(qt_static_plugin_ArcGISRuntimePlugin_compatibility());
#  endif
#endif

 

This was only added to our templates with the 200.1.0 release. It would be needed with qmake or cmake, so I assume it's there if cmake is working for you.

0 Kudos
arcgisdev007
New Contributor III

#if defined(Q_OS_IOS) # if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0) extern const QStaticPlugin qt_static_plugin_ArcGISRuntimePlugin_compatibility(); qRegisterStaticPluginFunction(qt_static_plugin_ArcGISRuntimePlugin_compatibility()); # endif #endif

the above is not in the newly generated code.

I have 200.1.0 on my MAC

i have 2.00.0.0 and 200.1.0 on Windows.

Mac is the only one matter for iOS development. 

 

--------------------------

I just do new project and create a simple vanilla app for all three platform: Mac, Android and iOS.

The same code below will run on Mac and Android but just not iOS.   Do you have any advice?

auto topLevelObject = appEngine.rootObjects().value(0);
auto window = qobject_cast<QQuickWindow*>(topLevelObject);
if (!window)
{
qCritical("Error: Your root item has to be a Window.");

return -1;
}

 

the above code return -1;

 

The following is the qml:

import QtQuick
import QtQuick.Controls
import Esri.ArcGISRuntime

ApplicationWindow {
id: appWindow
width: 800
height: 600
title: "Test10qmlqmakeall20"

// add a mapView component
MapView {
anchors.fill: parent
// set focus to enable keyboard navigation
focus: true

// add a map to the mapview
Map {
// add the ArcGISStreets basemap to the map
initBasemapStyle: Enums.BasemapStyleArcGISStreets
}
}
}

 

 

0 Kudos
JamesBallard1
Esri Regular Contributor

If that block of code is missing from your project's main.cpp, try adding it and targeting 200.1.0. That's something new we added at 200.1.0, and the support for that code requires 200.1.0 as well.

With qmake you can tell the project version by this line:

ARCGIS_RUNTIME_VERSION = 200.1.0

 

Our QML API template should include a main.cpp that looks like this:

int main(int argc, char *argv[])
{
    qDebug() << "Initializing application";


#if defined(Q_OS_IOS)
#  if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0)
    extern const QStaticPlugin qt_static_plugin_ArcGISRuntimePlugin_compatibility();
    qRegisterStaticPluginFunction(qt_static_plugin_ArcGISRuntimePlugin_compatibility());
#  endif
#endif

    QGuiApplication app(argc, argv);

    // Use of Esri location services, including basemaps and geocoding, requires
    // either an ArcGIS identity or an API key. For more information see
    // https://links.esri.com/arcgis-runtime-security-auth.

 

That compatibility block is necessary for iOS when using Qt 6.3 or later, but it should work with our 200.1.0 release as long as that block is present.

0 Kudos