Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cannot compile QtOpcUa
Forum Updated to NodeBB v4.3 + New Features

Cannot compile QtOpcUa

Scheduled Pinned Locked Moved Solved Installation and Deployment
4 Posts 2 Posters 344 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mark81
    wrote on last edited by Mark81
    #1

    I've just discovered they don't provide QtOpcUa from the Qt online installer.
    So I'm trying to build it by myself against Qt 6.2.0.
    The instructions I found are outdated so I'm guessing how to compile:

    git clone https://code.qt.io/qt/qtopcua.git
    cd qtopcua
    git checkout 6.2.0
    mkdir build && cd build
    export Qt6_DIR=~/Qt/6.2.0/gcc_64/lib/cmake/Qt6/
    ~/Qt/Tools/CMake/bin/cmake  ..
    

    But it reports a lot of errors:

    CMake Warning:
      No source or binary directory provided.  Both will be assumed to be the
      same as the current working directory, but note that this warning will
      become a fatal error in future CMake releases.
    
    
    -- Looking for pthread.h
    -- Looking for pthread.h - found
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
    -- Check if compiler accepts -pthread
    -- Check if compiler accepts -pthread - yes
    -- Found Threads: TRUE  
    -- Performing Test HAVE_STDATOMIC
    -- Performing Test HAVE_STDATOMIC - Success
    -- Found WrapAtomic: TRUE  
    -- Could NOT find Qt6CoreTools (missing: Qt6CoreTools_DIR)
    CMake Warning at /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:176 (find_package):
      Found package configuration file:
    
        /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake
    
      but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be
      NOT FOUND.
    Call Stack (most recent call first):
      CMakeLists.txt:20 (find_package)
    
    
    -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1f")  
    -- Found WrapOpenSSLHeaders: /usr/include (found version "1.1.1f") 
    -- Could NOT find Qt6CoreTools (missing: Qt6CoreTools_DIR)
    CMake Warning at /home/user/Qt/Tools/CMake/share/cmake-3.21/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
      Found package configuration file:
    
        /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake
    
      but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be
      NOT FOUND.
    Call Stack (most recent call first):
      /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
      /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Network/Qt6NetworkDependencies.cmake:91 (_qt_internal_find_dependencies)
      /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Network/Qt6NetworkConfig.cmake:40 (include)
      /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:176 (find_package)
      CMakeLists.txt:20 (find_package)
    
    
    CMake Warning at /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:176 (find_package):
      Found package configuration file:
    
        /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Network/Qt6NetworkConfig.cmake
    
      but it set Qt6Network_FOUND to FALSE so package "Qt6Network" is considered
      to be NOT FOUND.  Reason given by package:
    
      Qt6Network could not be found because dependency Qt6Core could not be
      found.
    
    Call Stack (most recent call first):
      CMakeLists.txt:20 (find_package)
    
    
    CMake Error at CMakeLists.txt:20 (find_package):
      Found package configuration file:
    
        /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake
    
      but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
      FOUND.  Reason given by package:
    
      Failed to find Qt component "Core".
    
      Expected Config file at
      "/home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake"
      exists
    
      Failed to find Qt component "Network".
    
      Expected Config file at
      "/home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Network/Qt6NetworkConfig.cmake"
      exists
    

    by the way I don't understand a message like the last ones:

    "Failed to find <something>. Expected file at <path> exists."

    so if it exists why it cannot find it?
    Any hint to build this module?

    raven-worxR 1 Reply Last reply
    0
    • M Mark81

      I've just discovered they don't provide QtOpcUa from the Qt online installer.
      So I'm trying to build it by myself against Qt 6.2.0.
      The instructions I found are outdated so I'm guessing how to compile:

      git clone https://code.qt.io/qt/qtopcua.git
      cd qtopcua
      git checkout 6.2.0
      mkdir build && cd build
      export Qt6_DIR=~/Qt/6.2.0/gcc_64/lib/cmake/Qt6/
      ~/Qt/Tools/CMake/bin/cmake  ..
      

      But it reports a lot of errors:

      CMake Warning:
        No source or binary directory provided.  Both will be assumed to be the
        same as the current working directory, but note that this warning will
        become a fatal error in future CMake releases.
      
      
      -- Looking for pthread.h
      -- Looking for pthread.h - found
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
      -- Check if compiler accepts -pthread
      -- Check if compiler accepts -pthread - yes
      -- Found Threads: TRUE  
      -- Performing Test HAVE_STDATOMIC
      -- Performing Test HAVE_STDATOMIC - Success
      -- Found WrapAtomic: TRUE  
      -- Could NOT find Qt6CoreTools (missing: Qt6CoreTools_DIR)
      CMake Warning at /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:176 (find_package):
        Found package configuration file:
      
          /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake
      
        but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be
        NOT FOUND.
      Call Stack (most recent call first):
        CMakeLists.txt:20 (find_package)
      
      
      -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1f")  
      -- Found WrapOpenSSLHeaders: /usr/include (found version "1.1.1f") 
      -- Could NOT find Qt6CoreTools (missing: Qt6CoreTools_DIR)
      CMake Warning at /home/user/Qt/Tools/CMake/share/cmake-3.21/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
        Found package configuration file:
      
          /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake
      
        but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be
        NOT FOUND.
      Call Stack (most recent call first):
        /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
        /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Network/Qt6NetworkDependencies.cmake:91 (_qt_internal_find_dependencies)
        /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Network/Qt6NetworkConfig.cmake:40 (include)
        /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:176 (find_package)
        CMakeLists.txt:20 (find_package)
      
      
      CMake Warning at /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:176 (find_package):
        Found package configuration file:
      
          /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Network/Qt6NetworkConfig.cmake
      
        but it set Qt6Network_FOUND to FALSE so package "Qt6Network" is considered
        to be NOT FOUND.  Reason given by package:
      
        Qt6Network could not be found because dependency Qt6Core could not be
        found.
      
      Call Stack (most recent call first):
        CMakeLists.txt:20 (find_package)
      
      
      CMake Error at CMakeLists.txt:20 (find_package):
        Found package configuration file:
      
          /home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake
      
        but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
        FOUND.  Reason given by package:
      
        Failed to find Qt component "Core".
      
        Expected Config file at
        "/home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake"
        exists
      
        Failed to find Qt component "Network".
      
        Expected Config file at
        "/home/user/Qt/6.2.0/gcc_64/lib/cmake/Qt6Network/Qt6NetworkConfig.cmake"
        exists
      

      by the way I don't understand a message like the last ones:

      "Failed to find <something>. Expected file at <path> exists."

      so if it exists why it cannot find it?
      Any hint to build this module?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

      @Mark81 said in Cannot compile QtOpcUa:

      The instructions I found are outdated so I'm guessing how to compile:
      git clone https://code.qt.io/qt/qtopcua.git
      cd qtopcua
      git checkout 6.2.0
      mkdir build && cd build
      export Qt6_DIR=~/Qt/6.2.0/gcc_64/lib/cmake/Qt6/
      ~/Qt/Tools/CMake/bin/cmake ..

      this is correct until the last 2 lines. Instead simply call:

      /path/to/Qt/6.2.0/bin/qt-configure-module ..
      cmake --build . --parallel
      cmake --install .
      

      also read
      https://www.qt.io/blog/qt-6-build-system

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      M 2 Replies Last reply
      2
      • raven-worxR raven-worx

        @Mark81 said in Cannot compile QtOpcUa:

        The instructions I found are outdated so I'm guessing how to compile:
        git clone https://code.qt.io/qt/qtopcua.git
        cd qtopcua
        git checkout 6.2.0
        mkdir build && cd build
        export Qt6_DIR=~/Qt/6.2.0/gcc_64/lib/cmake/Qt6/
        ~/Qt/Tools/CMake/bin/cmake ..

        this is correct until the last 2 lines. Instead simply call:

        /path/to/Qt/6.2.0/bin/qt-configure-module ..
        cmake --build . --parallel
        cmake --install .
        

        also read
        https://www.qt.io/blog/qt-6-build-system

        M Offline
        M Offline
        Mark81
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • raven-worxR raven-worx

          @Mark81 said in Cannot compile QtOpcUa:

          The instructions I found are outdated so I'm guessing how to compile:
          git clone https://code.qt.io/qt/qtopcua.git
          cd qtopcua
          git checkout 6.2.0
          mkdir build && cd build
          export Qt6_DIR=~/Qt/6.2.0/gcc_64/lib/cmake/Qt6/
          ~/Qt/Tools/CMake/bin/cmake ..

          this is correct until the last 2 lines. Instead simply call:

          /path/to/Qt/6.2.0/bin/qt-configure-module ..
          cmake --build . --parallel
          cmake --install .
          

          also read
          https://www.qt.io/blog/qt-6-build-system

          M Offline
          M Offline
          Mark81
          wrote on last edited by
          #4

          @raven-worx thanks, I was able to compile! Out of curiosity, is there a script for Linux to export all the relevant environment variables like in Windows (the "Qt Console") ? I spent a couple of hours to figure out why it cannot find the tools (CMake and Ninja). Then I had to export their paths and finally it compiled.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved