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 Monday, May 27th 2025

Qt5 development primer

Scheduled Pinned Locked Moved Wiki Discussion
166 Posts 72 Posters 201.1k 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.
  • K Offline
    K Offline
    Kondr
    wrote on 7 Mar 2012, 15:21 last edited by
    #70

    Hello, I have tried to compile Qt5 under archlinux and under mac os, but in both cases I have got the same errors:

    bq.
    cd qtsvg/ && make -f Makefile
    cd qtphonon/ && make -f Makefile
    cd qtxmlpatterns/ && make -f Makefile
    make[1]: Entering directory /home/kondr/Documents/qt5/qtxmlpatterns' /home/kondr/Documents/qt5/qtbase/bin/qmake QMAKE_ABSOLUTE_SOURCE_PATH=/home/kondr/Documents/qt5/qtbase -o Makefile qtxmlpatterns.pro Could not find mkspecs for your QMAKESPEC(default) after trying: /home/kondr/Documents/qt5/qtxmlpatterns/mkspecs /home/kondr/Documents/qt5/qt5/mkspecs make[1]: *** [Makefile] Error 3 make[1]: Leaving directory /home/kondr/Documents/qt5/qtxmlpatterns'
    make: *** [module-qtxmlpatterns-make_default] Error 2
    make: *** Waiting for unfinished jobs....
    make[1]: Entering directory /home/kondr/Documents/qt5/qtsvg' /home/kondr/Documents/qt5/qtbase/bin/qmake QMAKE_ABSOLUTE_SOURCE_PATH=/home/kondr/Documents/qt5/qtbase -o Makefile qtsvg.pro Could not find mkspecs for your QMAKESPEC(default) after trying: /home/kondr/Documents/qt5/qtsvg/mkspecs /home/kondr/Documents/qt5/qt5/mkspecs make[1]: *** [Makefile] Error 3 make[1]: Leaving directory /home/kondr/Documents/qt5/qtsvg'
    make: *** [module-qtsvg-make_default] Error 2
    make[1]: Entering directory /home/kondr/Documents/qt5/qtphonon' /home/kondr/Documents/qt5/qtbase/bin/qmake QMAKE_ABSOLUTE_SOURCE_PATH=/home/kondr/Documents/qt5/qtbase -o Makefile qtphonon.pro Could not find mkspecs for your QMAKESPEC(default) after trying: /home/kondr/Documents/qt5/qtphonon/mkspecs /home/kondr/Documents/qt5/qt5/mkspecs make[1]: *** [Makefile] Error 3 make[1]: Leaving directory /home/kondr/Documents/qt5/qtphonon'
    make: *** [module-qtphonon-make_default] Error 2

    I have used the next command:

    bq. git clone git://gitorious.org/qt/qt5.git qt5 && cd qt5 && perl init-repository && export PATH="$PWD/qtbase/bin:$PATH" && ./configure -prefix $PWD/qt5 -opensource -confirm-license -nomake tests -nomake examples && make -j3

    In addition I would like to know how to compile Qt 5 for a special arch? (for example, how to compile Qt 5 for i386 arch on x86_64 OS?)

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hmuelner
      wrote on 8 Mar 2012, 13:05 last edited by
      #71

      I made some progress (but did not succeed) with compiling the current git version of qtwebkit with vs2010 in windows7(64):

      My Qt directory is in d:\Qt\qt5.

      • I created an additional system cpp directory in d:\cpp with an include and a lib subdirectory

      • I add two variables to my system environment: INCLUDE=d:\cpp\include and LIB=d:\cpp\lib and started a new Visual Studio Command Prompt.

      • I copied qedit.h from the Windows SDK 6.0A to d:\cpp\include

      • I got the ICU libraries form http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-Win32-msvc10.zip

      • I copied the icu headers ti d:\cpp\include

      • I copied the icu lib files (*.lib and *.dll) to d:\Qt\qt5\qtbase\lib

      • I renamed icuin.lib to icui18n.lib, icuind.lib to icui18nd.lib and icudt.lib to icudata.lib

      • I got ftp://sources.redhat.com/pub/pthreads-win32/pthreads-w32-2-8-0-release.exe for the pthread library

      • I copied the pthreads headers and libraries to d:\cpp\include and d:\cpp\lib

      • I changed one subroutine in d:/Qt/qt5/qtwebkit/Tools/Scripts/webkitdirs.pm to the following code (because the mkspec can be a ;-separated path list):
        @sub retrieveQMakespecVar
        {
        my $mkspec = $[0];
        my $varname = $
        [1];

        my $varvalue = undef;
        #print "retrieveMakespecVar " . $mkspec . ", " . $varname . "\n";
        my @mkspecs = split(/;/,$mkspec);
        foreach $mkspec (@mkspecs) {
        local SPEC;
        open (SPEC, "<$mkspec") or next;
        while (<SPEC>) {
        if ($_ =~ /\s
        include((.+))/) {
        # open the included mkspec
        my $oldcwd = getcwd();
        (my $volume, my $directories, my $file) = File::Spec->splitpath($mkspec);
        my $newcwd = "$volume$directories";
        chdir $newcwd if $newcwd;
        $varvalue = retrieveQMakespecVar($1, $varname);
        chdir $oldcwd;
        } elsif ($_ =~ /$varname\s*=\s*([^\s]+)/) {
        $varvalue = $1;
        last;
        }
        }
        close SPEC;
        last if defined($varvalue);
        }
        return $varvalue;
        }@

      • sub retrieveQMakespecVar
        {
        my $mkspec = $[0];
        my $varname = $
        [1];

        my $varvalue = undef;
        #print "retrieveMakespecVar " . $mkspec . ", " . $varname . "\n";
        my @mkspecs = split(/;/,$mkspec);
        foreach $mkspec (@mkspecs) {
        local SPEC;
        open (SPEC, "<$mkspec") or next;
        while (<SPEC>) {
        if ($_ =~ /\s
        include((.+))/) {
        # open the included mkspec
        my $oldcwd = getcwd();
        (my $volume, my $directories, my $file) = File::Spec->splitpath($mkspec);
        my $newcwd = "$volume$directories";
        chdir $newcwd if $newcwd;
        $varvalue = retrieveQMakespecVar($1, $varname);
        chdir $oldcwd;
        } elsif ($_ =~ /$varname\s*=\s*([^\s]+)/) {
        $varvalue = $1;
        last;
        }
        }
        close SPEC;
        last if defined($varvalue);
        }
        return $varvalue;
        }
        @

      • sub retrieveQMakespecVar
        {
        my $mkspec = $[0];
        my $varname = $
        [1];

        my $varvalue = undef;
        #print "retrieveMakespecVar " . $mkspec . ", " . $varname . "\n";
        my @mkspecs = split(/;/,$mkspec);
        foreach $mkspec (@mkspecs) {
        local SPEC;
        open (SPEC, "<$mkspec") or next;
        while (<SPEC>) {
        if ($_ =~ /\s
        include((.+))/) {
        # open the included mkspec
        my $oldcwd = getcwd();
        (my $volume, my $directories, my $file) = File::Spec->splitpath($mkspec);
        my $newcwd = "$volume$directories";
        chdir $newcwd if $newcwd;
        $varvalue = retrieveQMakespecVar($1, $varname);
        chdir $oldcwd;
        } elsif ($_ =~ /$varname\s*=\s*([^\s]+)/) {
        $varvalue = $1;
        last;
        }
        }
        close SPEC;
        last if defined($varvalue);
        }
        return $varvalue;
        }
        @
        (Continued in next post)

      Helmut Mülner

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hmuelner
        wrote on 8 Mar 2012, 13:05 last edited by
        #72

        (Continued)

        • cd d:\Qt\qt5\qtwebkit
        • set PATH=%PATH%;d:\Qt\qt5\gnuwin32\bin
        • set QMAKEPATH=D:\Qt\qt5\qtwebkit\Tools\qmake
        • perl Tools\Scripts\build-webkit --qt

        It now fails in qtwebkit\Source\WebCore:

        nmake.exe -f Makefile.WebCore.DerivedSources

        breaks with: NMAKE : fatal error U1095: expanded command line 'echo D:/Qt/qt5/qtwebkit/Source/WebCore/Modules/geolocation/Geolocation.idl ...[lots of idl files] ... | tr ' ' '\n' > generated/idl_files.tmp && perl -ID:/Qt/qt5/qtwebkit/Source/WebCore/bindings/scripts D:/Qt/qt5/qtwebkit/Source/WebCore/bindings/scripts/resolve-supplemental.pl --defines "LANGUAGE_JAVASCRIPT=1 ENABLE_CHANNEL_MESSAGING=1 ENABLE_SQL_DATABASE=1 ENABLE_DATALIST=1 ENABLE_WORKERS=1 ENABLE_SHARED_WORKERS=1 ENABLE_XSLT=1 ENABLE_FILTERS=1 ENABLE_CSS_FILTERS=1 ENABLE_SVG=1 ENABLE_JAVASCRIPT_DEBUGGER=1 ENABLE_WEB_SOCKETS=1 ENABLE_WEB_TIMING=1 ENABLE_TOUCH_EVENTS=1 ENABLE_GESTURE_EVENTS=1 WTF_USE_TILED_BACKING_STORE=1 ENABLE_NOTIFICATIONS=1 ENABLE_DETAILS=1 ENABLE_METER_TAG=1 ENABLE_PROGRESS_TAG=1 ENABLE_BLOB=1 ENABLE_REQUEST_ANIMATION_FRAME=1" --idlFilesList generated/idl_files.tmp --supplementalDependencyFile generated/supplemental_dependency.tmp --idlAttributesFile D:/Qt/qt5/qtwebkit/Source/WebCore/bindings/scripts/IDLAttributes.txt --preprocessor "D:\Qt\qt5\qtbase\bin\moc.exe -E"' too long

        (the command line is approx. 31400 characters long).

        Does anybody have an idea how to fix this section in DerivedSources.pri?
        @resolveSupplemental.input = IDL_ATTRIBUTES_FILE
        resolveSupplemental.script = $$RESOLVE_SUPPLEMENTAL_SCRIPT

        FIXME : We need to use only perl at some point.

        resolveSupplemental.commands = echo $$IDL_BINDINGS | tr ' ' '\n' > $$IDL_FILES_TMP &&
        perl -I$$PWD/bindings/scripts $$resolveSupplemental.script
        --defines "$${FEATURE_DEFINES_JAVASCRIPT}"
        --idlFilesList $$IDL_FILES_TMP
        --supplementalDependencyFile ${QMAKE_FUNC_FILE_OUT_PATH}/$$SUPPLEMENTAL_DEPENDENCY_FILE
        --idlAttributesFile $${IDL_ATTRIBUTES_FILE}
        --preprocessor "$${QMAKE_MOC} -E"
        resolveSupplemental.output = $$SUPPLEMENTAL_DEPENDENCY_FILE
        resolveSupplemental.add_output_to_sources = false
        resolveSupplemental.depends = $$PWD/bindings/scripts/IDLParser.pm $$IDL_BINDINGS
        GENERATORS += resolveSupplemental
        @

        Helmut Mülner

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hmuelner
          wrote on 21 Mar 2012, 14:07 last edited by
          #73

          Build qt5 on Windows 7 with VS2010 (next try, hope this is not a double post).

          I tried again with the version from 2012-03-21 with this configuration:

          configure -confirm-license -opensource -debug-and-release -platform win32-msvc2010 -fast -mp -opengl desktop -nomake tests -nomake examples

          nmake generated the following files in qtbase/bin:

          qmake.exe
          moc.pdb
          moc.ilk
          moc.exe
          rcc.pdb
          rcc.ilk
          rcc.exe
          qdoc.pdb
          qdoc.ilk
          qdoc.exe
          uic.pdb
          uic.ilk
          uic.exe
          QtCored5.dll
          QtCore5.dll
          QtNetworkd5.dll
          QtNetwork5.dll
          QtSqld5.dll
          QtSql5.dll
          QtGuid5.dll
          QtGui5.dll
          QtXmld5.dll
          QtXml5.dll
          QtWidgetsd5.dll
          QtWidgets5.dll
          QtTestd5.dll
          QtTest5.dll
          QtPrintSupportd5.dll
          QtPrintSupport5.dll
          QtConcurrentd5.dll
          QtConcurrent5.dll
          QtOpenGLd5.dll
          QtOpenGL5.dll
          QtSvgd5.dll
          QtSvg5.dll
          phonond5.dll
          phonon5.dll
          QtXmlPatternsd5.dll
          QtXmlPatterns5.dll
          xmlpatterns.ilk
          xmlpatterns.pdb
          xmlpatterns.exe
          xmlpatternsvalidator.pdb
          xmlpatternsvalidator.ilk
          xmlpatternsvalidator.exe
          QtScriptd5.dll
          QtScript5.dll
          QtScriptToolsd5.dll
          QtScriptTools5.dll
          QtV8d5.dll
          QtV85.dll
          QtQmld5.dll
          QtQml5.dll
          QtQuickd5.dll
          QtQuick5.dll
          QtQuickTestd5.dll
          QtQuickTest5.dll
          qmlscene.ilk
          qmlscene.pdb
          qmlscene.exe
          qmlplugindump.ilk
          qmlplugindump.pdb
          qmlplugindump.exe
          qmlmin.pdb
          qmlmin.ilk
          qmlmin.exe
          qmlprofiler.pdb
          qmlprofiler.ilk
          qmlprofiler.exe
          qmltestrunner.pdb
          qmltestrunner.ilk
          qmltestrunner.exe
          QtQuick1d5.dll
          QtQuick15.dll
          qmlviewer.ilk
          qmlviewer.pdb
          qmlviewer.exe
          idc.ilk
          idc.pdb
          idc.exe

          Building of webkit failed when trying to link jsc.exe with a lot of warnings about importing locally defined symbols from JavaScriptCore.lib and 24 unresolved external symbols:
          JSC::evaluate
          JSC::checkSyntax
          WTF::randomNumber
          WTF::createThread
          WTF::MetaAllocatorHandle::~MetaAllocatorHandle (12 times)
          WTF::MetaAllocator::freeFreeSpaceNode
          WTF::PassRefPtr<class WTF::MetaAllocatorHandle>
          WTF::MetaAllocator::MetaAllocator
          WTF::cryptographicallyRandomNumber (4 times)

          Any guesses how to correct this?

          Helmut Mülner

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hmuelner
            wrote on 21 Mar 2012, 17:17 last edited by
            #74

            Build qt5 on Windows 7 with VS2010 (continued)

            I could build all other modules (using nmake module-xxx) out of the box with the exception of qtmodule where moc could not parse dsserviceplugin.h because of a comma in Q_PLUGIN_METADATA. After correcting this it also built successfully.

            Helmut Mülner

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hmuelner
              wrote on 22 Mar 2012, 08:29 last edited by
              #75

              qtscript and qtwebkit contain different versions of JavaScriptCore - it looks like syncing qt5 modules does not yet work perfectly ;-)

              Helmut Mülner

              1 Reply Last reply
              0
              • S Offline
                S Offline
                situ117
                wrote on 30 Mar 2012, 09:36 last edited by
                #76

                Hi,

                I am trying to build Qt5 on Chakra Linux. I have Xcb libraries installed, but when I start configuration script I get an error saying:

                @No QPA platform plugin enabled!
                If you really want to build without a QPA platform plugin you must pass
                -no-xcb and -no-eglfs to configure. Doing this will
                produce a Qt that cannot run GUI applications.
                The dependencies needed for xcb to build are listed in
                src/plugins/platforms/xcb/README@

                What I am missing here ?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  situ117
                  wrote on 30 Mar 2012, 15:07 last edited by
                  #77

                  So the package I was missing was : xcb-util-keysyms

                  configure script was succesful after I installed this package.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    subbul
                    wrote on 4 Apr 2012, 17:28 last edited by
                    #78

                    i am facing compilation error in building qt5 (not webkit yet)
                    I am using Ubuntu, with all xcb and other dependency installed using apt-get

                    configure was successful, whereas build failed in "wayland" (error log below).
                    Any clue on the wayland header files mismatch or version problems?

                    @
                    _make[4]: Entering directory `/home/xyz/build/newqt5/qt5/qtwayland/src/plugins/platforms/wayland'
                    g++ -c -pipe -g -fvisibility=hidden -fvisibility-inlines-hidden -D_REENTRANT -Wall -W -fPIC -DQT_NO_LIBUDEV -DQ_PLATFORM_WAYLAND -DQT_NO_WAYLAND_XKB -DQT_WAYLAND_GL_SUPPORT -DQT_WAYLAND_WINDOWMANAGER_SUPPORT -DQ_FONTCONFIGDATABASE -DQT_COMPILES_IN_HARFBUZZ -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -I/home/xyz/build/newqt5/qt5/qtbase/mkspecs/linux-g++ -I. -I/home/xyz/build/newqt5/qt5/qtbase/include/QtCore/5.0.0 -I/home/xyz/build/newqt5/qt5/qtbase/include/QtCore/5.0.0/QtCore -I/home/xyz/build/newqt5/qt5/qtbase/include/QtCore -I/home/xyz/build/newqt5/qt5/qtbase/include/QtGui/5.0.0 -I/home/xyz/build/newqt5/qt5/qtbase/include/QtGui/5.0.0/QtGui -I/home/xyz/build/newqt5/qt5/qtbase/include/QtGui -I/home/xyz/build/newqt5/qt5/qtbase/include/QtPlatformSupport/5.0.0 -I/home/xyz/build/newqt5/qt5/qtbase/include/QtPlatformSupport/5.0.0/QtPlatformSupport -I/home/xyz/build/newqt5/qt5/qtbase/include/QtPlatformSupport -I/home/xyz/build/newqt5/qt5/qtbase/include -I../../../shared -Igl_integration/xcomposite_share -I.moc/debug-shared -o .obj/debug-shared/qwaylandintegration.o qwaylandintegration.cpp
                    In file included from qwaylandshmwindow.h:45:0,
                    from qwaylandintegration.cpp:46:
                    qwaylandwindow.h:112:18: error: ‘wl_callback_listener’ does not name a type
                    make[4]: *** [.obj/debug-shared/qwaylandintegration.o] Error 1

                    _
                    @

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      subbul
                      wrote on 6 Apr 2012, 10:02 last edited by
                      #79

                      Issue is solved after downloading the release from
                      http://releases.qt-project.org/qt5.0/alpha/

                      instead of GIT

                      [quote author="subbul" date="1333560508"] i am facing compilation error in building qt5 (not webkit yet)
                      I am using Ubuntu, with all xcb and other dependency installed using apt-get

                      configure was successful, whereas build failed in "wayland" (error log below).
                      Any clue on the wayland header files mismatch or version problems?

                      @
                      _make[4]: Entering directory `/home/xyz/build/newqt5/qt5/qtwayland/src/plugins/platforms/wayland'
                      g++ -c -pipe -g -fvisibility=hidden -fvisibility-inlines-hidden -D_REENTRANT -Wall -W -fPIC -DQT_NO_LIBUDEV -DQ_PLATFORM_WAYLAND -DQT_NO_WAYLAND_XKB -DQT_WAYLAND_GL_SUPPORT -DQT_WAYLAND_WINDOWMANAGER_SUPPORT -DQ_FONTCONFIGDATABASE -DQT_COMPILES_IN_HARFBUZZ -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -I/home/xyz/build/newqt5/qt5/qtbase/mkspecs/linux-g++ -I. -I/home/xyz/build/newqt5/qt5/qtbase/include/QtCore/5.0.0 -I/home/xyz/build/newqt5/qt5/qtbase/include/QtCore/5.0.0/QtCore -I/home/xyz/build/newqt5/qt5/qtbase/include/QtCore -I/home/xyz/build/newqt5/qt5/qtbase/include/QtGui/5.0.0 -I/home/xyz/build/newqt5/qt5/qtbase/include/QtGui/5.0.0/QtGui -I/home/xyz/build/newqt5/qt5/qtbase/include/QtGui -I/home/xyz/build/newqt5/qt5/qtbase/include/QtPlatformSupport/5.0.0 -I/home/xyz/build/newqt5/qt5/qtbase/include/QtPlatformSupport/5.0.0/QtPlatformSupport -I/home/xyz/build/newqt5/qt5/qtbase/include/QtPlatformSupport -I/home/xyz/build/newqt5/qt5/qtbase/include -I../../../shared -Igl_integration/xcomposite_share -I.moc/debug-shared -o .obj/debug-shared/qwaylandintegration.o qwaylandintegration.cpp
                      In file included from qwaylandshmwindow.h:45:0,
                      from qwaylandintegration.cpp:46:
                      qwaylandwindow.h:112:18: error: ‘wl_callback_listener’ does not name a type
                      make[4]: *** [.obj/debug-shared/qwaylandintegration.o] Error 1

                      _
                      @[/quote]

                      1 Reply Last reply
                      0
                      • Y Offline
                        Y Offline
                        yanghaijun
                        wrote on 23 Apr 2012, 13:48 last edited by
                        #80

                        i building qt5 with wingw32,but have a error:

                        qsvgstyle_p.h:65:20: qdebug.h:No such file or directory

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          jlayt
                          wrote on 4 May 2012, 18:00 last edited by
                          #81

                          Hi, trying to build qtbase on WinXP using MSVC2008, followed the instructions exactly and it builds OK, but when when I try to run I get:

                          "Failed to load platform plugin "". Available platforms are: windows:

                          Any hints?

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            stottle
                            wrote on 4 May 2012, 21:39 last edited by
                            #82

                            I am trying to build the qt5-alpha source from the zip download as I don't have git on my windows machine. Is there any way to do a "make clean"/"make confclean" without git?

                            1 Reply Last reply
                            0
                            • P Offline
                              P Offline
                              Philius
                              wrote on 6 May 2012, 04:36 last edited by
                              #83

                              I just happened to notice your posts - I didn't get an email notification.

                              According to configure, "To reconfigure, run 'make confclean' and 'configure'.".
                              Well you probably know that at least with Qt5 alpha, that doesn't work.

                              I'm on Debian so I can't offer any Windows wisdom, but for "make clean" I just delete the directory and re-unpack the alpha .tar.bz2 again.

                              I'm in the dark as to how to build/use the QtDeclarative component.
                              It appears that the header I'm looking for - "QtDeclarative/QDeclarativeComponent" isn't installed although it's in the source tree - yes I built/installed qtjsbackend and qtdeclarative.

                              Also, it would be nice if Qt5 beta had a top-level makefile that included targets for
                              linux-x86-32-gcc-x11
                              linux-x86-64-gcc-x11
                              windows7-64-msvc2010

                              and so on, so we could be sure we're building against a known and tested build configuration.

                              And yes, it should fail if any prerequisites are missing (and maybe print warnings if they are different versions).

                              1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                thinks
                                wrote on 7 May 2012, 19:16 last edited by
                                #84

                                Hi All,

                                I'm trying to building Qt5 om Mac OSX 10.7. Following the instructions given here:

                                http://qt-project.org/wiki/Building_Qt_5_from_Git

                                However, I'm running into an issue in the build-step which I'm not
                                sure how to solve. One of the errors I'm getting is the following:

                                gcc: error: tools/qlocale_mac.mm: Objective-C++ compiler not installed
                                on this system

                                I will give a detailed step-by-step descriptions of my process below,
                                assuming the starting point to be a blank shell with PWD=$HOME:

                                (1) git clone git://gitorious.org/qt/qt5.git qt5 [check!]

                                (2) cd qt5 [check!] :)

                                (3) perl init-repository --no-webkit [check! Does its job without complaining. I can provide the log if necessary]

                                (4) unset QTDIR [check!] :)

                                (5) export PATH="$PWD/qtbase/bin:$PWD/qtrepotools/bin:$PATH" [check!] :)

                                (6) ./configure -developer-build -opensource -nomake examples -nomake
                                tests [check! See below]

                                Get a few warnings about some Qt header not containing macros, e.g.:

                                QtCore: WARNING:
                                /Users/thinks/qt5/qtbase/src/corelib/qtcoreversion.h does
                                not include QT_BEGIN_HEADER

                                but they don't seem severe. Other relevant output:

                                Build type: macx-clang
                                Architecture: x86_64
                                Host architecture: x86_64
                                Platform notes:

                                • Also available for Mac OS X: macx-g++

                                (7) ./build -j 4

                                This is where the trouble begins. The following (first) error is given:

                                [Lots of output without errors...]
                                qabstractanimation.h -o .moc/debug-shared/moc_qabstractanimation.cpp
                                gcc: error: tools/qlocale_mac.mm: Objective-C++ compiler not installed
                                on this system
                                gcc: error: kernel/qcore_mac_objc.mm: Objective-C++ compiler not
                                installed on this system

                                Similar errors are reported further on as well, all with the same
                                reason given. It seems somewhat strange that gcc is used over g++, but
                                at the moment I'm not really sure why this happens.

                                Some info about gcc:

                                [thinks@wiggs ~] gcc --version
                                gcc (GCC) 4.8.0 20120408 (experimental)

                                Any advice greatly appreciated!

                                Thanks,

                                T

                                1 Reply Last reply
                                0
                                • L Offline
                                  L Offline
                                  ludde
                                  wrote on 9 May 2012, 14:34 last edited by
                                  #85

                                  @thinks, did you try to "build the 5.0 alpha":http://qt-project.org/wiki/Qt-5-Alpha-building-instructions instead? Might be easier than building from git.

                                  1 Reply Last reply
                                  0
                                  • T Offline
                                    T Offline
                                    thinks
                                    wrote on 9 May 2012, 14:41 last edited by
                                    #86

                                    Thanks, Ludde! :)

                                    We finally got it working here. The following was required:

                                    • Grab latest from Qt5 git repo.
                                      git clone git://gitorious.org/qt/qt5.git qt5

                                    • Use Qt's provided tool to initialize the repo.
                                      cd qt5
                                      perl init-repository --no-webkit

                                    • Set up our build environment.
                                      unset QTDIR
                                      export PATH="$PWD/qtbase/bin:$PWD/qtrepotools/bin:$PATH"
                                      export PATH=/Applications/XCode.app/Contents/Developer/usr/bin:$PATH
                                      export CPP=clang++
                                      export CC=clang
                                      echo PATH $PATH

                                    • Pre-build configuration. Note that we are forcing it to build using
                                      the Xcode compilers.
                                      ./configure -no-pch -developer-build -confirm-license -opensource
                                      -release -nomake demos -nomake examples -arch x86 -sdk
                                      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk

                                    • Build. We could increase the number of course to improve speed once
                                      we are convinced that this works well...
                                      ./build -j 1

                                    Not sure all of that stuff is required though, but because the build time is quite steep (even with j > 1) we didn't have time to narrow it down.

                                    Cheers,

                                    T

                                    1 Reply Last reply
                                    0
                                    • B Offline
                                      B Offline
                                      Bloops
                                      wrote on 11 May 2012, 11:38 last edited by
                                      #87

                                      hi .

                                      I am currently doing the Qt5 manipulation and I have one little question ^^ .

                                      Is it possible to realize a configuration (./configure) in static Qt5 mode (-static) by incorporing the QtSerialPort class, which we must add to our pre-existing library thanks to that manipulation: http://qt-project.org/wiki/QtSerialPort ?

                                      If this is not possible to change QtSerialPort in static library, but just the QT5 library . When I will compile my project which uses QtSerialPort, will it run like a static program or I need to include a .so (or dll) ?

                                      Sorry for my bad english .

                                      1 Reply Last reply
                                      0
                                      • T Offline
                                        T Offline
                                        tonys10
                                        wrote on 13 Jun 2012, 19:49 last edited by
                                        #88

                                        I am having trouble building Qt5......

                                        I have Visual Studio 2008 andf have installed the latest SDK......

                                        C:\qt5>configure -developer-build -opensource -nomake examples -nomake tests

                                        • C:/qt5/qtbase/configure -developer-build -opensource -nomake examples -nomake
                                          tests
                                          Please wait while bootstrapping configure ...

                                        Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
                                        Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

                                            cl -c -Yc -nologo -Zm200 -Zc:wchar_t -MT -W3 -GR -EHsc -w34100 -w34189
                                        

                                        -DUNICODE -DQT_NODLL -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT
                                        _LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VAR
                                        IANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DCOMMERCIAL_VERSION -I"....
                                        include" -I"....\include\QtCore" -I"....\include\QtCore\5.0.0" -I"....\includ
                                        e\QtCore\5.0.0\QtCore" -I"C:\qt5\qtbase\tools\shared" -I"C:\qt5\qtbase\mkspecs\w
                                        in32-msvc2008" -Fpconfigure_pch.pch -Foconfigure_pch.obj -TP C:\qt5\qtbase\tools
                                        \configure\configure_pch.h

                                        Command line warning D4002 : ignoring unknown option '-Zc'
                                        Command line warning D4002 : ignoring unknown option '-Z:'
                                        Command line warning D4002 : ignoring unknown option '-Zw'
                                        Command line warning D4002 : ignoring unknown option '-Zc'
                                        Command line warning D4002 : ignoring unknown option '-Zh'
                                        Command line warning D4002 : ignoring unknown option '-Zr'
                                        Command line warning D4002 : ignoring unknown option '-Z_'
                                        Command line warning D4002 : ignoring unknown option '-Zt'
                                        Command line warning D4002 : ignoring unknown option '-w34100'
                                        Command line warning D4002 : ignoring unknown option '-w34189'

                                        configure_pch.h
                                        ....\include\QtCore../../src/corelib/global/qglobal.h(45) : fatal error C1083:
                                        Cannot open include file: 'stddef.h': No such file or directory
                                        NMAKE : fatal error U1077: 'cl' : return code '0x2'
                                        Stop.
                                        *** qtbase/configure exited with non-zero status.

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          Sfiet_Konstantin
                                          wrote on 2 Jul 2012, 11:08 last edited by
                                          #89

                                          I have a proble compiling Qt5 master recently
                                          (Linux x86_64 Mageia, GCC 4.7.1)

                                          make[2] : on entre dans le répertoire « /home/qtdev/srcs/qt5/qtsystems/src/systeminfo »
                                          g++ -c -m64 -pipe -g -std=c++0x -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fno-exceptions -fPIC -DQT_SHARED -DQT_COMPILER_SUPPORTS_SSE2 -DQT_COMPILER_SUPPORTS_SSE3 -DQT_COMPILER_SUPPORTS_SSSE3 -DQT_COMPILER_SUPPORTS_SSE4_1 -DQT_COMPILER_SUPPORTS_SSE4_2 -DQT_COMPILER_SUPPORTS_AVX -DQT_COMPILER_SUPPORTS_AVX2 -DQT_BUILD_SYSTEMINFO_LIB -DQT_MAKEDLL -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_NO_MTLIB -DQT_NO_SFW_NETREG -DQT_NO_OFONO -DQT_NO_UDISKS -DQT_NO_LIBSYSINFO -DQT_QML_LIB -DQQmlImageProvider=QQuickImageProvider -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/qtdev/mkspecs/default -I. -I/home/qtdev/include/QtCore -I/home/qtdev/include/QtGui -I/home/qtdev/include/QtNetwork -I/home/qtdev/include -I/home/qtdev/include/QtQml -I/home/qtdev/include/QtJsonDb -I../../include/QtSystemInfo/5.0.0 -I../../include/QtSystemInfo/5.0.0/QtSystemInfo -I../../include -I../../include/QtSystemInfo -I../../include -I.rcc/debug-shared -I.moc/debug-shared -o .obj/debug-shared/qnetworkinfo_linux.o qnetworkinfo_linux.cpp
                                          In file included from qnetworkinfo_linux.cpp:56:0:
                                          /usr/include/bluetooth/bluetooth.h: In function ‘uint64_t bt_get_le64(const void*)’:
                                          /usr/include/bluetooth/bluetooth.h:159:9: erreur: expected identifier before ‘’ token
                                          /usr/include/bluetooth/bluetooth.h:159:9: erreur: expected ‘,’ or ‘...’ before ‘(’ token
                                          /usr/include/bluetooth/bluetooth.h:159:9: erreur: expected ‘;’ at end of member declaration
                                          /usr/include/bluetooth/bluetooth.h:159:9: erreur: ‘__v’ does not name a type
                                          /usr/include/bluetooth/bluetooth.h:159:9: erreur: ‘typeof’ was not declared in this scope
                                          /usr/include/bluetooth/bluetooth.h:159:9: erreur: ‘struct bt_get_le64(const void
                                          )::<anonymous>’ has no member named ‘__v’
                                          /usr/include/bluetooth/bluetooth.h: In function ‘uint64_t bt_get_be64(const void*)’:
                                          /usr/include/bluetooth/bluetooth.h:164:9: erreur: expected identifier before ‘’ token
                                          /usr/include/bluetooth/bluetooth.h:164:9: erreur: expected ‘,’ or ‘...’ before ‘(’ token
                                          /usr/include/bluetooth/bluetooth.h:164:9: erreur: expected ‘;’ at end of member declaration
                                          /usr/include/bluetooth/bluetooth.h:164:9: erreur: ‘__v’ does not name a type
                                          /usr/include/bluetooth/bluetooth.h:164:9: erreur: ‘typeof’ was not declared in this scope
                                          /usr/include/bluetooth/bluetooth.h:164:9: erreur: ‘struct bt_get_be64(const void
                                          )::<anonymous>’ has no member named ‘__v’
                                          /usr/include/bluetooth/bluetooth.h: In function ‘uint32_t bt_get_le32(const void*)’:
                                          /usr/include/bluetooth/bluetooth.h:169:9: erreur: expected identifier before ‘’ token
                                          /usr/include/bluetooth/bluetooth.h:169:9: erreur: expected ‘,’ or ‘...’ before ‘(’ token
                                          /usr/include/bluetooth/bluetooth.h:169:9: erreur: expected ‘;’ at end of member declaration
                                          /usr/include/bluetooth/bluetooth.h:169:9: erreur: ‘__v’ does not name a type
                                          /usr/include/bluetooth/bluetooth.h:169:9: erreur: ‘typeof’ was not declared in this scope
                                          /usr/include/bluetooth/bluetooth.h:169:9: erreur: ‘struct bt_get_le32(const void
                                          )::<anonymous>’ has no member named ‘__v’
                                          /usr/include/bluetooth/bluetooth.h: In function ‘uint32_t bt_get_be32(const void*)’:
                                          /usr/include/bluetooth/bluetooth.h:174:9: erreur: expected identifier before ‘’ token
                                          /usr/include/bluetooth/bluetooth.h:174:9: erreur: expected ‘,’ or ‘...’ before ‘(’ token
                                          /usr/include/bluetooth/bluetooth.h:174:9: erreur: expected ‘;’ at end of member declaration
                                          /usr/include/bluetooth/bluetooth.h:174:9: erreur: ‘__v’ does not name a type
                                          /usr/include/bluetooth/bluetooth.h:174:9: erreur: ‘typeof’ was not declared in this scope
                                          /usr/include/bluetooth/bluetooth.h:174:9: erreur: ‘struct bt_get_be32(const void
                                          )::<anonymous>’ has no member named ‘__v’
                                          /usr/include/bluetooth/bluetooth.h: In function ‘uint16_t bt_get_le16(const void*)’:
                                          /usr/include/bluetooth/bluetooth.h:179:9: erreur: expected identifier before ‘’ token
                                          /usr/include/bluetooth/bluetooth.h:179:9: erreur: expected ‘,’ or ‘...’ before ‘(’ token
                                          /usr/include/bluetooth/bluetooth.h:179:9: erreur: expected ‘;’ at end of member declaration
                                          /usr/include/bluetooth/bluetooth.h:179:9: erreur: ‘__v’ does not name a type
                                          /usr/include/bluetooth/bluetooth.h:179:9: erreur: ‘typeof’ was not declared in this scope
                                          /usr/include/bluetooth/bluetooth.h:179:9: erreur: ‘struct bt_get_le16(const void
                                          )::<anonymous>’ has no member named ‘__v’
                                          /usr/include/bluetooth/bluetooth.h: In function ‘uint16_t bt_get_be16(const void*)’:
                                          /usr/include/bluetooth/bluetooth.h:184:9: erreur: expected identifier before ‘’ token
                                          /usr/include/bluetooth/bluetooth.h:184:9: erreur: expected ‘,’ or ‘...’ before ‘(’ token
                                          /usr/include/bluetooth/bluetooth.h:184:9: erreur: expected ‘;’ at end of member declaration
                                          /usr/include/bluetooth/bluetooth.h:184:9: erreur: ‘__v’ does not name a type
                                          /usr/include/bluetooth/bluetooth.h:184:9: erreur: ‘typeof’ was not declared in this scope
                                          /usr/include/bluetooth/bluetooth.h:184:9: erreur: ‘struct bt_get_be16(const void
                                          )::<anonymous>’ has no member named ‘__v’

                                          Seems related to bluetooth, but since I don't know bluez very well, I don't know where to look at.

                                          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