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.4k 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.
  • KroMignonK KroMignon

    @SPlatten Are you targetting Windows?

    Then take a look at this old post https://forum.qt.io/post/268631

    SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #4

    @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?

    Kind Regards,
    Sy

    KroMignonK 1 Reply Last reply
    0
    • SPlattenS SPlatten

      @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?

      KroMignonK Offline
      KroMignonK Offline
      KroMignon
      wrote on 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)

      SPlattenS 2 Replies Last reply
      2
      • KroMignonK KroMignon

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

        ./configure -platform linux-g++-32
        
        SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on 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
        • KH-219DesignK Offline
          KH-219DesignK Offline
          KH-219Design
          wrote on 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
          • KroMignonK KroMignon

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

            ./configure -platform linux-g++-32
            
            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by SPlatten
            #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

            jsulmJ KroMignonK 2 Replies Last reply
            0
            • SPlattenS SPlatten

              @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
              
              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on 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
              • SPlattenS SPlatten

                @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
                
                KroMignonK Offline
                KroMignonK Offline
                KroMignon
                wrote on 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)

                SPlattenS 1 Reply Last reply
                3
                • KroMignonK KroMignon

                  @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
                  
                  SPlattenS Offline
                  SPlattenS Offline
                  SPlatten
                  wrote on last edited by
                  #11

                  @KroMignon , thank you.

                  Kind Regards,
                  Sy

                  1 Reply Last reply
                  0
                  • SPlattenS Offline
                    SPlattenS Offline
                    SPlatten
                    wrote on 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

                    jsulmJ 1 Reply Last reply
                    0
                    • SPlattenS SPlatten

                      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.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 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

                      SPlattenS 1 Reply Last reply
                      2
                      • jsulmJ jsulm

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

                        SPlattenS Offline
                        SPlattenS Offline
                        SPlatten
                        wrote on 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

                        • Login

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