Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Building Qt from Git
Forum Updated to NodeBB v4.3 + New Features

Building Qt from Git

Scheduled Pinned Locked Moved General and Desktop
32 Posts 3 Posters 11.3k 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.
  • M Offline
    M Offline
    Mechatronic
    wrote on last edited by
    #21

    may be it will explain something :
    output of "qmake -query"
    @QT_INSTALL_PREFIX:/usr
    QT_INSTALL_DATA:/usr/share/qt4
    QT_INSTALL_DOCS:/usr/share/qt4/doc
    QT_INSTALL_HEADERS:/usr/include/qt4
    QT_INSTALL_LIBS:/usr/lib/x86_64-linux-gnu
    QT_INSTALL_BINS:/usr/bin
    QT_INSTALL_PLUGINS:/usr/lib/x86_64-linux-gnu/qt4/plugins
    QT_INSTALL_IMPORTS:/usr/lib/x86_64-linux-gnu/qt4/imports
    QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations
    QT_INSTALL_CONFIGURATION:/etc/xdg
    QT_INSTALL_EXAMPLES:/usr/lib/qt4/examples
    QT_INSTALL_DEMOS:/usr/lib/qt4/demos
    QMAKE_MKSPECS:/usr/share/qt4/mkspecs
    QMAKE_VERSION:2.01a
    QT_VERSION:4.8.2
    @

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #22

      Oh, you are probably using an old version of Qt Creator, that is unfortunate. I advise an update.

      mkspecs is a thing Qt uses as a guide on how to create Makefiles for different platforms and compilers. You can take a look at how it looks like in <Qt dir>/qtbase/mkspecs.

      In your case, you probably need to specify linux-g++.

      (Z(:^

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mechatronic
        wrote on last edited by
        #23

        and this is putput of
        " /home/user/qt5/qtbase/bin/qmake -query"
        @
        QT_SYSROOT:
        QT_INSTALL_PREFIX:/home/user/qt5/qtbase
        QT_INSTALL_ARCHDATA:/home/user/qt5/qtbase
        QT_INSTALL_DATA:/home/user/qt5/qtbase
        QT_INSTALL_DOCS:/home/user/qt5/qtbase/doc
        QT_INSTALL_HEADERS:/home/user/qt5/qtbase/include
        QT_INSTALL_LIBS:/home/user/qt5/qtbase/lib
        QT_INSTALL_LIBEXECS:/home/user/qt5/qtbase/libexec
        QT_INSTALL_BINS:/home/user/qt5/qtbase/bin
        QT_INSTALL_TESTS:/home/user/qt5/qtbase/tests
        QT_INSTALL_PLUGINS:/home/user/qt5/qtbase/plugins
        QT_INSTALL_IMPORTS:/home/user/qt5/qtbase/imports
        QT_INSTALL_QML:/home/user/qt5/qtbase/qml
        QT_INSTALL_TRANSLATIONS:/home/user/qt5/qtbase/translations
        QT_INSTALL_CONFIGURATION:/home/user/qt5/qtbase/etc/xdg
        QT_INSTALL_EXAMPLES:/home/user/qt5/qtbase/examples
        QT_INSTALL_DEMOS:/home/user/qt5/qtbase/examples
        QT_HOST_PREFIX:/home/user/qt5/qtbase
        QT_HOST_DATA:/home/user/qt5/qtbase
        QT_HOST_BINS:/home/user/qt5/qtbase/bin
        QT_HOST_LIBS:/home/user/qt5/qtbase/lib
        QMAKE_SPEC:linux-g++
        QMAKE_XSPEC:linux-g++
        QMAKE_VERSION:3.0
        QT_VERSION:5.3.0
        @

        Please, tell, why new qmake is not used as default, if build == install in developer build?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Mechatronic
          wrote on last edited by
          #24

          isn't Qt Creator in Qt git repository? should I download it separately?

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #25

            Qt does not add itself to PATH, especially developer builds. This allows you to use multiple versions of Qt in parallel, which is extremely useful.

            You can add it to PATH by hand, of course. Qt Creator does not need that, though: it automatically modifies the environment of binaries it executes.

            (Z(:^

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #26

              [quote author="Mechatronic" date="1397127790"]isn't Qt Creator in Qt git repository? should I download it separately?[/quote]

              No, Qt Creator is a completely separate project. You can use the precompiled one, it will save you much time and effort, and work just as well.

              (Z(:^

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Mechatronic
                wrote on last edited by
                #27

                sierdzio, you a really master. I installed qtcreator and built empty project - all works fine. Thank you very much.

                Now I try to build Marble http://marble.kde.org/sources.php project. It uses cmake and find Qt4 only. Should I add Qt5/qtbase/bin to PATH for it?

                cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=TRUE
                @cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=TRUE -DCMAKE_INSTALL_PREFIX=/usr ~/marble/sources
                -- Could NOT find Phonon (missing: PHONON_INCLUDE_DIR PHONON_LIBRARY)
                -- Could NOT find Phonon (missing: PHONON_INCLUDE_DIR PHONON_LIBRARY)
                -- Could NOT find QextSerialPort (missing: QEXTSERIALPORT_INCLUDE_DIR QEXTSERIALPORT_LIBRARIES)
                -- Could NOT find quazip (missing: QUAZIP_INCLUDE_DIR QUAZIP_LIBRARIES)
                -- Could NOT find libshp (missing: LIBSHP_INCLUDE_DIR LIBSHP_LIBRARIES)
                -- Could NOT find libgps (missing: LIBGPS_INCLUDE_DIR LIBGPS_LIBRARIES)
                -- checking for module 'liblocation>=0.102'
                -- package 'liblocation>=0.102' not found
                -- checking for module 'QtLocation>=1.0.1'
                -- package 'QtLocation>=1.0.1' not found
                -- Could NOT find QtMobility (missing: QTMOBILITY_INCLUDE_DIR)
                -- Could NOT find QtLocation (missing: QTLOCATION_INCLUDE_DIR QTLOCATION_LIBRARIES)
                -- Could NOT find libwlocate (missing: LIBWLOCATE_INCLUDE_DIR LIBWLOCATE_LIBRARIES)

                -- The following features have been enabled:

                • Unit tests , Build unit tests. Toggle with BUILD_MARBLE_TESTS=YES/NO. 'make test' will run all.
                • Qt Designer plugins , Marble widget support in Qt Designer. Toggle with WITH_DESIGNER_PLUGIN=YES/NO
                • Marble Desktop/Mobile applications , Build Marble Desktop/Mobile applications. Toggle with BUILD_MARBLE_APPS=YES/NO.

                -- The following REQUIRED packages have been found:

                • Qt4 , cross-platform application framework , http://qt.digia.com/
                  core framework

                -- The following features have been disabled:

                • Marble tools , Build various Marble tools for e.g. file format conversion. Toggle with BUILD_MARBLE_TOOLS=YES/NO.
                • Marble library C++ examples , Build C++ examples showing how to use the Marble library. Toggle with BUILD_MARBLE_EXAMPLES=YES/NO.

                -- The following OPTIONAL packages have not been found:

                • Phonon , cross-platform multimedia framework that enables the use of audio and video content , http://qt.digia.com/
                  Support for playback of soundcue elements
                  Voice navigation (sound or human speakers)
                • QextSerialPort , access to serial ports , http://code.google.com/p/qextserialport/
                  Reading from serial port in APRS plugin
                • quazip , reading and writing of ZIP archives , http://quazip.sourceforge.net/
                  reading and displaying .kmz files
                • libshp , reading and writing of ESRI Shapefiles (.shp) , http://shapelib.maptools.org/
                  reading and displaying .shp files
                • libgps , communicating with the GPS daemon , http://catb.org/gpsd/
                  position information via gpsd
                • liblocation , position information on Maemo 5 devices , http://maemo.org/
                  position information via GPS/WLAN for the Nokia N900 smartphone
                • QtMobility , a collection of APIs and frameworks , http://qt.digia.com/
                  Required for QtLocation to work
                • QtLocation , geographical support for position and map use , http://qt.digia.com/
                  position information via QtMobility QtLocation
                • libwlocate , WLAN-based geolocation , http://www.openwlanmap.org/
                  Position information based on neighboring WLAN networks

                -- Configuring done
                -- Generating done
                -- Build files have been written to: /home/user/marble/build
                @

                1 Reply Last reply
                0
                • sierdzioS Offline
                  sierdzioS Offline
                  sierdzio
                  Moderators
                  wrote on last edited by
                  #28

                  Thank you, that is nice to hear :-)

                  If it is based on Qt4, you need to use Qt4 for Marble. Using it with Qt5 would require porting. Porting from Qt4 to Qt5 in itself is not hard (usually can be done within an hour even for big projects), but I would not recommend doing that if you are not experienced in Qt.

                  "Porting guide link":https://qt-project.org/doc/qt-5/portingguide.html.

                  (Z(:^

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Mechatronic
                    wrote on last edited by
                    #29

                    No, this branch of Marble supports Qt5, but it is automatically define latest Qt version. I tryed with Ubuntu SDK, but it is contained Qt 5.0. I tryed official installer of Qt 5.2.1, but it is not work with Marble build system. Administrator of Marble forum sayed "It appears something is wrong with the installation of Qt 5 on your system - instead of using the official installer, could you try using your distribution packages instead?" and I tryed to build Qt5 from git.
                    I should to do that, but I can not =(.

                    1 Reply Last reply
                    0
                    • sierdzioS Offline
                      sierdzioS Offline
                      sierdzio
                      Moderators
                      wrote on last edited by
                      #30

                      KDE projects use CMAKE build system, which is supported by Qt 5. But I have never used it myself so sadly I cannot help here. You can open a new thread about using/ compiling Qt 5 with cmake, maybe other forum users will be able to provide some information.

                      (Z(:^

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        Mechatronic
                        wrote on last edited by
                        #31

                        There is discussion of my attempt in Marble forum.
                        http://forum.kde.org/viewtopic.php?f=217&t=120470&sid=e6e0d5ea4bf76244a91f79255aae1198

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          Mechatronic
                          wrote on last edited by
                          #32

                          sierdzio, ok, thank you very much. I will open new topic. May be someone will help me.
                          Thank you!

                          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