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. Cross-compile from ubuntu16.04 64bit host to a ubuntu 16.04 32bit target device.
QtWS25 Last Chance

Cross-compile from ubuntu16.04 64bit host to a ubuntu 16.04 32bit target device.

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
8 Posts 2 Posters 3.9k 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
    bask185
    wrote on 12 May 2017, 07:42 last edited by bask185 5 Dec 2017, 07:43
    #1

    My finished Qt application is working and can be used on our smaller machinery. It will take some time before we implement my Raspberry Pi solution. But our Chinese colleagues are currently also producing some machines which could run with my application.

    The point is that at the moment we need to buy 90 bucks windows licenses, so I was given the task of 'solving' that problem. And I outfitted one of the Chinese panel PCs with the 32bit Ubuntu 16.04 distro and I got that troublesome touchscreen to work.

    I have been building executables for the raspberry so long now that I don't know which compiler settings I should set up on Qt Creator on my 64bit computer. So I can compile for the panel PC instead of for the Raspberry.

    And what do I need to do on the panel PC? do I only need to sudo apt-get install Qt5-default???

    J 1 Reply Last reply 12 May 2017, 08:26
    0
    • B bask185
      12 May 2017, 07:42

      My finished Qt application is working and can be used on our smaller machinery. It will take some time before we implement my Raspberry Pi solution. But our Chinese colleagues are currently also producing some machines which could run with my application.

      The point is that at the moment we need to buy 90 bucks windows licenses, so I was given the task of 'solving' that problem. And I outfitted one of the Chinese panel PCs with the 32bit Ubuntu 16.04 distro and I got that troublesome touchscreen to work.

      I have been building executables for the raspberry so long now that I don't know which compiler settings I should set up on Qt Creator on my 64bit computer. So I can compile for the panel PC instead of for the Raspberry.

      And what do I need to do on the panel PC? do I only need to sudo apt-get install Qt5-default???

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 12 May 2017, 08:26 last edited by
      #2

      @bask185 As always you need:

      • compiler generating x86 32 bit binaries
      • all needed libraries as 32 bit
      • Qt 32 bit

      In Ubuntu you can install this stuff this way (g++ as example):

      apt-get install g++:i386
      

      When you installed all this then set up a kit in QtCreator with 32 bit g++ and 32 bit Qt.

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

      1 Reply Last reply
      1
      • B Offline
        B Offline
        bask185
        wrote on 12 May 2017, 09:08 last edited by
        #3

        @jsulm said in Cross-compile from ubuntu16.04 64bit host to a ubuntu 16.04 32bit target device.:

        apt-get install g++:i386

        Thanks for you reply
        
        user@user:~$ sudo apt-get install g++:i386
        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        Some packages could not be installed. This may mean that you have
        requested an impossible situation or if you are using the unstable
        distribution that some required packages have not yet been created
        or been moved out of Incoming.
        The following information may help to resolve the situation:
        
        The following packages have unmet dependencies:
         g++:i386 : Depends: cpp:i386 (>= 4:5.3.1-1ubuntu1) but it is not going to be installed
                    Depends: gcc:i386 (>= 4:5.3.1-1ubuntu1) but it is not going to be installed
                    Depends: g++-5:i386 (>= 5.3.1-3~) but it is not going to be installed
                    Depends: gcc-5:i386 (>= 5.3.1-3~) but it is not going to be installed
        E: Unable to correct problems, you have held broken packages.
        
        

        I vaguely recall once having installed 32bit stuffs
        I do see 32 bit compilers but I see an error.

        I'll show some screenshots of my compiler settings
        alt text
        alt text
        alt text

        I am pretty sure I have selected the wrong Qt version, I need to add a new one but I don't know where to look for, in the subfolder Qt 5.7 I only see gcc_64 folder. And I get a similar error in the kits tab, the compiler can't produce code for the selected Qt version.

        Besides configuring the kit properly, what exactly must I install on the target device? so far I only apt-get installed qt5-default

        J 1 Reply Last reply 12 May 2017, 09:11
        0
        • B bask185
          12 May 2017, 09:08

          @jsulm said in Cross-compile from ubuntu16.04 64bit host to a ubuntu 16.04 32bit target device.:

          apt-get install g++:i386

          Thanks for you reply
          
          user@user:~$ sudo apt-get install g++:i386
          Reading package lists... Done
          Building dependency tree       
          Reading state information... Done
          Some packages could not be installed. This may mean that you have
          requested an impossible situation or if you are using the unstable
          distribution that some required packages have not yet been created
          or been moved out of Incoming.
          The following information may help to resolve the situation:
          
          The following packages have unmet dependencies:
           g++:i386 : Depends: cpp:i386 (>= 4:5.3.1-1ubuntu1) but it is not going to be installed
                      Depends: gcc:i386 (>= 4:5.3.1-1ubuntu1) but it is not going to be installed
                      Depends: g++-5:i386 (>= 5.3.1-3~) but it is not going to be installed
                      Depends: gcc-5:i386 (>= 5.3.1-3~) but it is not going to be installed
          E: Unable to correct problems, you have held broken packages.
          
          

          I vaguely recall once having installed 32bit stuffs
          I do see 32 bit compilers but I see an error.

          I'll show some screenshots of my compiler settings
          alt text
          alt text
          alt text

          I am pretty sure I have selected the wrong Qt version, I need to add a new one but I don't know where to look for, in the subfolder Qt 5.7 I only see gcc_64 folder. And I get a similar error in the kits tab, the compiler can't produce code for the selected Qt version.

          Besides configuring the kit properly, what exactly must I install on the target device? so far I only apt-get installed qt5-default

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 12 May 2017, 09:11 last edited by
          #4

          @bask185 You need to install 32bit Qt version. Qt project does not provide 32bit builds for Linux anymore. Either install it from Ubuntu repository or build it by yourself.

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

          B 1 Reply Last reply 12 May 2017, 09:18
          0
          • J jsulm
            12 May 2017, 09:11

            @bask185 You need to install 32bit Qt version. Qt project does not provide 32bit builds for Linux anymore. Either install it from Ubuntu repository or build it by yourself.

            B Offline
            B Offline
            bask185
            wrote on 12 May 2017, 09:18 last edited by
            #5

            @jsulm
            Mate I really have no clue where I can find this.
            I am looking here:
            https://download.qt.io/archive/qt/5.7/5.7.0/
            But I cannot tell what I should or should not download

            I already spend a good minutes in the apt-cache search qt list to find something, but I cannot find it

            J 1 Reply Last reply 12 May 2017, 09:20
            0
            • B bask185
              12 May 2017, 09:18

              @jsulm
              Mate I really have no clue where I can find this.
              I am looking here:
              https://download.qt.io/archive/qt/5.7/5.7.0/
              But I cannot tell what I should or should not download

              I already spend a good minutes in the apt-cache search qt list to find something, but I cannot find it

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 12 May 2017, 09:20 last edited by
              #6

              @bask185 I said above that Qt does not provide 32bit binaries for Linux anymore - no need to search for it.
              Look for qt*:i386 packages in Ubuntu.

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

              1 Reply Last reply
              0
              • B Offline
                B Offline
                bask185
                wrote on 12 May 2017, 09:27 last edited by bask185 5 Dec 2017, 09:49
                #7

                I found these two in the cache.
                libc6-dev-i386 - GNU C Library: 32-bit development libraries for AMD64
                libc6-i386 - GNU C Library: 32-bit shared libraries for AMD64

                and from: https://www.qt.io/download-open-source/#section-2
                I can download "Qt Online Installer for Linux 32-bit", the descreption above it says:
                "Qt online installer is a small executable which downloads content over internet based on your selections. It provides binary and source packages for different Qt library versions and latest Qt Creator."
                Except for the Qt Creator part, this seems good?

                EDIT:
                I found a 3YO qt topic which mentioned these packages
                libsm6:i386
                libxrender1:i386
                libfontconfig1:i386
                libxext6:i386
                libgtk2.0-0:i386
                libcanberra-gtk-module:i386
                libxslt1.1:i386
                libglu1-mesa-dev:i386
                libc6-i386
                libglib2.0-0:i386
                libsm6:i386
                libglu1-mesa:i386
                libgl1-mesa-glx:i386
                libxext6:i386
                libxrender1:i386
                libx11-6:i386
                libfontconfig1:i386
                lsb-core
                g++-multilib \

                I am installing all of these atm, some I reckognize and I know I already have some of them

                J 1 Reply Last reply 12 May 2017, 11:25
                0
                • B bask185
                  12 May 2017, 09:27

                  I found these two in the cache.
                  libc6-dev-i386 - GNU C Library: 32-bit development libraries for AMD64
                  libc6-i386 - GNU C Library: 32-bit shared libraries for AMD64

                  and from: https://www.qt.io/download-open-source/#section-2
                  I can download "Qt Online Installer for Linux 32-bit", the descreption above it says:
                  "Qt online installer is a small executable which downloads content over internet based on your selections. It provides binary and source packages for different Qt library versions and latest Qt Creator."
                  Except for the Qt Creator part, this seems good?

                  EDIT:
                  I found a 3YO qt topic which mentioned these packages
                  libsm6:i386
                  libxrender1:i386
                  libfontconfig1:i386
                  libxext6:i386
                  libgtk2.0-0:i386
                  libcanberra-gtk-module:i386
                  libxslt1.1:i386
                  libglu1-mesa-dev:i386
                  libc6-i386
                  libglib2.0-0:i386
                  libsm6:i386
                  libglu1-mesa:i386
                  libgl1-mesa-glx:i386
                  libxext6:i386
                  libxrender1:i386
                  libx11-6:i386
                  libfontconfig1:i386
                  lsb-core
                  g++-multilib \

                  I am installing all of these atm, some I reckognize and I know I already have some of them

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 12 May 2017, 11:25 last edited by
                  #8

                  @bask185 I don't think you will be able to install 32 bit Qt using this 32 bit installer as Qt Project does not provide 32bit Linux binaries any-more. But you can try.

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

                  1 Reply Last reply
                  0

                  1/8

                  12 May 2017, 07:42

                  • Login

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