Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Wiki Discussion
  4. Qt5 development primer
Forum Update on Tuesday, May 27th 2025

Qt5 development primer

Scheduled Pinned Locked Moved Wiki Discussion
166 Posts 72 Posters 201.2k Views 2 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
    PauloPina
    wrote on 7 Apr 2013, 18:33 last edited by
    #120

    Hello,

    I am having some problems compiling Qt 5.1 in MAC OSX. I've followed all the steps from here: http://qt-project.org/wiki/Building_Qt_5_from_Git ...

    But... when I called "make -j 4", after about one hour of compilling work, I've got this error:

    @make[3]: *** No rule to make target /Users/paulopina/PlexusDynamics/qt5/qtbase/lib/libQt5QmlDevTools.a', needed by /Users/paulopina/PlexusDynamics/qt5/qtbase/bin/qmlmin'. Stop.
    make[2]: *** [sub-qmlmin-make_first] Error 2
    make[2]: *** Waiting for unfinished jobs....
    make[3]: Nothing to be done for first'. make[3]: Nothing to be done for first'.
    make[3]: Nothing to be done for `first'.
    make[1]: *** [sub-tools-make_first] Error 2
    make: *** [module-qtdeclarative-make_first] Error 2@

    This it the return i've got at "./configure -developer-build -opensource -nomake examples -nomake tests":

    @Creating qmake...
    make: Nothing to be done for `first'.
    Running configuration tests...
    WARNING: Unable to find file .device.vars

    Build type: macx-clang
    Architecture: x86_64, features: mmx sse sse2 sse3 ssse3
    Host architecture: x86_64, features: mmx sse sse2 sse3 ssse3

    Build .................. libs tools
    Configuration .......... qpa largefile precompile_header sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 absolute_library_soname pcre warnings_are_errors minimal-config small-config medium-config large-config full-config build_all debug_and_release no-pkg-config coreservices accessibility opengl shared qpa reduce_exports getaddrinfo ipv6ifname getifaddrs png freetype system-zlib nis cups iconv openssl rpath corewlan concurrent audio-backend v8 v8snapshot release debug qt_framework private_tests
    Debug .................. yes (combined)
    Default Link ........... debug
    Force debug info ....... no
    C++11 support .......... no
    pkg-config ............. no
    Qt D-Bus module ........ no
    Qt Concurrent code ..... yes
    Qt GUI module .......... yes
    Qt Widgets module ...... yes
    JavaScriptCore JIT ..... To be decided by JavaScriptCore
    QML debugging .......... yes
    PCH support ............ yes
    SSE2/SSE3/SSSE3......... yes/yes/yes
    SSE4.1/SSE4.2........... yes/yes/yes
    AVX/AVX2................ yes/yes
    IPv6 ifname support .... yes
    getaddrinfo support .... yes
    getifaddrs support ..... yes
    Accessibility .......... yes
    NIS support ............ yes
    CUPS support ........... yes
    Iconv support .......... yes
    Glib support ........... no
    GStreamer support ...... no
    PulseAudio support ..... no
    Large File support ..... yes
    GIF support ............ plugin
    JPEG support ........... plugin (qt)
    PNG support ............ yes (qt)
    zlib support ........... system
    Session management ..... auto
    libudev support ........ no
    Use system proxies ..... no
    OpenGL support ......... yes (Desktop OpenGL)
    OpenVG support ......... no
    XShape support ......... auto
    XVideo support ......... auto
    XSync support .......... auto
    Xinerama support ....... runtime
    Xcursor support ........ runtime
    Xfixes support ......... runtime
    Xrandr support ......... runtime
    Xi support ............. runtime
    Xi2 support ............ auto
    MIT-SHM support ........ auto
    FontConfig support ..... no
    XKB support ............ auto
    GTK theme support ...... no
    PostgreSQL support ..... plugin
    ODBC support ........... plugin
    SQLite support ......... plugin (qt)
    OpenSSL support ........ yes (run-time)
    Alsa support ........... no
    CoreWlan support ....... yes
    libICU support ......... no
    PCRE support ........... qt
    Xcb support ............ no
    Xrender support ........ no
    EGLFS support .......... no
    DirectFB support ....... no
    LinuxFB support ........ no
    KMS support ............ no@

    Any one has an idea of how can I solve this?

    Thank you!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      deus
      wrote on 9 Apr 2013, 13:30 last edited by
      #121

      [quote author="PauloPina" date="1365359586"]Hello,

      Thank you![/quote]

      Just head into "qtdeclarative\src\qmldevtools"
      and make a release and a debug before you proceed.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        PauloPina
        wrote on 11 Apr 2013, 00:18 last edited by
        #122

        [quote author="deus" date="1365514226"]
        [quote author="PauloPina" date="1365359586"]Hello,

        Thank you![/quote]

        Just head into "qtdeclarative\src\qmldevtools"
        and make a release and a debug before you proceed.

        [/quote]

        Hello Deus,

        Thank you. I'll try it!

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DerekDomino
          wrote on 16 Apr 2013, 16:22 last edited by
          #123

          Hi,

          Same error as PauloPina, then heading to "qtdeclarative\src\qmldevtools" and doing a "make" doesn't solve the problem. The make "has nothing to do". Only the debug lib is created, how do I create the release?

          Thanks

          1 Reply Last reply
          0
          • D Offline
            D Offline
            deus
            wrote on 16 Apr 2013, 19:30 last edited by
            #124

            make release

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DerekDomino
              wrote on 17 Apr 2013, 13:24 last edited by
              #125

              Yes, of course I've tried it ;-) but unsuccessfully

              @
              $ pwd
              (...)/qt-everywhere-opensource-src-5.1.0-alpha/qtdeclarative/src/qmldevtools

              $ ls
              Makefile qmldevtools.pro

              $ make release
              make: *** No rule to make target `release'. Stop.
              @

              There's no reference to a 'release' keyword in the Makefile. Here's how the whole qtbase was configured:
              @
              $ ./configure -prefix $PWD/qtbase -opensource -nomake tests
              @

              I've reconfigured with -debug-and-release option, but still no release rule and other errors raised.

              @
              $ ./configure -prefix $PWD/qtbase -opensource -nomake tests -debug-and-release
              (...)

              $ make
              cd qmlmin/ && ( test -e Makefile || (...)/qt-everywhere-opensource-src-5.1.0-alpha/qtbase/bin/qmake (...)/qt-everywhere-opensource-src-5.1.0-alpha/qtdeclarative/tools/qmlmin/qmlmin.pro -o Makefile ) && make -f Makefile
              make[3]: *** No rule to make target (...)/qt-everywhere-opensource-src-5.1.0-alpha/qtbase/lib/libQt5QmlDevTools.a', needed by (...)/qt-everywhere-opensource-src-5.1.0-alpha/qtbase/bin/qmlmin'. Stop.
              make[2]: *** [sub-qmlmin-make_first] Error 2
              make[1]: *** [sub-tools-make_first] Error 2
              make: *** [module-qtdeclarative-make_first] Error 2
              @

              Note: Mac OS X 10.7.5
              @
              $ clang -v
              Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
              Target: x86_64-apple-darwin11.4.2
              Thread model: posix
              @

              1 Reply Last reply
              0
              • R Offline
                R Offline
                ravirdv
                wrote on 17 Apr 2013, 18:34 last edited by
                #126

                I faced same problem,

                check out this bug https://bugreports.qt-project.org/browse/QTBUG-30561

                applying this patch resolved the issue https://codereview.qt-project.org/#patch,sidebyside,52170,1,mkspecs/features/qt_module.prf

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kdk85
                  wrote on 5 May 2013, 05:21 last edited by
                  #127

                  Hi,

                  Can the owner of this documentation pls update the steps for running the 'configure' script on Win7+MinGW/MSys.

                  The correct command as pointed by 'JKSH' user is
                  $configure.bat -developer-build -opensource -nomake examples -nomake tests -opengl desktop

                  Links:
                  http://qt-project.org/forums/viewthread/27435/
                  http://qt-project.org/forums/viewthread/22257

                  Thanks

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Munawwar
                    wrote on 18 May 2013, 21:13 last edited by
                    #128

                    I think the wiki should mention that the build needs at least 3 GB of RAM to build WebKit.

                    1 Reply Last reply
                    0
                    • sierdzioS Offline
                      sierdzioS Offline
                      sierdzio
                      Moderators
                      wrote on 18 May 2013, 21:48 last edited by
                      #129

                      You can edit it any time.

                      (Z(:^

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        Munawwar
                        wrote on 19 May 2013, 18:12 last edited by
                        #130

                        I was getting a "runtime/CodeCache.cpp
                        The bug is not reproducible, so it is likely a hardware or OS problem."
                        error when using make -j 4.
                        I had to do a make without specifying '-j 4' (which "I think is serial execution":http://www.gnu.org/software/make/manual/html_node/Parallel.html) for the build to work.

                        1 Reply Last reply
                        0
                        • sierdzioS Offline
                          sierdzioS Offline
                          sierdzio
                          Moderators
                          wrote on 19 May 2013, 18:16 last edited by
                          #131

                          Uncanny.

                          I'm routinely compiling various Qt versions, from 4.8 to 5.1, with make -j9 and never had an issue. Well, once :)

                          Maybe your "make" is outdated?

                          (Z(:^

                          1 Reply Last reply
                          0
                          • JKSHJ Offline
                            JKSHJ Offline
                            JKSH
                            Moderators
                            wrote on 20 May 2013, 00:08 last edited by
                            #132

                            [quote author="Munawwar" date="1368987136"]I was getting a "runtime/CodeCache.cpp
                            The bug is not reproducible, so it is likely a hardware or OS problem."
                            error when using make -j 4.
                            I had to do a make without specifying '-j 4' (which "I think is serial execution":http://www.gnu.org/software/make/manual/html_node/Parallel.html) for the build to work.[/quote]What CPU, and how much RAM, do you have?

                            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              allenck
                              wrote on 23 May 2013, 21:45 last edited by
                              #133

                              I'm having problems getting Qt 5.1 to compile:

                              In file included from ../../include/QtWidgets/qgraphicsscene.h:1:0,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview.h:48,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview_p.h:56,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/qgraphicsview_p.h:1,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem_p.h:59,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicswidget_p.h:57,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/qgraphicswidget_p.h:1,
                              from kernel/qaction_p.h:58,
                              from kernel/qactiongroup.cpp:46:
                              ../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:160:24: error: missing binary operator before token "("
                              ../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:167:24: error: missing binary operator before token "("
                              ../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:174:24: error: missing binary operator before token "("
                              In file included from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem_p.h:56:0,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicswidget_p.h:57,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/qgraphicswidget_p.h:1,
                              from kernel/qaction_p.h:58,
                              from kernel/qaction.cpp:46:
                              ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem.h:176:24: error: missing binary operator before token "("
                              ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem.h:240:24: error: missing binary operator before token "("
                              ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem.h:298:24: error: missing binary operator before token "("
                              In file included from ../../include/QtWidgets/qgraphicsscene.h:1:0,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview.h:48,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview_p.h:56,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/qgraphicsview_p.h:1,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem_p.h:59,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicswidget_p.h:57,
                              from ../../include/QtWidgets/5.1.0/QtWidgets/private/qgraphicswidget_p.h:1,
                              from kernel/qaction_p.h:58,
                              from kernel/qaction.cpp:46:
                              ../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:160:24: error: missing binary operator before token "("
                              ../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:167:24: error: missing binary operator before token "("
                              ../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:174:24: error: missing binary operator before token "("
                              In file included from kernel/qactiongroup.cpp:382:0:
                              .moc/release-shared/moc_qactiongroup.cpp:15:2: error: #error "This file was generated using the moc from 5.1.0. It"
                              .moc/release-shared/moc_qactiongroup.cpp:16:2: error: #error "cannot be used with the include files from this version of Qt."
                              .moc/release-shared/moc_qactiongroup.cpp:17:2: error: #error "(The moc has changed too much.)"
                              In file included from ../../include/QtWidgets/qaction.h:1:0,
                              from kernel/qactiongroup.h:45,
                              from kernel/qactiongroup.cpp:42:
                              ../../include/QtWidgets/../../src/widgets/kernel/qaction.h:61:32: error: expected initializer before ‘:’ token
                              In file included from kernel/qaction.cpp:1313:0:
                              .moc/release-shared/moc_qaction.cpp:15:2: error: #error "This file was generated using the moc from 5.1.0. It"
                              .moc/release-shared/moc_qaction.cpp:16:2: error: #error "cannot be used with the include files from this version of Qt."
                              .moc/release-shared/moc_qaction.cpp:17:2: error: #error "(The moc has changed too much.)"
                              In file included from kernel/qaction.cpp:42:0:
                              kernel/qaction.h:61:32: error: expected initializer before ‘:’ token
                              make[3]: *** [.obj/release-shared/qactiongroup.o] Error 1
                              make[3]: *** Waiting for unfinished jobs....
                              make[3]: *** [.obj/release-shared/qaction.o] Error 1
                              make[3]: Leaving directory /media/usb_700_ext4/qt5/qtbase/src/widgets' make[2]: *** [sub-widgets-make_first] Error 2 make[2]: Leaving directory /media/usb_700_ext4/qt5/qtbase/src'
                              make[1]: *** [sub-src-make_first] Error 2
                              make[1]: Leaving directory `/media/usb_700_ext4/qt5/qtbase'
                              make: *** [module-qtbase-make_first] Error 2
                              allen@ubuntu:/media/usb_700_ext4/qt5$

                              Can anybody explain why?

                              Allen Kempe

                              1 Reply Last reply
                              0
                              • JKSHJ Offline
                                JKSHJ Offline
                                JKSH
                                Moderators
                                wrote on 24 May 2013, 00:57 last edited by
                                #134

                                [quote author="allenck" date="1369345509"].moc/release-shared/moc_qactiongroup.cpp:15:2: error: #error “This file was generated using the moc from 5.1.0. It”
                                .moc/release-shared/moc_qactiongroup.cpp:16:2: error: #error “cannot be used with the include files from this version of Qt.”[/quote]It looks like you have multiple versions of Qt in your environment. Remove the older one from your PATH, clean your build tree (i.e. delete all the files that have been compiled so far), and try again.

                                Also, what compiler are you using? How did you configure + build Qt?

                                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                1 Reply Last reply
                                0
                                • A Offline
                                  A Offline
                                  allenck
                                  wrote on 24 May 2013, 03:43 last edited by
                                  #135

                                  Thanks. I checked the requirements as it pertained to environment variables but didn't check the path. Undoubtedly that is the reason as the compile seems to be working OK, so far, on another machine.

                                  The compiler is g++ and I was using these configuration settings:
                                  ./configure -prefix $PWD/qtbase -opensource -nomake tests -system-sqlite -plugin-sql-sqlite -plugin-sql-odbc -plugin-sql-mysql -nomake demo -nomake examples

                                  Allen Kempe

                                  1 Reply Last reply
                                  0
                                  • C Offline
                                    C Offline
                                    cmeyer
                                    wrote on 5 Aug 2013, 18:25 last edited by
                                    #136

                                    I am building from source on Windows with VS2012.

                                    I update the sources from git using the command:

                                    qtrepotools\bin\qt5_tool -p --Branch stable

                                    The problem occurs because the headers in qtbase\include don't get updated when I 'nmake' and those include files are in the include path for each of the subdirectories.

                                    Any idea what I need to do to get the sources to build after updating?

                                    If I make clean, run configure again, and nmake everything works. But it would be better if I didn't have to take those steps every time.

                                    1 Reply Last reply
                                    0
                                    • JKSHJ Offline
                                      JKSHJ Offline
                                      JKSH
                                      Moderators
                                      wrote on 6 Aug 2013, 00:59 last edited by
                                      #137

                                      [quote author="cmeyer" date="1375727141"]If I make clean, run configure again, and nmake everything works.[/quote]Hi,

                                      That IS the expected procedure. configure performs some bootstrapping and builds a small subset of qtbase.git, which is then used to build the rest of Qt. After you update the code, you have to re-bootstrap (i.e. rerun configure)

                                      You can simplify things by writing a Batch file to run configure with the options you want.

                                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                      1 Reply Last reply
                                      0
                                      • C Offline
                                        C Offline
                                        cmeyer
                                        wrote on 6 Aug 2013, 01:39 last edited by
                                        #138

                                        [quote author="JKSH" date="1375750792"][quote author="cmeyer" date="1375727141"]If I make clean, run configure again, and nmake everything works.[/quote]Hi,

                                        That IS the expected procedure. configure performs some bootstrapping and builds a small subset of qtbase.git, which is then used to build the rest of Qt. After you update the code, you have to re-bootstrap (i.e. rerun configure)[/quote]

                                        Actually I tried the reconfigure and it still fails. What does work is doing the "really clean" clean, then configure and rebuild:

                                        git submodule foreach --recursive "git clean -dfx"

                                        Maybe the mistake I made this time was not cleaning before updating from the repository. Ugh. And now I'm stuck in some strange state that requires a "really clean" clean and rebuild.

                                        1 Reply Last reply
                                        0
                                        • R Offline
                                          R Offline
                                          rockdemon
                                          wrote on 15 Aug 2013, 10:00 last edited by
                                          #139

                                          sudo apt-add-repository ppa:u-szeged/sedkit && sudo apt-get update && sudo apt-get install sedkit-env-qtwebkit in ubuntu gives me the following errors:

                                          W: Failed to fetch http://ppa.launchpad.net/u-szeged/sedkit/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found

                                          W: Failed to fetch http://ppa.launchpad.net/u-szeged/sedkit/ubuntu/dists/raring/main/binary-i386/Packages 404 Not Found

                                          E: Some index files failed to download. They have been ignored, or old ones used instead.

                                          Am i making some newbie linux mistake or is this method currently broken?

                                          Thanks,

                                          Rich

                                          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