Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Debian build - error: undefined reference to 'QQmlWebChannel'
Forum Updated to NodeBB v4.3 + New Features

Debian build - error: undefined reference to 'QQmlWebChannel'

Scheduled Pinned Locked Moved Unsolved QtWebEngine
8 Posts 2 Posters 2.6k Views 1 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.
  • P Offline
    P Offline
    professorkaos64
    wrote on 5 Apr 2016, 12:21 last edited by professorkaos64 4 May 2016, 12:25
    #1

    System notes:

    • Target OS: Debian Jessie
    • Build system: pbuilder / clean environment

    Description

    I am having a heck of a time trying to build QtWebengine. I have built all the prior packages needed thus far, backporting the main packages (minus docs pkgs, which I will do later) with symbols. The only suspect I can see here that could be build wrong is qtwebchannel, which I did a "catch-all" build with qmake, no sub-packages. This was in order to satisfy qmake error output on qtwebengine reporting there was no qml or qtwebchannel.

    It's frustrating a bit, since I got so close! If there are any details you wish to see beyond what is given and linked below, please let me know. My package pool is listed if you wish to extract any debs to help. I really appreciate any guidance you can give me.

    Code snippet

    api/qquickwebengineview.cpp:1127: error: undefined reference to 'QQmlWebChannel::QQmlWebChannel(QObject*)'
    collect2: error: ld returned 1 exit status
    Makefile:168: recipe for target '../../lib/libQt5WebEngine.so.5.6.1' failed
    make[4]: *** [../../lib/libQt5WebEngine.so.5.6.1] Error 1
    make[4]: Leaving directory '/build/qtwebengine-5.6.0+git+bsos/src/webengine'
    

    Relevant links and logs:

    • Full build log
    • Build script (not so much relevant, but here it is):
    • Debian files
    • My package pool
    • Qt packages I have already built
    K 1 Reply Last reply 5 Apr 2016, 13:18
    0
    • P professorkaos64
      5 Apr 2016, 12:21

      System notes:

      • Target OS: Debian Jessie
      • Build system: pbuilder / clean environment

      Description

      I am having a heck of a time trying to build QtWebengine. I have built all the prior packages needed thus far, backporting the main packages (minus docs pkgs, which I will do later) with symbols. The only suspect I can see here that could be build wrong is qtwebchannel, which I did a "catch-all" build with qmake, no sub-packages. This was in order to satisfy qmake error output on qtwebengine reporting there was no qml or qtwebchannel.

      It's frustrating a bit, since I got so close! If there are any details you wish to see beyond what is given and linked below, please let me know. My package pool is listed if you wish to extract any debs to help. I really appreciate any guidance you can give me.

      Code snippet

      api/qquickwebengineview.cpp:1127: error: undefined reference to 'QQmlWebChannel::QQmlWebChannel(QObject*)'
      collect2: error: ld returned 1 exit status
      Makefile:168: recipe for target '../../lib/libQt5WebEngine.so.5.6.1' failed
      make[4]: *** [../../lib/libQt5WebEngine.so.5.6.1] Error 1
      make[4]: Leaving directory '/build/qtwebengine-5.6.0+git+bsos/src/webengine'
      

      Relevant links and logs:

      • Full build log
      • Build script (not so much relevant, but here it is):
      • Debian files
      • My package pool
      • Qt packages I have already built
      K Offline
      K Offline
      kshegunov
      Moderators
      wrote on 5 Apr 2016, 13:18 last edited by
      #2

      @professorkaos64
      Hello,
      Sadly I have no experience with puilder or QtWebEngine, but a quick view at the source shows there's no line 1127 in qquickwebengineview.cpp (probably the error occurs in one of the files generated by moc). Still it's curious that a constructor can't be found.

      Can you verify you've built Qt5WebChannel (I can't see that you have in the build log)?

      PS.
      This seems quite a complicated way of getting packages, are you a maintainer?

      Kind regards,

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        professorkaos64
        wrote on 5 Apr 2016, 13:33 last edited by
        #3

        Hi @kshegunov , I am backporting Qt packages to have a Debianized version for use with some experiemental projects for Linux I wish to build packages for (like PlexMediaPlayer). I have built QtWebChannel with a typical 'qmake' call in dh_auto_configure. That is my suspicion though, that it was built incorrectly. No, I am not a maintainer officially. I have a 3rd party repo where I build packages for Jessie/SteamOS Brewmaster.

        QtWebChannel build script / debian files

        K 1 Reply Last reply 5 Apr 2016, 13:41
        0
        • P professorkaos64
          5 Apr 2016, 13:33

          Hi @kshegunov , I am backporting Qt packages to have a Debianized version for use with some experiemental projects for Linux I wish to build packages for (like PlexMediaPlayer). I have built QtWebChannel with a typical 'qmake' call in dh_auto_configure. That is my suspicion though, that it was built incorrectly. No, I am not a maintainer officially. I have a 3rd party repo where I build packages for Jessie/SteamOS Brewmaster.

          QtWebChannel build script / debian files

          K Offline
          K Offline
          kshegunov
          Moderators
          wrote on 5 Apr 2016, 13:41 last edited by kshegunov 4 May 2016, 13:42
          #4

          @professorkaos64
          I see, my point stands, however. I still can't find a line where the QtWebChannel module is built in your full build log.
          It's unpacked:

          Unpacking qtwebchannel:amd64 (5.6.0+git+bsos-1) ...
          

          Set up:

          Setting up qtwebchannel:amd64 (5.6.0+git+bsos-1) ...
          

          And then used:

          g++ -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -std=c++1y -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_TSLIB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WEBENGINECORE_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_WEBCHANNEL_LIB -DQT_CORE_LIB -I. -I../core -I../../include -I../../include/QtWebEngineCore -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebChannel -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -isystem /usr/include/libdrm -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o .obj/main.o main.cpp
          g++ -Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath-link,/build/qtwebengine-5.6.0+git+bsos/lib -Wl,-rpath-link,/usr/lib/x86_64-linux-gnu -o ../../libexec/QtWebEngineProcess .obj/main.o   -L/build/qtwebengine-5.6.0+git+bsos/lib -lQt5WebEngineCore -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5WebChannel -lQt5Core -lGL -lpthread 
          make[4]: Leaving directory '/build/qtwebengine-5.6.0+git+bsos/src/process'
          cd webengine/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /build/qtwebengine-5.6.0+git+bsos/src/webengine/webengine.pro CONFIG+=release -o Makefile ) && make -f Makefile 
          make[4]: Entering directory '/build/qtwebengine-5.6.0+git+bsos/src/webengine'
          perl /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/unix/findclasslist.pl < QtWebEngine.version.in > QtWebEngine.version
          g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -std=c++1y -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_TSLIB -DQT_BUILD_WEBENGINE_LIB -DQT_BUILD_WEBENGINE_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_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WEBENGINECORE_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_WEBCHANNEL_LIB -DQT_CORE_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I. -Iapi -I../core -I../core/api -I../../include -I../../include/QtWebEngine -I../../include/QtWebEngine/5.6.1 -I../../include/QtWebEngine/5.6.1/QtWebEngine -I../../include/QtWebEngineCore -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebChannel -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick/5.6.0 -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick/5.6.0/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui/5.6.0 -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui/5.6.0/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml/5.6.0 -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml/5.6.0/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.6.0 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.6.0/QtCore -I.moc -isystem /usr/include/libdrm -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -x c++-header -c ../../include/QtWebEngine/QtWebEngineDepends -o .pch/Qt5WebEngine.gch/c++
          

          I don't see a build step for it, so how can you link against it?:

          g++ -Wl,-z,relro -Wl,--as-needed -Wl,--no-undefined -Wl,--version-script,QtWebEngine.version -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath-link,/build/qtwebengine-5.6.0+git+bsos/lib -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5WebEngine.so.5 -o libQt5WebEngine.so.5.6.1 .obj/qquickwebenginecertificateerror.o .obj/qquickwebenginedownloaditem.o .obj/qquickwebenginehistory.o .obj/qquickwebengineloadrequest.o .obj/qquickwebenginenavigationrequest.o .obj/qquickwebenginenewviewrequest.o .obj/qquickwebengineprofile.o .obj/qquickwebenginescript.o .obj/qquickwebenginesettings.o .obj/qquickwebenginesingleton.o .obj/qquickwebengineview.o .obj/qtwebengineglobal.o .obj/render_widget_host_view_qt_delegate_quick.o .obj/render_widget_host_view_qt_delegate_quickwindow.o .obj/ui_delegates_manager.o .obj/moc_qquickwebenginecertificateerror_p.o .obj/moc_qquickwebenginedownloaditem_p.o .obj/moc_qquickwebenginehistory_p.o .obj/moc_qquickwebengineloadrequest_p.o .obj/moc_qquickwebenginenavigationrequest_p.o .obj/moc_qquickwebenginenewviewrequest_p.o .obj/moc_qquickwebengineprofile.o .obj/moc_qquickwebenginescript_p.o .obj/moc_qquickwebenginesettings_p.o .obj/moc_qquickwebenginesingleton_p.o .obj/moc_qquickwebengineview_p.o .obj/moc_qquickwebengineview_p_p.o .obj/moc_render_widget_host_view_qt_delegate_quick.o .obj/moc_ui_delegates_manager.o  -L/build/qtwebengine-5.6.0+git+bsos/lib -lQt5WebEngineCore -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5WebChannel -lQt5Core -lpthread -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGL 
          

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            professorkaos64
            wrote on 5 Apr 2016, 14:11 last edited by
            #5

            Are you inferring I need to build webchannel inside debian/rules so it can be statically linked? Clone the main Qt5 source, init the repository, and do so? Webchannel is in fact installed at /usr/include/x86_64-linux-gnu/qt5/QtWebChannel, as I am in a root shell (from a C10 shell hook when the build fails) inside the chroot checking things out. Sorry I am misunderstanding you.

            K 1 Reply Last reply 5 Apr 2016, 15:26
            0
            • P professorkaos64
              5 Apr 2016, 14:11

              Are you inferring I need to build webchannel inside debian/rules so it can be statically linked? Clone the main Qt5 source, init the repository, and do so? Webchannel is in fact installed at /usr/include/x86_64-linux-gnu/qt5/QtWebChannel, as I am in a root shell (from a C10 shell hook when the build fails) inside the chroot checking things out. Sorry I am misunderstanding you.

              K Offline
              K Offline
              kshegunov
              Moderators
              wrote on 5 Apr 2016, 15:26 last edited by kshegunov 4 May 2016, 15:27
              #6

              @professorkaos64 said:

              Are you inferring I need to build webchannel inside debian/rules

              Yes, I believe you should.

              so it can be statically linked?

              Nope, it's linked dynamically, but linked nonetheless.

              Clone the main Qt5 source, init the repository, and do so?

              Yes, the same way you're building all the other modules you're using (as can be seen from your build log).

              Webchannel is in fact installed at /usr/include/x86_64-linux-gnu/qt5/QtWebChannel

              These are the headers, not the binaries, but I can't tell, is this path before or after chrooting for the build? It should be available to the compiler/linker after changing the root.

              Sorry I am misunderstanding you.

              As I said, I'm not well versed in the process you're using for building, however, I just observed in your build log that the QtWebChannel is not built alongside all your other Qt/Qt modules.

              I hope this helps.
              Kind regards.

              Read and abide by the Qt Code of Conduct

              1 Reply Last reply
              0
              • P Offline
                P Offline
                professorkaos64
                wrote on 6 Apr 2016, 14:48 last edited by
                #7

                I had a look at the OpenSUSE 5.6 spec file for this. My other attempt at bulding qtwebchannel into a proper set of install files tried to mimic this. If I don't provid install files, everything get's installed to /lib and /include, not /usr/lib... and /usr/include/.... which seemed strange since the prefix is usr/ for my qtbase install and all other modules built fine.

                What part of that spec file is the binary I can double check? Where should qtwebchannel be installing? I know my catch all package installs the headers, but what piece of that install spec denotes the binary for me to check that it built?

                K 1 Reply Last reply 8 Apr 2016, 11:01
                0
                • P professorkaos64
                  6 Apr 2016, 14:48

                  I had a look at the OpenSUSE 5.6 spec file for this. My other attempt at bulding qtwebchannel into a proper set of install files tried to mimic this. If I don't provid install files, everything get's installed to /lib and /include, not /usr/lib... and /usr/include/.... which seemed strange since the prefix is usr/ for my qtbase install and all other modules built fine.

                  What part of that spec file is the binary I can double check? Where should qtwebchannel be installing? I know my catch all package installs the headers, but what piece of that install spec denotes the binary for me to check that it built?

                  K Offline
                  K Offline
                  kshegunov
                  Moderators
                  wrote on 8 Apr 2016, 11:01 last edited by
                  #8

                  @professorkaos64

                  I had a look at the OpenSUSE 5.6 spec file for this. My other attempt at bulding qtwebchannel into a proper set of install files tried to mimic this. If I don't provid install files, everything get's installed to /lib and /include, not /usr/lib... and /usr/include/.... which seemed strange since the prefix is usr/ for my qtbase install and all other modules built fine.
                  What part of that spec file is the binary I can double check? Where should qtwebchannel be installing? I know my catch all package installs the headers, but what piece of that install spec denotes the binary for me to check that it built?

                  I'm sorry but I really can't say, I have no idea what that file is or how it's used. It looks like a shell script, but I don't recognize the interpreter. That said, I'd first look at the chrooted /usr/lib (or /lib) if the Qt5WebChannel.so is present, if not it should somehow be made available to the linker, either by providing a symbolic link to it's location or by copying the binary from it's build location. I'm sorry I can't be more specific, but I reiterate I haven't built anything this way, and only observed that there's no build step for said module.

                  PS. I'm sorry for the delay, I was pretty busy these two days.

                  Read and abide by the Qt Code of Conduct

                  1 Reply Last reply
                  0

                  1/8

                  5 Apr 2016, 12:21

                  • Login

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