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. Trying to build static Qt5 in ubuntu 12.04 for deploying standalone executable - make errors
QtWS25 Last Chance

Trying to build static Qt5 in ubuntu 12.04 for deploying standalone executable - make errors

Scheduled Pinned Locked Moved Installation and Deployment
19 Posts 3 Posters 5.6k 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.
  • B Offline
    B Offline
    bloks
    wrote on last edited by
    #1

    I'm trying to statically build Qt5 on ubuntu 12.04 so I could deploy a standalone executable.

    Following the "'Qt for X11 Requirements'":http://qt-project.org/doc/qt-4.8/requirements-x11.html page, I've installed the following packages:

    libfontconfig1-dev
    libfreetype6-dev
    libx11-dev
    libxcursor-dev
    libxext-dev
    libxfixes-dev
    libxft-dev
    libxi-dev
    libxrandr-dev
    libxrender-dev
    

    I'm trying to follow the instructions from these links:

    http://qt-project.org/doc/qt-5/linux-building.html
    http://qt-project.org/doc/qt-4.8/deployment-x11.html

    but I can never get past the make stage.

    My configuration is as follows: ./configure -static -prefix /tmp/qt-everywhere-opensource-src-5.2.1 -opensource -qt-xcb

    I'm getting errors in the following areas:

    @
    make[3]: Leaving directory /tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/tools/qmlprofiler' make[2]: Leaving directory /tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/tools'
    make[1]: Leaving directory `/tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative'
    make: *** [module-qtdeclarative-make_first] Error 2
    @

    What should I do?

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

      Hi and welcome to devnet,

      How did you configure Qt ?

      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
      0
      • B Offline
        B Offline
        bloks
        wrote on last edited by
        #3

        Thanks! I configured it without any parameters.

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

          There's something I am not understanding here. You want to compile Qt statically and you don't pass any parameter when configuring ?

          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
          0
          • B Offline
            B Offline
            bloks
            wrote on last edited by
            #5

            First post edited.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andreyc
              wrote on last edited by
              #6

              It is better to add another post with your new results instead of editing the previous. With adding new post you will make it easier for a reader to understand you problem and the history of the problem.

              Could you post the error messages from a compiler or linker.
              The messages that you have posted are from make and are not very useful.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                bloks
                wrote on last edited by
                #7

                How do I retrieve the error messages from the compiler/linker?

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andreyc
                  wrote on last edited by
                  #8

                  The lines in make output above those that you put in your message.
                  It should contain words like "error" or "warning"

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    bloks
                    wrote on last edited by
                    #9

                    I think these should be it:

                    @
                    ../../include/QtCore/../../src/corelib/tools/qstring.h: In function ‘const QChar* parseIpFuture(QString&, const QChar*, const QChar*, QUrl::ParsingMode)’:
                    ../../include/QtCore/../../src/corelib/tools/qstring.h:853:7: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
                    ../../include/QtCore/../../src/corelib/tools/qstring.h: In member function ‘virtual QString QSqlDriver::sqlStatement(QSqlDriver::StatementType, const QString&, const QSqlRecord&, bool) const’:
                    ../../include/QtCore/../../src/corelib/tools/qstring.h:853:7: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
                    access/qnetworkaccessdebugpipebackend_p.h:0: Note: No relevant classes found. No output generated.
                    ../../../3rdparty/sqlite/sqlite3.c:93246:1: warning: missing initializer [-Wmissing-field-initializers]
                    ../../../3rdparty/sqlite/sqlite3.c:93246:1: warning: (near initialization for ‘sqlite3Apis.aggregate_count’) [-Wmissing-field-initializers]
                    ../../../3rdparty/sqlite/sqlite3.c: In function ‘porter_stemmer’:
                    ../../../3rdparty/sqlite/sqlite3.c:127212:41: warning: value computed is not used [-Wunused-value]
                    ../../../3rdparty/sqlite/sqlite3.c:127216:39: warning: value computed is not used [-Wunused-value]
                    ../../../3rdparty/sqlite/sqlite3.c:127229:35: warning: value computed is not used [-Wunused-value]
                    ../../../3rdparty/sqlite/sqlite3.c:127234:39: warning: value computed is not used [-Wunused-value]
                    ../../../3rdparty/sqlite/sqlite3.c:127240:41: warning: value computed is not used [-Wunused-value]
                    ../../../3rdparty/sqlite/sqlite3.c:127245:39: warning: value computed is not used [-Wunused-value]
                    ../../../3rdparty/sqlite/sqlite3.c:127254:38: warning: value computed is not used [-Wunused-value]
                    ../../../3rdparty/sqlite/sqlite3.c:127261:37: warning: value computed is not used [-Wunused-value]
                    ../../../3rdparty/sqlite/sqlite3.c:127304:39: warning: value computed is not used [-Wunused-value]
                    ../../../3rdparty/sqlite/sqlite3.c:127324:34: warning: value computed is not used [-Wunused-value]
                    @

                    (continued next post)

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      bloks
                      wrote on last edited by
                      #10

                      @
                      Project MESSAGE: ActiveQt is a Windows-only module. Will just generate a docs target.
                      Checking for libmng... no
                      Checking for libtiff... no
                      ../../../3rdparty/libmng/libmng_object_prc.c: In function ‘mng_create_ani_disc’:
                      ../../../3rdparty/libmng/libmng_object_prc.c:6109:17: warning: variable ‘iRetcode’ set but not used [-Wunused-but-set-variable]
                      ../../../3rdparty/libmng/libmng_pixels.c: In function ‘mng_restore_bkgd_backcolor’:
                      ../../../3rdparty/libmng/libmng_pixels.c:8990:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                      ../../../3rdparty/libmng/libmng_pixels.c: In function ‘mng_restore_bkgd_bkgd’:
                      ../../../3rdparty/libmng/libmng_pixels.c:9100:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                      ../../../3rdparty/libmng/libmng_pixels.c: In function ‘mng_restore_bkgd_bgcolor’:
                      ../../../3rdparty/libmng/libmng_pixels.c:9147:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                      In file included from qserialport.cpp:1400:0:
                      .moc/moc_qserialport.cpp: In member function ‘virtual int QSerialPort::qt_metacall(QMetaObject::Call, int, void**)’:
                      .moc/moc_qserialport.cpp:444:76: warning: ‘QSerialPort::DataErrorPolicy QSerialPort::dataErrorPolicy() const’ is deprecated (declared at qserialport.cpp:1124) [-Wdeprecated-declarations]
                      .moc/moc_qserialport.cpp:459:76: warning: ‘bool QSerialPort::setDataErrorPolicy(QSerialPort::DataErrorPolicy)’ is deprecated (declared at qserialport.cpp:1105) [-Wdeprecated-declarations]
                      ../../../3rdparty/libtiff/libtiff/tif_dirinfo.c:196:5: warning: missing initializer [-Wmissing-field-initializers]
                      ../../../3rdparty/libtiff/libtiff/tif_dirinfo.c:196:5: warning: (near initialization for ‘tiffFields[139].field_subfields’) [-Wmissing-field-initializers]
                      ../../../3rdparty/libtiff/libtiff/tif_write.c: In function ‘TIFFWriteEncodedStrip’:
                      ../../../3rdparty/libtiff/libtiff/tif_write.c:236:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                      ../../../3rdparty/libtiff/libtiff/tif_write.c: In function ‘TIFFWriteEncodedTile’:
                      ../../../3rdparty/libtiff/libtiff/tif_write.c:382:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘_tiffReadProc’:
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c:67:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘_tiffWriteProc’:
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c:79:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘_tiffSeekProc’:
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c:91:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘_tiffCloseProc’:
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c:97:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘_tiffSizeProc’:
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c:104:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c: In function ‘TIFFFdOpen’:
                      ../../../3rdparty/libtiff/libtiff/tif_unix.c:159:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
                      sh: 1: /tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/bin/qmlimportscanner: not found
                      Project ERROR: Failed to parse qmlimportscanner output.
                      make[4]: *** [sub-adding-make_first] Error 3
                      make[3]: *** [sub-referenceexamples-make_first] Error 2
                      make[2]: *** [sub-qml-make_first] Error 2
                      make[1]: *** [sub-examples-make_first] Error 2
                      make[1]: *** Waiting for unfinished jobs....
                      make: *** [module-qtdeclarative-make_first] Error 2
                      @
                      (end)

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        andreyc
                        wrote on last edited by
                        #11

                        Did you delete directory with previously failed build of qt and unarchive it fresh before run configure with the options?

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          bloks
                          wrote on last edited by
                          #12

                          I ran 'make uninstall' then deleted the directory every time.

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            andreyc
                            wrote on last edited by
                            #13

                            You don't need to run 'make uninstall' if have not install it yet. Just delete is enough.
                            Most of the messages are warning from third party libraries. The error is
                            @
                            sh: 1: /tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/bin/qmlimportscanner: not found
                            Project ERROR: Failed to parse qmlimportscanner output.
                            @
                            Is it possible that you run out of space on /tmp ?

                            Also I just noticed that you set prefix to the build directory. I don't think it is correct. I have not tried it. Usually '-prefix' is for the prefix to an install path.
                            If you want to install Qt to $HOME/Qt then prefix should be $HOME/Qt
                            Try to change -prefix and run configure, make again on fresh un-archived directory.

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              andreyc
                              wrote on last edited by
                              #14

                              In addition, if you have enough space in /tmp and if change of the prefix does not help either then redirect all make output to a log file and try to find out why qmlimportscanner is not found. Was it build?

                              1 Reply Last reply
                              0
                              • B Offline
                                B Offline
                                bloks
                                wrote on last edited by
                                #15

                                I've followed your instructions and have the output in a file. The qmlimportscanner file is clearly there but for some reason the make file can't see it.

                                1 Reply Last reply
                                0
                                • A Offline
                                  A Offline
                                  andreyc
                                  wrote on last edited by
                                  #16

                                  Have you checked a space on /tmp ?
                                  @
                                  df -h /tmp
                                  @

                                  After build failed do you see qmlimportscanner?
                                  @
                                  ls -l /tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/bin/qmlimportscanner
                                  @

                                  1 Reply Last reply
                                  0
                                  • B Offline
                                    B Offline
                                    bloks
                                    wrote on last edited by
                                    #17

                                    df -h /tmp
                                    Filesystem Size Used Avail Use% Mounted on
                                    /dev/sda1 451G 38G 391G 9% /

                                    There should be more than enough space in /tmp.

                                    ls -l qtdeclarative/bin/qmlimportscanner
                                    -rwxr-xr-x 1 root root 4330556 May 21 10:17 qtdeclarative/bin/qmlimportscanner

                                    1 Reply Last reply
                                    0
                                    • A Offline
                                      A Offline
                                      andreyc
                                      wrote on last edited by
                                      #18

                                      I tried to build Qt 5.2.1 on Ubuntu 12.04 32bit and it failed to build qtwebkit. So I don't know if it passed or not the point where your build failed. I see that qmlimportscannel is built but I don't see any call to it.

                                      I noticed that you build Qt under root.
                                      Try to build it under normal user, maybe root environment is restricted.

                                      1 Reply Last reply
                                      0
                                      • B Offline
                                        B Offline
                                        bloks
                                        wrote on last edited by
                                        #19

                                        I tried building it without root, and I still got these errors:

                                        Using PCH Using PCHsh: 1: /tmp/qt-everywhere-opensource-src-5.2.1/qtdeclarative/bin/qmlimportscanner: not found
                                        Project ERROR: Failed to parse qmlimportscanner output.

                                        The file is there as usual.

                                        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