[Interest] QTOPCUA: Can't compile with UACpp plugin

Klaus Schwarzkopf klaus.schwarzkopf at sensortherm.de
Wed Feb 24 17:12:50 CET 2021


Hello,

i want to try qtopcua with the UACpp plugin, but it doesn't work

Environment: Ubuntu 20.04
UACpp: 
uasdkcppbundlepubsub-bin-EVAL-debian9.3-x86_64-gcc6.3.0-v1.7.3-505.tar.gz

How i tried it:


klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~$ sudo apt-get install 
cmake cmake-curses-gui cmake-qt-gui build-essential build-essential
[sudo] password for klaus:
Reading package lists... Done
Building dependency tree
Reading state information... Done
cmake is already the newest version (3.16.3-1ubuntu1).
cmake-curses-gui is already the newest version (3.16.3-1ubuntu1).
cmake-qt-gui is already the newest version (3.16.3-1ubuntu1).
build-essential is already the newest version (12.8ubuntu1.1).
0 to upgrade, 0 to newly install, 0 to remove and 10 not to upgrade.
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~$ cd /home/klaus/uasdkcpp/sdk
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/uasdkcpp/sdk$ export 
SDKDIR=$PWD
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/uasdkcpp/sdk$ export 
CFLAGS=-fPIC
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/uasdkcpp/sdk$ export 
CXXFLAGS=-fPIC
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/uasdkcpp/sdk$ mkdir build
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/uasdkcpp/sdk$ cd build
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/uasdkcpp/sdk/build$ cmake 
-G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$SDKDIR 
-DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=off 
-DBUILD_SHARED_STACK=off -DBUILD_UAMODELS=off -DBUILD_UAMODULE=off 
-DBUILD_COREMODULE=off -DBUILD_EXAMPLES=off -DBUILD_UASERVERCPP_APP=off 
-DBUILD_TESTING=off ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ######################### Creating Makefile of uasdk 
###############################################
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version 
"1.1.1f")
-- Found OpenSSL: 
/usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so 
(found version "1.1.1f")
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version 
"2.9.10")
-- Detected GCC version: 9.3.0
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Detected GCC version: 9.3.0
-- Found UUID header:  /usr/include
-- Found UUID library: /usr/lib/x86_64-linux-gnu/libuuid.so
-- Could NOT find Mocana NanoCrypto, try to set the path to NanoCrypto 
root folder in the system variable NANOCRYPTO_ROOT_DIR (missing: 
NANOCRYPTO_LIBRARIES NANOCRYPTO_INCLUDE_DIR)
-- Looking for fprintf
-- Looking for fprintf - found
-- BUILD_LIBUACRYPTO                                 FALSE
-- BUILD_LIBUAPKI                                    FALSE
-- BUILD_LIBUAPKISTORE                               FALSE
-- SECURITY_BACKEND                                  openssl
-- SUPPORT_FILE_IO                                   TRUE
-- BUILD_LIBUASERVER                                 FALSE
-- BUILD_LIBUACLIENT                                 FALSE
-- BUILD_LIBUACONFIG                                 FALSE
-- BUILD_LIBUAAPPLICATION                            FALSE
-- BUILD_LIBUAFILEFORMAT                             FALSE
-- BUILD_LIBUASECONV                                 FALSE
-- BUILD_LIBUATCP                                    FALSE
-- BUILD_XMLPARSER                                   FALSE
-- ENABLE_TO_STRING                                  TRUE
-- ENABLE_FROM_STRING                                TRUE
-- ENABLE_DIAGNOSTICS                                TRUE
-- UA_SUPPORT_DESCRIPTION                            TRUE
-- UA_SUPPORT_HISTORIZING                            TRUE
-- MEMORY_USE_SHM                                    FALSE
-- TRACE_ENABLED                                     TRUE
-- TRACE_BACKEND                                     fnhook
-- ENABLE_COLOR                                      Not defined
-- ######################### Creating Makefile of uasdk_examples 
######################################
-- BUILD_LIBUACRYPTO                                 FALSE
-- BUILD_LIBUAPKI                                    FALSE
-- BUILD_LIBUAPKISTORE                               FALSE
-- SECURITY_BACKEND                                  openssl
-- SUPPORT_FILE_IO                                   TRUE
-- BUILD_LIBUASERVER                                 FALSE
-- BUILD_LIBUACLIENT                                 FALSE
-- BUILD_LIBUACONFIG                                 FALSE
-- BUILD_LIBUAAPPLICATION                            FALSE
-- BUILD_LIBUAFILEFORMAT                             FALSE
-- BUILD_LIBUASECONV                                 FALSE
-- BUILD_LIBUATCP                                    FALSE
-- BUILD_XMLPARSER                                   FALSE
-- ENABLE_TO_STRING                                  TRUE
-- ENABLE_FROM_STRING                                TRUE
-- ENABLE_DIAGNOSTICS                                TRUE
-- UA_SUPPORT_DESCRIPTION                            TRUE
-- UA_SUPPORT_HISTORIZING                            TRUE
-- MEMORY_USE_SHM                                    FALSE
-- TRACE_ENABLED                                     TRUE
-- TRACE_BACKEND                                     fnhook
-- ENABLE_COLOR                                      Not defined
-- 
-- ######################### Creating Makefile of client_cpp_sdk 
######################################
-- Configuring done
-- Generating done
CMake Warning:
   Manually-specified variables were not used by the project:

     BUILD_COREMODULE
     BUILD_TESTING
     BUILD_UAMODELS
     BUILD_UAMODULE


-- Build files have been written to: /home/klaus/uasdkcpp/sdk/build
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/uasdkcpp/sdk/build$ make
Scanning dependencies of target client_cpp_sdk
[ 14%] Building CXX object 
examples/client_cpp_sdk/CMakeFiles/client_cpp_sdk.dir/client_cpp_sdk.cpp.o
[ 28%] Building CXX object 
examples/client_cpp_sdk/CMakeFiles/client_cpp_sdk.dir/clientconfig.cpp.o
[ 42%] Building CXX object 
examples/client_cpp_sdk/CMakeFiles/client_cpp_sdk.dir/demo_datatypes.cpp.o
[ 57%] Building CXX object 
examples/client_cpp_sdk/CMakeFiles/client_cpp_sdk.dir/demo_vector.cpp.o
[ 71%] Building CXX object 
examples/client_cpp_sdk/CMakeFiles/client_cpp_sdk.dir/demo_uniontest.cpp.o
[ 85%] Building CXX object 
examples/client_cpp_sdk/CMakeFiles/client_cpp_sdk.dir/__/utilities/shutdown.cpp.o
[100%] Linking CXX executable client_cpp_sdkd
[100%] Built target client_cpp_sdk
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/uasdkcpp/sdk/build$ sudo 
make install
[100%] Built target client_cpp_sdk
Install the project...
-- Install configuration: "Debug"
-- Installing: /home/klaus/uasdkcpp/sdk/bin/client_cpp_sdkd
-- Set runtime path of "/home/klaus/uasdkcpp/sdk/bin/client_cpp_sdkd" to 
"$ORIGIN/../lib"
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/uasdkcpp/sdk/build$ export 
CFLAGS=
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/uasdkcpp/sdk/build$ export 
CXXFLAGS=
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/uasdkcpp/sdk/build$ cd ~
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~$ git clone 
https://code.qt.io/qt/qtopcua.git
Cloning into 'qtopcua'...
remote: Counting objects: 9436, done.
remote: Compressing objects: 100% (5414/5414), done.
remote: Total 9436 (delta 5932), reused 6386 (delta 3932)
Receiving objects: 100% (9436/9436), 2.84 MiB | 2.13 MiB/s, done.
Resolving deltas: 100% (5932/5932), done.
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~$ cd qtopcua
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/qtopcua$ git checkout 5.12
Branch '5.12' set up to track remote branch '5.12' from 'origin'.
Switched to a new branch '5.12'
klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/qtopcua$ vim 
src/3rdparty/open62541.pri

# OPEN62541_CFLAGS += -Wno-unused-parameter -Wno-unused-function 
-Wno-incompatible-pointer-types -Wno-format -std=c99 
-Wno-format-security -Wno-date-time


klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/qtopcua/build$ qmake ../ 
CONFIG+=debug -- UACPP_PREFIX=$SDKDIR

Running configuration tests...
Checking for Open62541... no
Checking for Unified Automation C++ SDK... no
Done running configuration tests.

Configure summary:

Qt Opcua:
   Open62541 .............................. yes
   Unified Automation C++ SDK ............. no
   Support for namespace 0 NodeId names ... yes
   Namespace 0 NodeIds generator .......... no

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into '/usr'.

Prior to reconfiguration, make sure you remove any leftovers from
the previous build.

klaus at klaus-HP-Pavilion-All-in-One-24-k0xxx:~/qtopcua/build$ cat config.log
Command line: UACPP_PREFIX=/home/klaus/uasdkcpp/sdk
Global lib dirs: [] [/usr/lib/gcc/x86_64-linux-gnu/9 
/usr/lib/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib]
Global inc dirs: [] [/usr/include/c++/9 
/usr/include/x86_64-linux-gnu/c++/9 /usr/include/c++/9/backward 
/usr/lib/gcc/x86_64-linux-gnu/9/include /usr/local/include 
/usr/include/x86_64-linux-gnu /usr/include]
looking for library open62541
Trying source 0 (type inline) of library open62541 ...
   => source failed condition '!config.win32 && input.open62541 == 
'system''.
Trying source 1 (type inline) of library open62541 ...
   => source failed condition 'config.win32 && input.open62541 == 'system''.
Trying source 2 (type pkgConfig) of library open62541 ...
   => source failed condition 'input.open62541 == 'system''.
test config.qtopcua_opcua.libraries.open62541 FAILED
looking for library uacpp
Trying source 0 (type uacpp) of library uacpp ...
   => source failed condition 'config.win32 && var.QT_EDITION != 
'OpenSource''.
Trying source 1 (type uacpp) of library uacpp ...
   => source failed condition '!config.win32 && var.QT_EDITION != 
'OpenSource''.
test config.qtopcua_opcua.libraries.uacpp FAILED



qmake still don't want this sdk:
   Unified Automation C++ SDK ............. no

Hope you can help.

Best regards,
Klaus


-- 
Sensortherm GmbH
Weißkirchener Straße 2-6
D-61449 Steinbach
Germany

Registergericht:/Registry office: Amtsgericht Frankfurt/M.
Eintragungs-Nr.:/Registry-No. HRB 52438
Geschäftsführer:/General Manager: Benjamin Wuttke


More information about the Interest mailing list