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. How to build Qt 4.8.4 from source for 64bit or 32bit targets
Forum Updated to NodeBB v4.3 + New Features

How to build Qt 4.8.4 from source for 64bit or 32bit targets

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 4 Posters 3.2k 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.
  • S SPlatten
    3 May 2022, 15:41

    @KroMignon , when building using:

    ./configure

    I see the build uses g++ with -m64, is there a way to get it to build for a 32bit target?

    K Offline
    K Offline
    KroMignon
    wrote on 3 May 2022, 15:45 last edited by
    #5

    @SPlatten according to post https://forum.qt.io/post/521682, this should do the job:

    ./configure -platform linux-g++-32
    

    It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

    S 2 Replies Last reply 3 May 2022, 15:48
    2
    • K KroMignon
      3 May 2022, 15:45

      @SPlatten according to post https://forum.qt.io/post/521682, this should do the job:

      ./configure -platform linux-g++-32
      
      S Offline
      S Offline
      SPlatten
      wrote on 3 May 2022, 15:48 last edited by
      #6

      @KroMignon said in How to build Qt 4.8.4 from source for 64bit or 32bit targets:

      ./configure -platform linux-g++-32

      Thank you, will give it a go.

      Kind Regards,
      Sy

      1 Reply Last reply
      0
      • K Offline
        K Offline
        KH-219Design
        wrote on 3 May 2022, 19:53 last edited by
        #7

        Last year I had to cross-compile Qt 4 (in my case: Qt 4.4) for a number (4+) of different embedded targets. The compilers that were available to me for each platform each had their own quirks. Sometimes simply invoking the compiler from its full, absolute path was enough to make everything build and link, and other times it was necessary to explicitly manipulate some environment variables, to source some provided bash files, and to discern some specific compiler flags to add to the command line.

        Two of the scripts that I ended up with are public on github.

        To be clear, I am not suggesting that these will work verbatim for your case. Certainly they will not. But skimming them might give you inspiration or clues for any issues you run into with this Gentoo/Finx platform.

        • https://github.com/219-design/build_qt4_binaries_armv5tejl_sbc6000x/blob/main/make_framework_qt-x11-4.4.3_embedded_arm_6000x.sh
        • https://github.com/219-design/build_qt4_binaries_armv7at2hf_angstrom_imx6ull/blob/main/make_framework_qt-x11-4.4.3_embedded_colibri-imx6ull.sh

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

        1 Reply Last reply
        1
        • K KroMignon
          3 May 2022, 15:45

          @SPlatten according to post https://forum.qt.io/post/521682, this should do the job:

          ./configure -platform linux-g++-32
          
          S Offline
          S Offline
          SPlatten
          wrote on 4 May 2022, 06:26 last edited by SPlatten 5 Apr 2022, 06:37
          #8

          @KroMignon , built thank you, when using:

          sudo su
          gmake install
          

          Where does this install the binaries too?

          [Edit] Strange location but it seems to be installing everything in:

          /usr/local/Trolltech/Qt-4.8.4
          

          Kind Regards,
          Sy

          J K 2 Replies Last reply 4 May 2022, 07:03
          0
          • S SPlatten
            4 May 2022, 06:26

            @KroMignon , built thank you, when using:

            sudo su
            gmake install
            

            Where does this install the binaries too?

            [Edit] Strange location but it seems to be installing everything in:

            /usr/local/Trolltech/Qt-4.8.4
            
            J Online
            J Online
            jsulm
            Lifetime Qt Champion
            wrote on 4 May 2022, 07:03 last edited by
            #9

            @SPlatten said in How to build Qt 4.8.4 from source for 64bit or 32bit targets:

            Where does this install the binaries too?

            You can specify where to install when you call configure (don't remember exact parameter, -prefix probably).

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

            1 Reply Last reply
            0
            • S SPlatten
              4 May 2022, 06:26

              @KroMignon , built thank you, when using:

              sudo su
              gmake install
              

              Where does this install the binaries too?

              [Edit] Strange location but it seems to be installing everything in:

              /usr/local/Trolltech/Qt-4.8.4
              
              K Offline
              K Offline
              KroMignon
              wrote on 4 May 2022, 07:39 last edited by
              #10

              @SPlatten said in How to build Qt 4.8.4 from source for 64bit or 32bit targets:

              Where does this install the binaries too?

              you can specify many things with configure (cf. https://www.linuxfromscratch.org/blfs/view/7.9/x/qt4.html).
              This should work for you:

              ./configure -platform linux-g++-32 -prefix /opt/qt4.8
              

              It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

              S 1 Reply Last reply 4 May 2022, 13:57
              3
              • K KroMignon
                4 May 2022, 07:39

                @SPlatten said in How to build Qt 4.8.4 from source for 64bit or 32bit targets:

                Where does this install the binaries too?

                you can specify many things with configure (cf. https://www.linuxfromscratch.org/blfs/view/7.9/x/qt4.html).
                This should work for you:

                ./configure -platform linux-g++-32 -prefix /opt/qt4.8
                
                S Offline
                S Offline
                SPlatten
                wrote on 4 May 2022, 13:57 last edited by
                #11

                @KroMignon , thank you.

                Kind Regards,
                Sy

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SPlatten
                  wrote on 5 May 2022, 12:01 last edited by
                  #12

                  Another important step to include if like me you built 64 bit first then 32bit....remember to insert a call to:

                  make clean
                  

                  Before the next configure or you will end up with architecture errors.

                  Kind Regards,
                  Sy

                  J 1 Reply Last reply 5 May 2022, 12:48
                  0
                  • S SPlatten
                    5 May 2022, 12:01

                    Another important step to include if like me you built 64 bit first then 32bit....remember to insert a call to:

                    make clean
                    

                    Before the next configure or you will end up with architecture errors.

                    J Online
                    J Online
                    jsulm
                    Lifetime Qt Champion
                    wrote on 5 May 2022, 12:48 last edited by
                    #13

                    @SPlatten That is why you should do out of source builds

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

                    S 1 Reply Last reply 5 May 2022, 12:52
                    2
                    • J jsulm
                      5 May 2022, 12:48

                      @SPlatten That is why you should do out of source builds

                      S Offline
                      S Offline
                      SPlatten
                      wrote on 5 May 2022, 12:52 last edited by
                      #14

                      @jsulm for those that haven't heard this term:
                      https://cgold.readthedocs.io/en/latest/tutorials/out-of-source.html

                      Kind Regards,
                      Sy

                      1 Reply Last reply
                      1

                      14/14

                      5 May 2022, 12:52

                      • Login

                      • Login or register to search.
                      14 out of 14
                      • First post
                        14/14
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved