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. Issue with 5.11.1 compile: error: could not convert ‘{listener, data}’ from ‘<brace-enclosed initializer list>’
QtWS25 Last Chance

Issue with 5.11.1 compile: error: could not convert ‘{listener, data}’ from ‘<brace-enclosed initializer list>’

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 4 Posters 3.4k 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.
  • W Offline
    W Offline
    warpme
    wrote on last edited by
    #1

    Hi,
    I'm trying to cross-compile 5.11.1 and receiving following error:

    make[4]: Entering directory `/home/piotro/minimyth-dev/script/qt/qt5/work/main.d/qt-everywhere-src-5.11.1/qtmultimedia/src/imports'
    cd multimedia/ && ( test -e Makefile || /home/piotro/minimyth-dev/script/qt/qt5/work/main.d/qt-everywhere-src-5.11.1/qtbase/bin/qmake -o Makefile /home/piotro/minimyth-dev/script/qt/qt5/work/main.d/qt-everywhere-src-5.11.1/qtmultimedia/src/imports/multimedia/multimedia.pro ) && make -f Makefile
    qwaylanddisplay.cpp: In member function ‘void QtWaylandClient::QWaylandDisplay::addRegistryListener(QtWaylandClient::RegistryListener, void*)’:
    qwaylanddisplay.cpp:315:35: error: could not convert ‘{listener, data}’ from ‘<brace-enclosed initialiser list>’ to ‘QtWaylandClient::QWaylandDisplay::Listener’
         Listener l = { listener, data };
    

    Exactly the same build environment allows me to successfully build of 5.10.1 - so issue is IMHO in 5.11.1 sources.
    gcc is 7.3.0 so I don't think issue is about too old compiler.
    It looks I'm not alone with this error as there are posts on stack exchange about this issue - unfortunately without solution...

    1 Reply Last reply
    0
    • W Offline
      W Offline
      warpme
      wrote on last edited by
      #2

      hmm - it looks like relaxing -c++std requirements from c++11 to c++1z allows to compile.
      I think it is 5.11.1 bug.
      pls advise should I fill bug report for this?

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

        Hi,

        5.11.2 is almost out and 5.12 is around the corner, can you check these versions ?

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

        W 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          5.11.2 is almost out and 5.12 is around the corner, can you check these versions ?

          W Offline
          W Offline
          warpme
          wrote on last edited by
          #4

          @SGaist
          thx for replay.
          sure - i'll give try for 5.11.2.
          is it already aval. as download?
          br

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

            I think that, currently, you have to clone it from https://code.qt.io.

            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
            • M Offline
              M Offline
              MissingNo218
              wrote on last edited by
              #6

              I found a solution that worked for me, although there are other issues further into the install. I found the following post on StackOverflow: https://stackoverflow.com/questions/37776823/could-not-convert-from-brace-enclosed-initializer-list-to-struct

              From this, I found that if you go to the struct definitions in the header files and remove the default values, it will compile. Like I said though, I have had other errors in the installation and have not been able to complete the install, so I do not know if these changes affect anything yet.

              V 1 Reply Last reply
              0
              • M MissingNo218

                I found a solution that worked for me, although there are other issues further into the install. I found the following post on StackOverflow: https://stackoverflow.com/questions/37776823/could-not-convert-from-brace-enclosed-initializer-list-to-struct

                From this, I found that if you go to the struct definitions in the header files and remove the default values, it will compile. Like I said though, I have had other errors in the installation and have not been able to complete the install, so I do not know if these changes affect anything yet.

                V Offline
                V Offline
                Ville Voutilainen
                wrote on last edited by
                #7

                The problem here is that the Listener struct is not an aggregate in C++11, since it has Default Member Initializers (see https://en.wikipedia.org/wiki/C%2B%2B14#Aggregate_member_initialization). This also means that gcc 4.8 doesn't build this code out-of-the-box. I will fix that shortly when I fix a bunch of other gcc 4.8 incompatibilities.

                1 Reply Last reply
                2

                • Login

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