Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error while compiling Qt from source - use of undeclared identifier 'QOAuth1Signature'
Forum Updated to NodeBB v4.3 + New Features

Error while compiling Qt from source - use of undeclared identifier 'QOAuth1Signature'

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 1.1k Views 3 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.
  • haikuH Offline
    haikuH Offline
    haiku
    wrote on last edited by haiku
    #1

    Hello! I'm trying to build Qt from source and I'm running into an error about 3 hours into the build (See end for error)

    I am compiling on Ubuntu (Windows Linux Subsystem) following the instructions here and here.

    The exact commands I ran were:

    mkdir qt
    cd qt
    
    git clone git://code.qt.io/qt/qt5.git
    cd qt5
    git checkout 5.15.0
    perl init-repository --module-subset=default,-qtwebengine
    
    cd ..
    mkdir build
    cd build
    
    ../qt5/configure -xplatform wasm-emscripten -opensource -nomake examples -prefix $PWD/qtbase
    make
    

    And here is the error I am getting:

    em++ -c -Xclang -include-pch -Xclang .pch/Qt5NetworkAuth.pch/c++.pch -pipe -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -s ALLOW_MEMORY_GROWTH=1 -Wall -Wextra -Wdate-time -Winconsistent-missing-override -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_NETWORKAUTH_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I/mnt/s/qt/qt5/qtnetworkauth/src/oauth -I. -I/mnt/s/qt/build/qtbase/include -I/mnt/s/qt/build/qtbase/include/QtNetworkAuth -I/mnt/s/qt/build/qtbase/include/QtNetworkAuth/5.15.0 -I/mnt/s/qt/build/qtbase/include/QtNetworkAuth/5.15.0/QtNetworkAuth -I/mnt/s/qt/build/qtbase/include/QtCore/5.15.0 -I/mnt/s/qt/build/qtbase/include/QtCore/5.15.0/QtCore -I/mnt/s/qt/build/qtbase/include/QtNetwork -I/mnt/s/qt/build/qtbase/include/QtCore -I.moc -I/mnt/s/qt/qt5/qtbase/mkspecs/wasm-emscripten -o .obj/qoauth1signature.o /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp
    In file included from /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:31:
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature_p.h:57:46: error: use of undeclared identifier 'QOAuth1Signature'
        QOAuth1SignaturePrivate(const QUrl &url, QOAuth1Signature::HttpRequestMethod method,
                                                 ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature_p.h:68:5: error: use of undeclared identifier 'QOAuth1Signature'
        QOAuth1Signature::HttpRequestMethod method = QOAuth1Signature::HttpRequestMethod::Post;
        ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:85:32: error: use of undeclared identifier 'QOAuth1Signature'
    static_assert(static_cast<int>(QOAuth1Signature::HttpRequestMethod::Head) ==
                                   ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:87:32: error: use of undeclared identifier 'QOAuth1Signature'
                  static_cast<int>(QOAuth1Signature::HttpRequestMethod::Get) ==
                                   ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:89:32: error: use of undeclared identifier 'QOAuth1Signature'
                  static_cast<int>(QOAuth1Signature::HttpRequestMethod::Put) ==
                                   ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:91:32: error: use of undeclared identifier 'QOAuth1Signature'
                  static_cast<int>(QOAuth1Signature::HttpRequestMethod::Post) ==
                                   ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:93:32: error: use of undeclared identifier 'QOAuth1Signature'
                  static_cast<int>(QOAuth1Signature::HttpRequestMethod::Delete) ==
                                   ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:100:50: error: use of undeclared identifier 'QOAuth1Signature'
                                                     QOAuth1Signature::HttpRequestMethod method,
                                                     ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:114:10: error: use of undeclared identifier 'QOAuth1Signature'
        case QOAuth1Signature::HttpRequestMethod::Head:
             ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:117:10: error: use of undeclared identifier 'QOAuth1Signature'
        case QOAuth1Signature::HttpRequestMethod::Get:
             ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:120:10: error: use of undeclared identifier 'QOAuth1Signature'
        case QOAuth1Signature::HttpRequestMethod::Put:
             ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:123:10: error: use of undeclared identifier 'QOAuth1Signature'
        case QOAuth1Signature::HttpRequestMethod::Post:
             ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:126:10: error: use of undeclared identifier 'QOAuth1Signature'
        case QOAuth1Signature::HttpRequestMethod::Delete:
             ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:129:10: error: use of undeclared identifier 'QOAuth1Signature'
        case QOAuth1Signature::HttpRequestMethod::Custom:
             ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:194:1: error: use of undeclared identifier 'QOAuth1Signature'
    QOAuth1Signature::QOAuth1Signature(const QUrl &url, QOAuth1Signature::HttpRequestMethod method,
    ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:194:53: error: use of undeclared identifier 'QOAuth1Signature'
    QOAuth1Signature::QOAuth1Signature(const QUrl &url, QOAuth1Signature::HttpRequestMethod method,
                                                        ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:211:1: error: use of undeclared identifier 'QOAuth1Signature'
    QOAuth1Signature::QOAuth1Signature(const QUrl &url, const QString &clientSharedKey,
    ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:212:64: error: unknown type name 'HttpRequestMethod'
                                       const QString &tokenSecret, HttpRequestMethod method,
                                                                   ^
    /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp:220:1: error: use of undeclared identifier 'QOAuth1Signature'
    QOAuth1Signature::QOAuth1Signature(const QOAuth1Signature &other) : d(other.d)
    ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    em++: error: '/mnt/s/emscripten/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=20 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/system/include -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/system/include/SSE -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/system/lib/compiler-rt/include -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/cache/wasm/include -DEMSCRIPTEN -fignore-exceptions -c -Xclang -include-pch -Xclang .pch/Qt5NetworkAuth.pch/c++.pch -pipe -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wdate-time -Winconsistent-missing-override -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_NETWORKAUTH_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I/mnt/s/qt/qt5/qtnetworkauth/src/oauth -I. -I/mnt/s/qt/build/qtbase/include -I/mnt/s/qt/build/qtbase/include/QtNetworkAuth -I/mnt/s/qt/build/qtbase/include/QtNetworkAuth/5.15.0 -I/mnt/s/qt/build/qtbase/include/QtNetworkAuth/5.15.0/QtNetworkAuth -I/mnt/s/qt/build/qtbase/include/QtCore/5.15.0 -I/mnt/s/qt/build/qtbase/include/QtCore/5.15.0/QtCore -I/mnt/s/qt/build/qtbase/include/QtNetwork -I/mnt/s/qt/build/qtbase/include/QtCore -I.moc -I/mnt/s/qt/qt5/qtbase/mkspecs/wasm-emscripten /mnt/s/qt/qt5/qtnetworkauth/src/oauth/qoauth1signature.cpp -Xclang -isystem/mnt/s/emscripten/emsdk/upstream/emscripten/system/include/SDL -c -o .obj/qoauth1signature.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)
    Makefile:3325: recipe for target '.obj/qoauth1signature.o' failed
    make[3]: *** [.obj/qoauth1signature.o] Error 1
    make[3]: Leaving directory '/mnt/s/qt/build/qtnetworkauth/src/oauth'
    Makefile:46: recipe for target 'sub-oauth-make_first-ordered' failed
    make[2]: *** [sub-oauth-make_first-ordered] Error 2
    make[2]: Leaving directory '/mnt/s/qt/build/qtnetworkauth/src'
    Makefile:48: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/mnt/s/qt/build/qtnetworkauth'
    Makefile:112: recipe for target 'module-qtnetworkauth-make_first' failed
    make: *** [module-qtnetworkauth-make_first] Error 2
    

    I am compiling for webassembly however this doesn't look like an emscripten issue to me.
    Any help would be appretiated.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Followings the Qt webassembly platform notes, it looks like that module is not yet supported.

      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
      1
      • haikuH Offline
        haikuH Offline
        haiku
        wrote on last edited by
        #3

        Hi SGaist, thanks, that's likely the issue.

        I did see in the wiki that it suggests running make module-qtbase module-qtdeclarative [other modules] but I wasn't sure what modules I needed so I just ran make assuming everything would work. I'll be more explicit and report back.

        1 Reply Last reply
        0
        • haikuH Offline
          haikuH Offline
          haiku
          wrote on last edited by
          #4

          Ran make with all supported webassemly modules as arguments and everything worked (no errors)
          make module-qtbase module-qtdeclarative module-qtquickcontrols2 module-qtwebsockets module-qtsvg module-qtcharts module-qtmqtt

          Thanks again @SGaist

          1 Reply Last reply
          0
          • D Offline
            D Offline
            divyanshusahu
            wrote on last edited by
            #5

            I followed all the above steps and I got the following error after running the make with all supported modules.

            make module-qtbase module-qtdeclarative module-qtquickcontrols2 module-qtwebsockets module-qtsvg module-qtcharts module-qtmqtt
            

            Error:

            make: *** No rule to make target 'module-qtmqtt'.  Stop.
            
            SGaistS 1 Reply Last reply
            0
            • D divyanshusahu

              I followed all the above steps and I got the following error after running the make with all supported modules.

              make module-qtbase module-qtdeclarative module-qtquickcontrols2 module-qtwebsockets module-qtsvg module-qtcharts module-qtmqtt
              

              Error:

              make: *** No rule to make target 'module-qtmqtt'.  Stop.
              
              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @divyanshusahu hi and welcome to devnet,

              Are you sure that you have that module in your sources ?

              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
              • D Offline
                D Offline
                divyanshusahu
                wrote on last edited by divyanshusahu
                #7

                Silly me, sorry, it is not present.

                I build it after removing "module-qtmqtt" and it works.

                One more question:
                I am compiling my existing QT project using emcmake cmake and it generates the following warnings and error.

                Warning:

                CMake Warning (dev) at /home/divyanshu/qt/build/qtbase/lib/cmake/Qt5Gui/Qt5Gui_QGifPlugin.cmake:2 (add_library):
                  ADD_LIBRARY called with MODULE option but the target platform does not
                  support dynamic linking.  Building a STATIC library instead.  This may lead
                  to problems.
                

                Error:

                CMake Error at /home/divyanshu/qt/build/qtbase/lib/cmake/Qt5Gui/Qt5Gui_QSvgIconPlugin.cmake:8 (find_package):
                  Could not find a package configuration file provided by "Qt5Svg" (requested
                  version 1.0.0) with any of the following names:
                
                    Qt5SvgConfig.cmake
                    qt5svg-config.cmake
                

                Is the warning generation normal or there is an error with my QT build? Can you help me with the above error?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Not knowing the options you used, I can't tell.

                  You also did not say what version of Qt you built.

                  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
                  • D Offline
                    D Offline
                    divyanshusahu
                    wrote on last edited by divyanshusahu
                    #9

                    My steps are exactly the same stated above by @haiku .

                    Qt version 5.15
                    Emscripten Version: 1.39.8

                    mkdir qt
                    cd qt
                    
                    git clone git://code.qt.io/qt/qt5.git
                    cd qt5
                    git checkout 5.15.0
                    ./init-repository --module-subset=default,-qtwebengine
                    
                    cd ..
                    mkdir build
                    cd build
                    
                    ../qt5/configure -xplatform wasm-emscripten -opensource -nomake examples -prefix $PWD/qtbase
                    make module-qtbase module-qtdeclarative module-qtquickcontrols2 module-qtwebsockets module-qtsvg module-qtcharts
                    
                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Ok, I forgot it was about wasm.

                      You might need some updates to your cmake project as the wasm build is static IIRC and your application might be using modules that are not (yet) supported by that platform.

                      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