Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Possible Bug In QMake
Qt 6.11 is out! See what's new in the release blog

Possible Bug In QMake

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 1.7k Views 1 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.
  • J Offline
    J Offline
    JustSpiffy
    wrote on last edited by
    #1

    All I am trying to compile a 32 bit application in a 64 bit environment, however QT is forcing the use of the 64 bit libraries during linking time. I am positive I have the 32 bit libraries, and I am using the QMAKESPEC=linux-g++-32. Could anyone offer any advice?

    System Information:
    QT 4.8
    qmake 2.01a
    Ubuntu 13.04
    g++ 4.7.3

    Installed Libraries:

    • ia32-libs
    • lib32stdc++6
    • g++-multilib
    • /usr/lib/i386-linux-gnu contains all Qt Libraries (QtCore, QtGui ... etc)

    Commands:
    @export QMAKESPEC=linux-g++-32
    qmake myproject.pro
    make@

    Then (Notice the wrong directory):
    @g++ -m32 -Wl,-O1 -o output [redacted.o] -L/[some_lib_dir] -L/usr/lib/x86_64-linux-gnu -lQtCore -lpthread@

    I believe that Qmake is using QT_INSTALL_LIBS, since

    @qmake -query QT_INSTALL_LIBS@

    returns /usr/lib/x86_64-linux-gnu

    @qmake -set QT_INSTALL_LIBS /usr/lib/i386-linux-gnu@

    won't over write it though!

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

      Hi and welcome to devnet,

      Since you have both installed, you should call the 32 bit Qt qmake. It should be something like:

      @/usr/lib/i386-linux-gnu/qt4/bin/qmake@

      And you should be good to go

      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
      • J Offline
        J Offline
        JustSpiffy
        wrote on last edited by
        #3

        Hey SGaist thank you for the response.

        I thought that might be the situation but I couldn't find another qmake binary. Perhaps I'm missing a package? Any suggestions? I'll look more Monday.

        Also I still want to point out that this shouldn't be the fix if we're using qmakespec files (which I think are similar to cmake toolchain files). In other words qmake should take its directories from the qmake spec file.

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

          Look for qt4-qmake for i386

          IIRC, the difference between the two mkspecs are essentially build flags not paths (some of them are hard-coded in qmake).

          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
          • J Offline
            J Offline
            JustSpiffy
            wrote on last edited by
            #5

            That package does not exist in my repos, I'll see if I can find a ppa

            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