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. Definitive guide to building source from downloaded .run file?
Forum Updated to NodeBB v4.3 + New Features

Definitive guide to building source from downloaded .run file?

Scheduled Pinned Locked Moved Solved Installation and Deployment
37 Posts 5 Posters 6.9k 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.
  • KH-219DesignK Offline
    KH-219DesignK Offline
    KH-219Design
    wrote on last edited by
    #19

    regarding the question about not finding a plugin... I'm not really sure, but you might try running ldd on the so you built.

    if ldd produces anything like either of these, then you would be missing load-time dependencies for your so:

    bad outcome #1:

    ldd libQt5Gui.so.5.14.0
    # this message about the version not found is bad:
    ./libQt5Gui.so.5.14.0: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.14' not found (required by ./libQt5Gui.so.5.14.0)
    	linux-vdso.so.1 (0x00007ffe7e3e5000)
    	libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f30cdac6000)
    	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f30cd8a7000)
    
    

    bad outcome #2 ("not found"):

    ldd libQt5Gui.so.5.14.0
    	linux-vdso.so.1 (0x00007ffc16ba5000)
    	libQt5Core.so.5 => not found                  # <-- anything "not found" is a problem
    	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f624ce6a000)
    	libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f624cbde000)
    	libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f624c940000)
    
    

    (Note: I ran ldd on libQt5Gui only for the sake of generating sample output. I am not suggesting you ldd libQt5Gui, but rather that you ldd libxcb.so )

    Regarding your results from the direct attack on configure failures:

    + /usr/bin/pkg-config --exists --silence-errors xkbcommon '>=' 0.5.0
    pkg-config did not find package.
    

    You could run /usr/bin/pkg-config --libs xkbcommon and see what you get.

    You could also run apt-cache show libxkbcommon-dev and make sure the version is greater than 0.5.0

    Racking my brain trying to think what else...

    I guess just make sure any "left over cruft" from previous configure attempts are interfering... (but I could not enumerate what kinds of cruft you should be looking for).

    www.219design.com
    Software | Electrical | Mechanical | Product Design

    1 Reply Last reply
    0
    • Tom assoT Offline
      Tom assoT Offline
      Tom asso
      wrote on last edited by Tom asso
      #20

      Running pkg-config from the command line:

      % /usr/bin/pkg-config --libs xkbcommon
      -lxkbcommon
      

      And "apt-cache show libxkbcommon-dev" shows version 0.8.0-1.
      Thanks for all your help @KH-219Design !
      I've been evaluating Qt for a seafloor-mapping project for a few months now - Qt has its share of bugs, there are many many moving pieces to it, many of those pieces barely documented or not documented at all - a very steep learning curve, at least for me. I'm grateful that you and others in the community provide invaluable help!

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

        What Ubuntu version are you running ?

        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
        • KH-219DesignK Offline
          KH-219DesignK Offline
          KH-219Design
          wrote on last edited by
          #22

          @Tom-asso said in Definitive guide to building source from downloaded .run file?:

          xkbcommon.h not found in [] and global paths

          I'm reading through this right now... seems like the same "xkbcommon" problem: https://forum.qt.io/topic/100908/qt-5-12-2-raspberry-pi-x11/16

          www.219design.com
          Software | Electrical | Mechanical | Product Design

          KH-219DesignK 1 Reply Last reply
          1
          • KH-219DesignK KH-219Design

            @Tom-asso said in Definitive guide to building source from downloaded .run file?:

            xkbcommon.h not found in [] and global paths

            I'm reading through this right now... seems like the same "xkbcommon" problem: https://forum.qt.io/topic/100908/qt-5-12-2-raspberry-pi-x11/16

            KH-219DesignK Offline
            KH-219DesignK Offline
            KH-219Design
            wrote on last edited by
            #23

            @KH-219Design said in Definitive guide to building source from downloaded .run file?:

            seems like the same "xkbcommon" problem: https://forum.qt.io/topic/100908/qt-5-12-2-raspberry-pi-x11/16

            Maybe I spoke too soon. Although the same error is mentioned, that thread seems entirely RPi specific in the end. Arggg...

            www.219design.com
            Software | Electrical | Mechanical | Product Design

            1 Reply Last reply
            1
            • KH-219DesignK Offline
              KH-219DesignK Offline
              KH-219Design
              wrote on last edited by
              #24

              I also found this: https://github.com/RudolfCardinal/camcops/issues/3

              ... which seems to circle back to:

              sudo sed -i -- 's/#deb-src/deb-src/g' /etc/apt/sources.list
              sudo sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list
              sudo apt-get update
              
              sudo apt-get build-dep qt5-default
              

              Has that been tried yet? I've lost track :)

              www.219design.com
              Software | Electrical | Mechanical | Product Design

              1 Reply Last reply
              1
              • Tom assoT Offline
                Tom assoT Offline
                Tom asso
                wrote on last edited by
                #25

                @SGaist - I am running Ubuntu 18.04.4

                1 Reply Last reply
                0
                • Tom assoT Offline
                  Tom assoT Offline
                  Tom asso
                  wrote on last edited by
                  #26

                  Thanks @KH-219Design - I haven't tried the "sed" yet - what exactly will those commands do?

                  sudo sed -i -- 's/#deb-src/deb-src/g' /etc/apt/sources.list
                  sudo sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list
                  sudo apt-get update
                  
                  sudo apt-get build-dep qt5-default
                  
                  1 Reply Last reply
                  0
                  • KH-219DesignK Offline
                    KH-219DesignK Offline
                    KH-219Design
                    wrote on last edited by
                    #27

                    @Tom-asso said in Definitive guide to building source from downloaded .run file?:

                    I haven't tried the "sed" yet - what exactly will those commands do?

                    The sed commands are to work around:

                    E: You must put some 'source' URIs in your sources.list
                    

                    Described here: https://wiki.qt.io/Building_Qt_5_from_Git#Linux.2FX11

                    www.219design.com
                    Software | Electrical | Mechanical | Product Design

                    1 Reply Last reply
                    0
                    • Tom assoT Offline
                      Tom assoT Offline
                      Tom asso
                      wrote on last edited by
                      #28

                      I'm reluctant to install the ubuntu qt5-default at this point - in the past I've run into problems when mixing ubuntu qt-related packages with source/software downloaded from download.qt.io. And I don't think I've actually seen the message "E: You must put some 'source' URIs in your sources.list".

                      1 Reply Last reply
                      0
                      • KH-219DesignK Offline
                        KH-219DesignK Offline
                        KH-219Design
                        wrote on last edited by
                        #29

                        Ah. I totally understand your concern about mixing and matching the "Ubuntu system Qt5" with the one that you built.

                        But not to fear! The command suggested by me (and several wiki pages, and on that github issue I linked to this morning) is not for installing the Qt5 system binary libraries!

                        The command is to install BUILD dependencies:

                        sudo apt-get build-dep qt5-default
                        

                        Note the: build-dep

                        https://askubuntu.com/questions/324845/whats-the-difference-between-apt-get-install-and-apt-get-build-dep

                        www.219design.com
                        Software | Electrical | Mechanical | Product Design

                        1 Reply Last reply
                        1
                        • KH-219DesignK Offline
                          KH-219DesignK Offline
                          KH-219Design
                          wrote on last edited by
                          #30

                          Wow. An eerily similar discussion is going on simultaneously: https://forum.qt.io/topic/114826/static-build-qt-getting-error-because-of-xcb/6

                          Maybe there is something broken with configure of 5.14.2.

                          The last time I successfully built from source was 5.14.0, so I wonder...

                          (If I have time later today or tomorrow, perhaps I will try with 14.2)

                          www.219design.com
                          Software | Electrical | Mechanical | Product Design

                          1 Reply Last reply
                          1
                          • Tom assoT Offline
                            Tom assoT Offline
                            Tom asso
                            wrote on last edited by
                            #31
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • Tom assoT Offline
                              Tom assoT Offline
                              Tom asso
                              wrote on last edited by
                              #32

                              Hmm... I'm stuck in a place with really slow bandwidth, but I'll try to get qt-everywhere-src-5.14.0.tar.xz and build.
                              @KH-219Design - did you build 5.14.0 on ubuntu? What version, and how did it go?

                              1 Reply Last reply
                              0
                              • KH-219DesignK Offline
                                KH-219DesignK Offline
                                KH-219Design
                                wrote on last edited by
                                #33

                                @Tom-asso said in Definitive guide to building source from downloaded .run file?:

                                did you build 5.14.0 on ubuntu? What version, and how did it go?

                                I built in on both Ubuntu 18.04 and 16.04 and it went perfectly well. But I cloned the sources from code.qt.io and used the script I linked to earlier: https://github.com/219-design/build_qt_binaries/blob/09ad9369c8abfead615075f067f402fd89f/script.sh

                                www.219design.com
                                Software | Electrical | Mechanical | Product Design

                                1 Reply Last reply
                                1
                                • Tom assoT Offline
                                  Tom assoT Offline
                                  Tom asso
                                  wrote on last edited by
                                  #34

                                  @KH-219Design said in Definitive guide to building source from downloaded .run file?:

                                  sudo sed -i -- 's/#deb-src/deb-src/g' /etc/apt/sources.list
                                  sudo sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list
                                  sudo apt-get update

                                  sudo apt-get build-dep qt5-default

                                  I ran those commands. apt-get build-dep qt5-default said:

                                  The following NEW packages will be installed:
                                    debhelper dh-autoreconf dh-strip-nondeterminism freetds-common freetds-dev
                                    gir1.2-gtk-2.0 libasound2-dev libatk1.0-dev libatspi2.0-dev
                                    libcairo-script-interpreter2 libcairo2-dev libct4 libcups2-dev
                                    libcupsimage2-dev libevdev-dev libfile-stripnondeterminism-perl libgbm-dev
                                    libgdk-pixbuf2.0-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
                                    libgtk2.0-dev libinput-dev libmtdev-dev liborc-0.4-dev liborc-0.4-dev-bin
                                    libpango1.0-dev libpixman-1-dev libproxy-dev libpulse-dev libsybdb5
                                    libudev-dev libwacom-dev libxcb-icccm4-dev libxcb-image0-dev
                                    libxcb-keysyms1-dev libxcb-render-util0-dev libxcb-shm0-dev libxcb-xkb-dev
                                    libxcomposite-dev libxcursor-dev libxi-dev libxinerama-dev
                                    libxkbcommon-x11-dev libxml2-utils libxtst-dev pkg-kde-tools po-debconf
                                    x11proto-composite-dev x11proto-record-dev x11proto-xinerama-dev xvfb
                                  

                                  So it wants to install libxkbcommon-11-dev, among other things. I let it run, then again tried to configure the build:

                                  ./configure -qt-xcb
                                  [...]
                                  ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && features.xkbcommon && libs.xcb' failed.
                                  

                                  And config.log still contains this:

                                  loaded result for library config.qtbase_gui.libraries.xkbcommon
                                  Trying source 0 (type pkgConfig) of library xkbcommon ...
                                  + /usr/bin/pkg-config --exists --silence-errors xkbcommon '>=' 0.5.0
                                  pkg-config did not find package.
                                  
                                  1 Reply Last reply
                                  0
                                  • Tom assoT Offline
                                    Tom assoT Offline
                                    Tom asso
                                    wrote on last edited by Tom asso
                                    #35

                                    I downloaded and extracted qt-everywhere-src-5.14.0.tar.xz, ran './configure -qt-xcb' without error, built and installed it. My qtdatavisualization3d app links successfully and runs. Likewise with qt-everywhere-src-5.14.1.tar.xz. HOWEVER my app runs extremely and unacceptably slowly with 5.14.0 and 5.14.1, so this does NOT solve my problem. But this result indicates there's a problem in configuration scripts for 5.14.2. @SGaist , how do we make this problem known to the Qt team?

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

                                      Check the bug report system.

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

                                      1 Reply Last reply
                                      1
                                      • Tom assoT Offline
                                        Tom assoT Offline
                                        Tom asso
                                        wrote on last edited by Tom asso
                                        #37

                                        Many thanks to all for your help in solving this problem for me!

                                        The following procedure to build Qt from the "offline installer" .run file,
                                        e.g. qt-opensource-linux-x64-5.14.2.run, works for me on ubuntu 18.04.4:

                                        1. Download .run file from "official release" site
                                        2. Execute the .run file downloaded in the previous step and answer questions prompted by the "wizard"
                                        3. Do the following:
                                        % cd <QtHome>/5.14.2/Src
                                        % ./configure -qt-xcb   # I want to build Qt's xcb sources
                                        % make
                                        % make install  # Installs into /usr/local/Qt5.14.2 by default
                                        

                                        To build Qt applications using those sources and libraries do the following:

                                        % export PATH=/usr/local/Qt5.14.2/bin:$PATH
                                        % export LD_LIBRARY_PATH=/usr/local/Qt5.14.2/lib:$LD_LIBRARY_PATH
                                        

                                        Setting PATH like this ensures that the qmake executable is properly associated with the headers and libraries you installed in /usr/local/Qt5.14.2.

                                        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