Compilation of 5.7 branch gives error: ‘ResourceTypeLast’ is not a member of ‘QWebEngineUrlRequestInfo’



  • Hello,

    I`ve tried to compile Qt from git following this guide: http://wiki.qt.io/Building_Qt_5_from_Git

    I`ve checked out the 5.7 branch with checkout command.

    When trying to compile with make I get the following compilation error:
    /build/qt5/qtwebengine/src/core/network_delegate_qt.cpp: In function ‘QWebEngineUrlRequestInfo::ResourceType QtWebEngineCore::toQt(content::ResourceType)’:
    /build/qt5/qtwebengine/src/core/network_delegate_qt.cpp:86:67: error: ‘ResourceTypeLast’ is not a member of ‘QWebEngineUrlRequestInfo’
    ninja subcommand failed

    Can anyone tell me what`s wrong please ?

    Thank you !

    Best regeards,
    Thomas


  • Moderators

    @Thomas233 What is your environment (OS, compiler)?
    How did you call configure?



  • Hello,

    just a standard configure I think:
    $ ./configure -developer-build -opensource -nomake examples -nomake tests

    Before "configure" I did a git checkout to 5.7 and then ran the init-repository script.

    OS ist LUbuntu 16.04.1 LTS 64-Bit.

    Compiler is that one from build-essentials, I think g++ (I have installed exactly those packages suggested in the build guide for Ubuntu).



  • This were my commands:

    git clone git://code.qt.io/qt/qt5.git
    cd qt5
    git checkout 5.7
    perl init-repository
    ./configure -developer-build -opensource -nomake examples -nomake tests
    make -j2

    ???


  • Moderators

    @Thomas233 Are there other errors (especially before the one you posted above?
    Can you post the whole build log?
    Do you really need to build Qt by yourself?



  • @jsulm said in Compilation of 5.7 branch gives error: ‘ResourceTypeLast’ is not a member of ‘QWebEngineUrlRequestInfo’:

    @Thomas233 Are there other errors (especially before the one you posted above?
    Can you post the whole build log?
    Do you really need to build Qt by yourself?

    Hello jsulm,

    where can I get the build log from or where is it located ?

    Thank you !


  • Moderators

    @Thomas233 It's what you see if you build.
    You already copied one error from that log.



  • Hello,

    ok sorry, after some testing I think there might be one thing I´ve missed!

    I need to build Qt by myself because I need to use the propriertary codecs from QtWebEngine for MP4 playback.
    As for the docs this is not on by defaults.

    So this is the full queue of commands I`ve used in the past and for which I get the compilation error.
    I did not notice first that qmake could cause the problem:
    git clone git://code.qt.io/qt/qt5.git
    cd qt5
    git checkout 5.7
    perl init-repository
    ./configure -developer-build -opensource -nomake examples -nomake tests
    cd qtwebengine
    /opt/Qt/5.7/gcc_64/bin/qmake WEBENGINE_CONFIG+=use_proprietary_codecs
    cd ..
    make -j2

    I`ve used the qmake of an Qt 5.7.1 default installation from opt/Qt/5.7/.... to enable "use_proprietary_codecs". in qtwebengine because that one that is installed on the system gives me output that it uses v5.5.1 which came through with apt packages.

    If I do not issue the line with the qmake command the build is succesfull.

    Sorry, I do not really understand how qmake works for this case and how to use it exactly, could you please give me a direction?


  • Moderators

    @Thomas233 So, you are trying to build for /opt/Qt/5.7, right? Which is 5.7.1. Then you should checkout Qt 5.7.1 sources.



  • Hi jsulm,

    so 5.7 branch is not similar to 5.7.1 ?

    Should I use 5.7.1 tag instead ?

    Because I`ve already made a compilation of 5.7.1 tag (which did not give any errors), but I could not find QtWebengine modules in the lib/ of that compilation so I thought they may have not been built with that tag for me :-/

    Thank you!


  • Moderators

    @Thomas233 5.7 != 5.7.1
    If you already compiled 5.7.1 why then using now 5.7? Can't you just use the sources for 5.7.1 from previous build?
    One note: Qt 5.8 was released, you could try that one.



  • @jslum:

    Hello,

    the problems I have with 5.7.1 is (therefore I switched to 5.7):

    1. If I use the 5.7.1 branch (git checkout 5.7.1 & perl init-repository) I get the following error:

    git config commit.template /home/pancloud/build/qt5/.commit-template
    git clone --branch 5.7.1 git://code.qt.io/qt/qt3d.git qt3d
    Klone nach 'qt3d' ...
    fatal: Remote-Branch 5.7.1 nicht im Upstream-Repository origin gefunden
    git clone --branch 5.7.1 git://code.qt.io/qt/qt3d.git qt3d exited with status 32768 at init-repository line 195.
    Qt::InitRepository::exe(Qt::InitRepository=HASH(0x25d0148), "git", "clone", "--branch", "5.7.1", "git://code.qt.io/qt/qt3d.git", "qt3d") called at init-repository line 486
    Qt::InitRepository::git_clone_one_submodule(Qt::InitRepository=HASH(0x25d0148), "qt3d", "qt/qt3d.git", "5.7.1") called at init-repository line 392
    Qt::InitRepository::git_clone_all_submodules(Qt::InitRepository=HASH(0x25d0148), "qt/qt5", 0, "preview", "essential", "addon", "deprecated") called at init-repository line 596
    Qt::InitRepository::run(Qt::InitRepository=HASH(0x25d0148)) called at init-repository line 607

    1. If I use the 5.7.1 tag (perl init-repository & git checkout v5.7.1 & git submodule update) the compilation is built, but in the target build directory (qtbase/lib) all libraries of Qt WebEngine are missing (like libQt5WebEngine.so and so on). Build also is a lot faster, so it seems like WebEngine was not included.

    Only with 5.7 branch it gets compiled and WebEngine libraries is also there.

    Qt 5.8 is a RC version at the moment, right ?

    Thank you !



  • Hi,

    in the meantime I`ve switched over to 5.8 final.

    I`ve slightly modified the .configure a bit due to target system paths (I want the default 5.8 distribution which I have installed there to be overwritten by my self-compiled version, which seems to be the easiest way to me without any further setup):

    git clone git://code.qt.io/qt/qt5.git
    cd qt5
    git checkout 5.8
    perl init-repository
    ./configure -prefix "/opt/Qt/5.8/gcc_64" -opensource -nomake examples -nomake tests -release
    cd qtwebengine
    ../qtbase/bin/qmake WEBENGINE_CONFIG+=use_proprietary_codecs

    Now I get the following (new) error when calling qmake created by .configure to modify WebEngine flags:

    Info: creating cache file /home/pancloud/build/qt5/qtwebengine/.qmake.cache
    Project ERROR: Could not find feature mirclient.

    With 5.7 branch I got it working this way.

    Btw. what I am since the beginning not sure about is, needs .configure to be called AFTER or BEFORE qmake ??

    Please help !



  • Hello,

    to come to a conclusion to the initial problem:
    If you run ./configure and AFTER that do

    cd qtwebengine
    ../qtbase/bin/qmake WEBENGINE_CONFIG+=use_proprietary_codecs
    

    comiplation itself will be fine and ResourceTypeLast error should have gone away.
    However, I do not know exactly if codecs are enabled then and if it works on the target system (at least not for me).

    Anyways marking #1 as solved. Thank you!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.