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. How to build Qt from sources and get binaries like in maintenance tool

How to build Qt from sources and get binaries like in maintenance tool

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 2 Posters 1.3k 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.
  • E Offline
    E Offline
    Eligijus
    wrote on last edited by
    #1

    Hello,
    I want to build Qt from sources on linux unbuntu 16.04 and get binaries that behave same as the one's that come from maintenance tool(Qt 5.8 Desktop gcc 64-bit) and is located in home/user/Qt/5.8/gcc_64 . When I build binaries myself and set kit, compiler, debugger I get errors that It can't find files in system folders.
    If I understand correctly I should run cofigure with settings like these:
    -prefix <dir>
    -extprefix <dir>
    -hostprefix [dir]
    -external-hostbindir <path>
    -sysroot <dir>
    But I don't know which one to choose.

    jsulmJ 1 Reply Last reply
    0
    • E Offline
      E Offline
      Eligijus
      wrote on last edited by
      #5

      Figured it out. Maybe someone will find what I did useful:

      1. Downloaded sources from Qt maintenance tool.
      2. Created directory i.e. /home/user/t_build .
      3. Ran configure script from downloaded sources folder (/home/user/Qt/5.8/Src) with prefix option where I want binaries installed /home/user/Qt/Src/configure -prefix /home/user/Qt/5.8/gcc_64. Running configure script from another folder is called shadow build and doesn't mix binaries with sources.
      4. Ran make in shadow build folder and then make install which installed binaries to /home/user/Qt/5.8/gcc_64 and I could compile project with my modifications to Qt code.

      But I still have no clue what -extprefix <dir> is used for.

      1 Reply Last reply
      0
      • E Eligijus

        Hello,
        I want to build Qt from sources on linux unbuntu 16.04 and get binaries that behave same as the one's that come from maintenance tool(Qt 5.8 Desktop gcc 64-bit) and is located in home/user/Qt/5.8/gcc_64 . When I build binaries myself and set kit, compiler, debugger I get errors that It can't find files in system folders.
        If I understand correctly I should run cofigure with settings like these:
        -prefix <dir>
        -extprefix <dir>
        -hostprefix [dir]
        -external-hostbindir <path>
        -sysroot <dir>
        But I don't know which one to choose.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @Eligijus said in How to build Qt from sources and get binaries like in maintenance tool:

        -hostprefix [dir]
        -external-hostbindir <path>
        -sysroot <dir>

        You don't need these if you don't do cross-compilation

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • E Offline
          E Offline
          Eligijus
          wrote on last edited by
          #3

          @jsulm Alright then what would be the difference between
          -prefix <dir>
          -extprefix <dir>
          and which one should I use?

          jsulmJ 1 Reply Last reply
          0
          • E Eligijus

            @jsulm Alright then what would be the difference between
            -prefix <dir>
            -extprefix <dir>
            and which one should I use?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @Eligijus call configure with -h parameter then you will see:
            "-prefix <dir> ...... The deployment directory, as seen on the target device.
            [/usr/local/Qt-$QT_VERSION, $PWD if -developer-build]
            -extprefix <dir> ... The installation directory, as seen on the host machine.
            [SYSROOT/PREFIX]"

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • E Offline
              E Offline
              Eligijus
              wrote on last edited by
              #5

              Figured it out. Maybe someone will find what I did useful:

              1. Downloaded sources from Qt maintenance tool.
              2. Created directory i.e. /home/user/t_build .
              3. Ran configure script from downloaded sources folder (/home/user/Qt/5.8/Src) with prefix option where I want binaries installed /home/user/Qt/Src/configure -prefix /home/user/Qt/5.8/gcc_64. Running configure script from another folder is called shadow build and doesn't mix binaries with sources.
              4. Ran make in shadow build folder and then make install which installed binaries to /home/user/Qt/5.8/gcc_64 and I could compile project with my modifications to Qt code.

              But I still have no clue what -extprefix <dir> is used for.

              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