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. Simple link of Qt6::Core to my libs using qtbase and FetchContent
QtWS25 Last Chance

Simple link of Qt6::Core to my libs using qtbase and FetchContent

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
18 Posts 3 Posters 1.9k Views
  • 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.
  • MesrineM Mesrine

    thanks, @Christian-Ehrlicher
    For that I am using
    set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
    I will try to explicitly set that macro.
    Although is the ugliest thing i have see on c++ and do not think is the cause the linking is failing.

    MesrineM Offline
    MesrineM Offline
    Mesrine
    wrote on last edited by
    #9

    @Mesrine
    This resulted on the same warning when configuring

    -- Configuring done (96.9s)
    CMake Warning (dev) in CMakeLists.txt:
      AUTOGEN: No valid Qt version found for target qpow.  AUTOMOC disabled.
      Consider adding:
    
        find_package(Qt6 COMPONENTS Core)
    
      to your CMakeLists.txt file.
    

    and the same errors when linking for shared in mac and windows

    [812/815] Linking CXX shared library lib/QtCore.framework/Versions/A/QtCore
    [813/815] Linking CXX shared library _deps/qcurlp81-build/libqcurlp81.dylib
    [814/815] Linking CXX shared library _deps/qb1t6-build/libqb1t6.dylib
    [815/815] Linking CXX shared library libqpow.dylib
    FAILED: libqpow.dylib 
    : && /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DNDEBUG -O2 -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -mmacosx-version-min=12.6 -dynamiclib -Wl,-headerpad_max_install_names  -o libqpow.dylib -install_name @rpath/libqpow.dylib CMakeFiles/qpow.dir/qpow.cpp.o -F/Users/runner/work/_temp/build/lib -Wl,-rpath,/Users/runner/work/_temp/build/_deps/qb1t6-build -Wl,-rpath,/Users/runner/work/_temp/build/_deps/qcurlp81-build -Wl,-rpath,/Users/runner/work/_temp/build/lib  _deps/qb1t6-build/libqb1t6.dylib  _deps/qcurlp81-build/libqcurlp81.dylib  lib/QtCore.framework/Versions/A/QtCore  -framework IOKit  -framework DiskArbitration && :
    Undefined symbols for architecture x86_64:
      "qiota::qpow::nonceFinder::nonce_found(unsigned long long)", referenced from:
          QtPrivate::QFunctorSlotObject<qiota::qpow::nonceFinder::calculate(QByteArray const&)::$_0, 1, QtPrivate::List<unsigned long long>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in qpow.cpp.o
      "qiota::qpow::nonceFinder::nonce_not_found()", referenced from:
          QtPrivate::QFunctorSlotObject<qiota::qpow::nonceFinder::calculate(QByteArray const&)::$_1, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in qpow.cpp.o
      "qiota::qpow::WorkerThread::found_nonce(unsigned long long)", referenced from:
          qiota::qpow::WorkerThread::doWork(unsigned long long const&) in qpow.cpp.o
          qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o
      "qiota::qpow::WorkerThread::staticMetaObject", referenced from:
          qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o
      "vtable for qiota::qpow::nonceFinder", referenced from:
          qiota::qpow::nonceFinder::nonceFinder() in qpow.cpp.o
          qiota::qpow::nonceFinder::nonceFinder() in qpow.cpp.o
      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
      "vtable for qiota::qpow::WorkerThread", referenced from:
          qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o
      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.
    Error: Process completed with exit code 1.
    

    The missing symbols are classes that inherit from QObject and its signals .
    The fact that there is not linking problem on static builds for windows, mac, and for static and shared build for linux, tell me there is no symbol without definition on my code.
    And the linking problem is relate with the moc produced object.

    SGaistS 1 Reply Last reply
    0
    • MesrineM Mesrine

      @Mesrine
      This resulted on the same warning when configuring

      -- Configuring done (96.9s)
      CMake Warning (dev) in CMakeLists.txt:
        AUTOGEN: No valid Qt version found for target qpow.  AUTOMOC disabled.
        Consider adding:
      
          find_package(Qt6 COMPONENTS Core)
      
        to your CMakeLists.txt file.
      

      and the same errors when linking for shared in mac and windows

      [812/815] Linking CXX shared library lib/QtCore.framework/Versions/A/QtCore
      [813/815] Linking CXX shared library _deps/qcurlp81-build/libqcurlp81.dylib
      [814/815] Linking CXX shared library _deps/qb1t6-build/libqb1t6.dylib
      [815/815] Linking CXX shared library libqpow.dylib
      FAILED: libqpow.dylib 
      : && /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DNDEBUG -O2 -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -mmacosx-version-min=12.6 -dynamiclib -Wl,-headerpad_max_install_names  -o libqpow.dylib -install_name @rpath/libqpow.dylib CMakeFiles/qpow.dir/qpow.cpp.o -F/Users/runner/work/_temp/build/lib -Wl,-rpath,/Users/runner/work/_temp/build/_deps/qb1t6-build -Wl,-rpath,/Users/runner/work/_temp/build/_deps/qcurlp81-build -Wl,-rpath,/Users/runner/work/_temp/build/lib  _deps/qb1t6-build/libqb1t6.dylib  _deps/qcurlp81-build/libqcurlp81.dylib  lib/QtCore.framework/Versions/A/QtCore  -framework IOKit  -framework DiskArbitration && :
      Undefined symbols for architecture x86_64:
        "qiota::qpow::nonceFinder::nonce_found(unsigned long long)", referenced from:
            QtPrivate::QFunctorSlotObject<qiota::qpow::nonceFinder::calculate(QByteArray const&)::$_0, 1, QtPrivate::List<unsigned long long>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in qpow.cpp.o
        "qiota::qpow::nonceFinder::nonce_not_found()", referenced from:
            QtPrivate::QFunctorSlotObject<qiota::qpow::nonceFinder::calculate(QByteArray const&)::$_1, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in qpow.cpp.o
        "qiota::qpow::WorkerThread::found_nonce(unsigned long long)", referenced from:
            qiota::qpow::WorkerThread::doWork(unsigned long long const&) in qpow.cpp.o
            qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o
        "qiota::qpow::WorkerThread::staticMetaObject", referenced from:
            qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o
        "vtable for qiota::qpow::nonceFinder", referenced from:
            qiota::qpow::nonceFinder::nonceFinder() in qpow.cpp.o
            qiota::qpow::nonceFinder::nonceFinder() in qpow.cpp.o
        NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
        "vtable for qiota::qpow::WorkerThread", referenced from:
            qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o
        NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      ninja: build stopped: subcommand failed.
      Error: Process completed with exit code 1.
      

      The missing symbols are classes that inherit from QObject and its signals .
      The fact that there is not linking problem on static builds for windows, mac, and for static and shared build for linux, tell me there is no symbol without definition on my code.
      And the linking problem is relate with the moc produced object.

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #10

      As suggested above, did you point cmake to your installation of Qt 6 ?

      The automoc issue means that the files are not generated for your QObject based classes.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      MesrineM 1 Reply Last reply
      0
      • SGaistS SGaist

        As suggested above, did you point cmake to your installation of Qt 6 ?

        The automoc issue means that the files are not generated for your QObject based classes.

        MesrineM Offline
        MesrineM Offline
        Mesrine
        wrote on last edited by
        #11

        @SGaist I understand what you say, but as initially stated on my question i do not want to install Qt.
        I would like to find a pakage using cmake like

        find_package(Qt6 QUIET COMPONENTS Core)
        

        If is not present on the system make it available by using

        FetchContent_Declare(
                qtbase
                GIT_REPOSITORY git://code.qt.io/qt/qtbase.git
                GIT_TAG 6.5.0
                )
        FetchContent_MakeAvailable(qtbase)
        

        This a very reasonable design of cmake packages and targets.
        Ideally this will configure moc and rcc and built them at compilation time, to them use the moc executable with the QObject macros in my source code and finaly compile my library.

        So again my question is this can be done at the current state of qt6.5.0 or not?
        If can be done do anyone have a reference?

        MesrineM 1 Reply Last reply
        0
        • MesrineM Mesrine

          @SGaist I understand what you say, but as initially stated on my question i do not want to install Qt.
          I would like to find a pakage using cmake like

          find_package(Qt6 QUIET COMPONENTS Core)
          

          If is not present on the system make it available by using

          FetchContent_Declare(
                  qtbase
                  GIT_REPOSITORY git://code.qt.io/qt/qtbase.git
                  GIT_TAG 6.5.0
                  )
          FetchContent_MakeAvailable(qtbase)
          

          This a very reasonable design of cmake packages and targets.
          Ideally this will configure moc and rcc and built them at compilation time, to them use the moc executable with the QObject macros in my source code and finaly compile my library.

          So again my question is this can be done at the current state of qt6.5.0 or not?
          If can be done do anyone have a reference?

          MesrineM Offline
          MesrineM Offline
          Mesrine
          wrote on last edited by
          #12

          @Mesrine
          Regarding the warning

          -- Configuring done (96.9s)
          CMake Warning (dev) in CMakeLists.txt:
            AUTOGEN: No valid Qt version found for target qpow.  AUTOMOC disabled.
            Consider adding:
          
              find_package(Qt6 COMPONENTS Core)
          

          It seems one needs to set QT_VERSION_ variables to enable autogen according to this
          if set

          ...
          FetchContent_MakeAvailable(qtbase)
          set_directory_properties(PROPERTIES
                                        Qt6Core_VERSION_MAJOR 6
                                        Qt6Core_VERSION_MINOR 5
                                       Qt6Core_VERSION_PATCH 0)
          

          CMake complains like

          CMake Error: AUTOMOC for target qpow: The "moc" executable "/root/build/libexec/moc" does not exist.
          

          Cmake use the moc executable at configuration time?
          But the warning also occurs on linux (where it compiles without problems).

          SGaistS 1 Reply Last reply
          0
          • MesrineM Mesrine

            @Mesrine
            Regarding the warning

            -- Configuring done (96.9s)
            CMake Warning (dev) in CMakeLists.txt:
              AUTOGEN: No valid Qt version found for target qpow.  AUTOMOC disabled.
              Consider adding:
            
                find_package(Qt6 COMPONENTS Core)
            

            It seems one needs to set QT_VERSION_ variables to enable autogen according to this
            if set

            ...
            FetchContent_MakeAvailable(qtbase)
            set_directory_properties(PROPERTIES
                                          Qt6Core_VERSION_MAJOR 6
                                          Qt6Core_VERSION_MINOR 5
                                         Qt6Core_VERSION_PATCH 0)
            

            CMake complains like

            CMake Error: AUTOMOC for target qpow: The "moc" executable "/root/build/libexec/moc" does not exist.
            

            Cmake use the moc executable at configuration time?
            But the warning also occurs on linux (where it compiles without problems).

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #13

            I don't know how that function builds dependencies so I can't answer that. One of the issues I see is the amount of dependencies required to build Qt itself before building your own application, the fact that you would usually use the configure script to setup the build before using cmake to start the build. And finally, does that part end up in some cache ? Otherwise it means that you will rebuild qtbase everytime your CI runs which seems like a waste of electricity and time.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            MesrineM 1 Reply Last reply
            0
            • SGaistS SGaist

              I don't know how that function builds dependencies so I can't answer that. One of the issues I see is the amount of dependencies required to build Qt itself before building your own application, the fact that you would usually use the configure script to setup the build before using cmake to start the build. And finally, does that part end up in some cache ? Otherwise it means that you will rebuild qtbase everytime your CI runs which seems like a waste of electricity and time.

              MesrineM Offline
              MesrineM Offline
              Mesrine
              wrote on last edited by Mesrine
              #14

              @SGaist when using the qt install action, windows and mac compiles ok, for ubuntu i get the following error when building my library and the test executable

              [1/8] Automatic MOC and UIC for target qb1t6
              [2/8] Building CXX object CMakeFiles/qb1t6.dir/qb1t6_autogen/mocs_compilation.cpp.o
              [3/8] Building CXX object CMakeFiles/qb1t6.dir/qb1t6.cpp.o
              [4/8] Linking CXX shared library libqb1t6.so
              [5/8] Automatic MOC and UIC for target tip5
              [6/8] Building CXX object tests/CMakeFiles/tip5.dir/tip5_autogen/mocs_compilation.cpp.o
              [7/8] Building CXX object tests/CMakeFiles/tip5.dir/tip5.cpp.o
              [8/8] Linking CXX executable tests/tip5
              FAILED: tests/tip5 
              : && /usr/bin/c++ -O3 -DNDEBUG  tests/CMakeFiles/tip5.dir/tip5_autogen/mocs_compilation.cpp.o tests/CMakeFiles/tip5.dir/tip5.cpp.o -o tests/tip5  -Wl,-rpath,/home/runner/work/_temp/build:/home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib  libqb1t6.so  /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0 && :
              /usr/bin/ld: warning: libicui18n.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link)
              /usr/bin/ld: warning: libicuuc.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link)
              /usr/bin/ld: warning: libicudata.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link)
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_open_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `UCNV_FROM_U_CALLBACK_SUBSTITUTE_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `u_strToLower_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getStandardName_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getToUCallBack_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_cbFromUWriteUChars_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_toUCountPending_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_clone_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `UCNV_TO_U_CALLBACK_SUBSTITUTE_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getName_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_fromUCountPending_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `uenum_next_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_open_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_setToUCallBack_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_setAttribute_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `u_strToUpper_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_setFromUCallBack_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getTimeZoneDisplayName_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openCountryTimeZones_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_fromUnicode_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_open_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openTimeZones_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_inDaylightTime_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `uenum_close_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_close_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_cbToUWriteUChars_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openTimeZoneIDEnumeration_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_reset_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getDSTSavings_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getDefaultTimeZone_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_toUnicode_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getFromUCallBack_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_setMillis_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_strcoll_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_close_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_close_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_getSortKey_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getMaxCharSize_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getTimeZoneTransitionDate_56'
              /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_get_56'
              collect2: error: ld returned 1 exit status
              ninja: build stopped: subcommand failed.
              Error: Process completed with exit code 1.
              

              You can see the Cmakelists.txt here
              Do i need to manually install those libraries for every platform?
              when trying to install by

              sudo apt-get install ninja-build cmake build-essential libgl1-mesa-dev libicu-dev
              

              it says:

              libicu-dev is already the newest version (70.1-2).
              
              SGaistS 1 Reply Last reply
              0
              • MesrineM Mesrine

                @SGaist when using the qt install action, windows and mac compiles ok, for ubuntu i get the following error when building my library and the test executable

                [1/8] Automatic MOC and UIC for target qb1t6
                [2/8] Building CXX object CMakeFiles/qb1t6.dir/qb1t6_autogen/mocs_compilation.cpp.o
                [3/8] Building CXX object CMakeFiles/qb1t6.dir/qb1t6.cpp.o
                [4/8] Linking CXX shared library libqb1t6.so
                [5/8] Automatic MOC and UIC for target tip5
                [6/8] Building CXX object tests/CMakeFiles/tip5.dir/tip5_autogen/mocs_compilation.cpp.o
                [7/8] Building CXX object tests/CMakeFiles/tip5.dir/tip5.cpp.o
                [8/8] Linking CXX executable tests/tip5
                FAILED: tests/tip5 
                : && /usr/bin/c++ -O3 -DNDEBUG  tests/CMakeFiles/tip5.dir/tip5_autogen/mocs_compilation.cpp.o tests/CMakeFiles/tip5.dir/tip5.cpp.o -o tests/tip5  -Wl,-rpath,/home/runner/work/_temp/build:/home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib  libqb1t6.so  /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0 && :
                /usr/bin/ld: warning: libicui18n.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link)
                /usr/bin/ld: warning: libicuuc.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link)
                /usr/bin/ld: warning: libicudata.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link)
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_open_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `UCNV_FROM_U_CALLBACK_SUBSTITUTE_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `u_strToLower_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getStandardName_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getToUCallBack_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_cbFromUWriteUChars_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_toUCountPending_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_clone_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `UCNV_TO_U_CALLBACK_SUBSTITUTE_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getName_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_fromUCountPending_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `uenum_next_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_open_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_setToUCallBack_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_setAttribute_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `u_strToUpper_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_setFromUCallBack_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getTimeZoneDisplayName_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openCountryTimeZones_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_fromUnicode_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_open_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openTimeZones_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_inDaylightTime_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `uenum_close_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_close_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_cbToUWriteUChars_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openTimeZoneIDEnumeration_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_reset_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getDSTSavings_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getDefaultTimeZone_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_toUnicode_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getFromUCallBack_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_setMillis_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_strcoll_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_close_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_close_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_getSortKey_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getMaxCharSize_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getTimeZoneTransitionDate_56'
                /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_get_56'
                collect2: error: ld returned 1 exit status
                ninja: build stopped: subcommand failed.
                Error: Process completed with exit code 1.
                

                You can see the Cmakelists.txt here
                Do i need to manually install those libraries for every platform?
                when trying to install by

                sudo apt-get install ninja-build cmake build-essential libgl1-mesa-dev libicu-dev
                

                it says:

                libicu-dev is already the newest version (70.1-2).
                
                SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #15

                @Mesrine which version of Ubuntu would that be ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                MesrineM 1 Reply Last reply
                0
                • SGaistS SGaist

                  @Mesrine which version of Ubuntu would that be ?

                  MesrineM Offline
                  MesrineM Offline
                  Mesrine
                  wrote on last edited by
                  #16

                  @SGaist Distributor ID: Ubuntu
                  Description: Ubuntu 22.04.2 LTS
                  Release: 22.04
                  Codename: jammy

                  MesrineM 1 Reply Last reply
                  0
                  • MesrineM Mesrine

                    @SGaist Distributor ID: Ubuntu
                    Description: Ubuntu 22.04.2 LTS
                    Release: 22.04
                    Codename: jammy

                    MesrineM Offline
                    MesrineM Offline
                    Mesrine
                    wrote on last edited by
                    #17

                    @Mesrine
                    I was using the action like

                    - name: Install Qt
                            uses: jurplel/install-qt-action@v3
                            with:
                              version: '6.5.0'
                              archives: 'qtbase'
                    

                    but if you change to

                    - name: Install Qt
                            uses: jurplel/install-qt-action@v3
                            with:
                              version: '6.5.0'
                    

                    it works

                    SGaistS 1 Reply Last reply
                    0
                    • MesrineM Mesrine

                      @Mesrine
                      I was using the action like

                      - name: Install Qt
                              uses: jurplel/install-qt-action@v3
                              with:
                                version: '6.5.0'
                                archives: 'qtbase'
                      

                      but if you change to

                      - name: Install Qt
                              uses: jurplel/install-qt-action@v3
                              with:
                                version: '6.5.0'
                      

                      it works

                      SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #18

                      I suspect that the libraries are installed along another module but I currently don't know which one.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      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