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. How to force 32bit target compiling & linking on 64bit platform (64bit Ubuntu 10.10 / Qt 4.7.0 / QtCreator 2.0.1)

How to force 32bit target compiling & linking on 64bit platform (64bit Ubuntu 10.10 / Qt 4.7.0 / QtCreator 2.0.1)

Scheduled Pinned Locked Moved Qt Creator and other tools
28 Posts 4 Posters 49.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.
  • A Offline
    A Offline
    apclinux
    wrote on 9 Feb 2011, 11:13 last edited by
    #1

    Hello,
    currently developping a PXA300 Qt-embedded target application, I try to develop and test the UIM part in 32bit x86 native platform or 64bit x86 development platform with the qvfb facility.
    Working on an quite old 32bit Linux Fedora 8 platform is ok.
    Trying to work on an up-to-date 64bit Linux Ubuntu 10.10 platform gives me some surprises/difficulties:
    as my source code is not completely (at this point) 32 to 64 bit fully compatible (some compiling errors on a few type-casting
    relative to 32/64bit formats depending on standard C/C++ integer types...), I'm trying to force GCC to generate 32bit code,
    but I don't know how to make the "qmake" process to force the "-m32" GCC flag (both for compiling and linking).
    My question doesn't apply only on the "qmake" procedure but on "Qt Creator" because my project was created with Qt Creator
    and I don't use / invoke directly qmake by myself...
    So my question is :
    how to force GCC with the -m32 (only for one given project) ? Is it to be set with a specific flag/variable in my ".pro" application
    project file ?
    Thanks a lot in advance for any help/suggestion.
    Kind regards.
    Alain-Pierre

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on 9 Feb 2011, 11:21 last edited by
      #2

      In Creator, go to the project view / build settings. There you have a section for the build stops, expand the qmake line and add to the additional arguments:

      @
      -spec linux-g++-32
      @

      You must add it to the debug and release settings separately.

      This forces qmake to use the 32bit settings by adding -m32 to the CFLAGS and LDFLAGS.

      If you call qmake on the command line, just add the arguments above.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • A Offline
        A Offline
        apclinux
        wrote on 9 Feb 2011, 13:24 last edited by
        #3

        Thanks Volker, I applied the "-spec linux-g++-32" setting and my application is now compiling ok.
        Unfortunately, it is now failing at linking with errors relative to incompatibilities with some Qt libraries (QtGui, QtCore) and other usual libraries like "libpthread", "libstdc++", "libm" and "libc" !?

        =>

        /usr/bin/ld: skipping incompatible /usr/lib/libQtGui.so when searching for -lQtGui
        /usr/bin/ld: skipping incompatible /usr/lib/libQtCore.so when searching for -lQtCore
        /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
        /usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
        /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.so when searching for -lstdc++
        /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.a when searching for -lstdc++
        /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.so when searching for -lstdc++
        /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.a when searching for -lstdc++
        /usr/bin/ld: cannot find -lstdc++
        /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
        /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
        /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
        /usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
        collect2: ld returned 1 exit status

        What shall I do to solve what seems to be (very logically) a 64bit library format vs expected 32bit library format "collision" relating to having forcing GCC with the "-m32" parameter flag ?
        How to indicate/force the proper 32bit format and version of Qt library files (as other libraries,
        naturally, for same reasons...) ?

        Also, about the "-spec linux-g++-32" option, where was I supposed to look for right/detailed information about that in Qt / Qt Creator docs & tutorials, I mean, how could I find that "-m32" flag for gcc and ld could/would be set by indicating the "-spec linux-g++-32" option in the additional make steps in the target application project profile item(s) in the Qt creator IDE ?

        Thanks again for further help.

        Alain-Pierre

        1 Reply Last reply
        0
        • A Offline
          A Offline
          apclinux
          wrote on 9 Feb 2011, 16:23 last edited by
          #4

          me (Alain-Pierre) again...

          The link step seems to use /usr/lib as default path for accessing to library files,
          as it can be seen with the /L option when the build procedure invokes the linker.

          On my Ubuntu 10.10 64bit Linux distrib, I can see existence of "/usr/lib32" and "/usr/lib"
          directories and "/usr/lib64" being in fact a symbolic link to "/usr/lib", so, clearly,
          "/usr/lib" is the native path to 64bit libraries.

          ls -ld /usr/lib*
          drwxr-xr-x 233 root root 69632 2011-02-08 15:59 /usr/lib
          drwxr-xr-x 40 root root 36864 2011-02-08 13:44 /usr/lib32
          lrwxrwxrwx 1 root root 3 2011-02-01 13:56 /usr/lib64 -> lib

          Well, what did I miss in having succeeded in making Qt Creator / qmake to force
          32bit target mode for both gcc/g++ compiler and linker (with “-spec linux-g++-32” option
          forcing the "-m32" compiler&linker option) ? Why isn't path to libraries "automatically"
          set/forced to the 32bit libraries path ?

          How to setup the right path to 32bit libraries (because "-m32" not sufficient ?) ?

          (I verified that /usr/lib32 contains manyè Qt library files, so, I hope/guess these ones
          are really 32bit library files...)

          Best regards, further help very appreciated.

          Alain-Pierre

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on 10 Feb 2011, 21:09 last edited by
            #5

            That would be an issue of the ubuntu guys to set up the paths in the correct way.

            I don't know if there are prebuilt 32bit binaries of Qt for 64 bit Ubuntu.

            Did you check that there are actually some Qt libs in /usr/lib32?

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • A Offline
              A Offline
              apclinux
              wrote on 11 Feb 2011, 08:46 last edited by
              #6

              Hello Volker,

              Did you check that there are actually some Qt libs in /usr/lib32?

              yes, as I said in my revious post, /usr/lib32 contains many Qt library files, so, I hope/guess these ones are really 32bit library files…

              ls -lF /usr/lib32/Qt
              lrwxrwxrwx 1 root root 18 2011-02-01 14:36 /usr/lib32/libQt3Support.so -> libQt3Support.so.4
              lrwxrwxrwx 1 root root 22 2011-02-01 14:36 /usr/lib32/libQt3Support.so.4 -> libQt3Support.so.4.7.0
              lrwxrwxrwx 1 root root 22 2011-02-01 14:36 /usr/lib32/libQt3Support.so.4.7 -> libQt3Support.so.4.7.0
              -rw-r--r-- 1 root root 2997592 2010-10-03 10:41 /usr/lib32/libQt3Support.so.4.7.0
              lrwxrwxrwx 1 root root 17 2011-02-01 14:36 /usr/lib32/libQtCLucene.so -> libQtCLucene.so.4
              lrwxrwxrwx 1 root root 21 2011-02-01 14:36 /usr/lib32/libQtCLucene.so.4 -> libQtCLucene.so.4.7.0
              lrwxrwxrwx 1 root root 21 2011-02-01 14:36 /usr/lib32/libQtCLucene.so.4.7 -> libQtCLucene.so.4.7.0
              -rw-r--r-- 1 root root 969024 2010-10-03 10:41 /usr/lib32/libQtCLucene.so.4.7.0
              lrwxrwxrwx 1 root root 16 2011-02-01 14:36 /usr/lib32/libQtCore.so -> libQtCore.so.4.7
              lrwxrwxrwx 1 root root 18 2011-02-01 14:36 /usr/lib32/libQtCore.so.4 -> libQtCore.so.4.7.0
              lrwxrwxrwx 1 root root 18 2011-02-01 14:36 /usr/lib32/libQtCore.so.4.7 -> libQtCore.so.4.7.0
              -rw-r--r-- 1 root root 2714428 2010-10-03 10:41 /usr/lib32/libQtCore.so.4.7.0
              lrwxrwxrwx 1 root root 14 2011-02-01 14:36 /usr/lib32/libQtDBus.so -> libQtDBus.so.4
              lrwxrwxrwx 1 root root 18 2011-02-01 14:36 /usr/lib32/libQtDBus.so.4 -> libQtDBus.so.4.7.0
              lrwxrwxrwx 1 root root 18 2011-02-01 14:36 /usr/lib32/libQtDBus.so.4.7 -> libQtDBus.so.4.7.0
              -rw-r--r-- 1 root root 502312 2010-10-03 10:41 /usr/lib32/libQtDBus.so.4.7.0
              lrwxrwxrwx 1 root root 15 2011-02-01 14:36 /usr/lib32/libQtGui.so -> libQtGui.so.4.7
              lrwxrwxrwx 1 root root 17 2011-02-01 14:36 /usr/lib32/libQtGui.so.4 -> libQtGui.so.4.7.0
              lrwxrwxrwx 1 root root 17 2011-02-01 14:36 /usr/lib32/libQtGui.so.4.7 -> libQtGui.so.4.7.0
              -rw-r--r-- 1 root root 11298492 2010-10-03 10:41 /usr/lib32/libQtGui.so.4.7.0
              lrwxrwxrwx 1 root root 19 2011-02-01 14:36 /usr/lib32/libQtNetwork.so -> libQtNetwork.so.4.7
              lrwxrwxrwx 1 root root 21 2011-02-01 14:36 /usr/lib32/libQtNetwork.so.4 -> libQtNetwork.so.4.7.0
              lrwxrwxrwx 1 root root 21 2011-02-01 14:36 /usr/lib32/libQtNetwork.so.4.7 -> libQtNetwork.so.4.7.0
              -rw-r--r-- 1 root root 1207836 2010-10-03 10:41 /usr/lib32/libQtNetwork.so.4.7.0
              lrwxrwxrwx 1 root root 18 2011-02-01 14:36 /usr/lib32/libQtOpenGL.so -> libQtOpenGL.so.4.7
              lrwxrwxrwx 1 root root 20 2011-02-01 14:36 /usr/lib32/libQtOpenGL.so.4 -> libQtOpenGL.so.4.7.0
              lrwxrwxrwx 1 root root 20 2011-02-01 14:36 /usr/lib32/libQtOpenGL.so.4.7 -> libQtOpenGL.so.4.7.0
              -rw-r--r-- 1 root root 929560 2010-10-03 10:41 /usr/lib32/libQtOpenGL.so.4.7.0
              lrwxrwxrwx 1 root root 16 2011-02-01 14:36 /usr/lib32/libQtScript.so -> libQtScript.so.4
              lrwxrwxrwx 1 root root 20 2011-02-01 14:36 /usr/lib32/libQtScript.so.4 -> libQtScript.so.4.7.0
              lrwxrwxrwx 1 root root 20 2011-02-01 14:36 /usr/lib32/libQtScript.so.4.7 -> libQtScript.so.4.7.0
              -rw-r--r-- 1 root root 2599972 2010-10-03 10:41 /usr/lib32/libQtScript.so.4.7.0
              lrwxrwxrwx 1 root root 21 2011-02-01 14:36 /usr/lib32/libQtScriptTools.so -> libQtScriptTools.so.4
              lrwxrwxrwx 1 root root 25 2011-02-01 14:36 /usr/lib32/libQtScriptTools.so.4 -> libQtScriptTools.so.4.7.0
              lrwxrwxrwx 1 root root 25 2011-02-01 14:36 /usr/lib32/libQtScriptTools.so.4.7 -> libQtScriptTools.so.4.7.0
              -rw-r--r-- 1 root root 777936 2010-10-03 10:41 /usr/lib32/libQtScriptTools.so.4.7.0
              lrwxrwxrwx 1 root root 13 2011-02-01 14:36 /usr/lib32/libQtSql.so -> libQtSql.so.4
              lrwxrwxrwx 1 root root 17 2011-02-01 14:36 /usr/lib32/libQtSql.so.4 -> libQtSql.so.4.7.0
              lrwxrwxrwx 1 root root 17 2011-02-01 14:36 /usr/lib32/libQtSql.so.4.7 -> libQtSql.so.4.7.0
              -rw-r--r-- 1 root root 251864 2010-10-03 10:41 /usr/lib32/libQtSql.so.4.7.0
              lrwxrwxrwx 1 root root 15 2011-02-01 14:36 /usr/lib32/libQtSvg.so -> libQtSvg.so.4.7
              lrwxrwxrwx 1 root root 17 2011-02-01 14:36 /usr/lib32/libQtSvg.so.4 -> libQtSvg.so.4.7.0
              lrwxrwxrwx 1 root root 17 2011-02-01 14:36 /usr/lib32/libQtSvg.so.4.7 -> libQtSvg.so.4.7.0
              -rw-r--r-- 1 root root 355292 2010-10-03 10:41 /usr/lib32/libQtSvg.so.4.7.0
              lrwxrwxrwx 1 root root 14 2011-02-01 14:36 /usr/lib32/libQtTest.so -> libQtTest.so.4
              lrwxrwxrwx 1 root root 18 2011-02-01 14:36 /usr/lib32/libQtTest.so.4 -> libQtTest.so.4.7.0
              lrwxrwxrwx 1 root root 18 2011-02-01 14:36 /usr/lib32/libQtTest.so.4.7 -> libQtTest.so.4.7.0
              -rw-r--r-- 1 root root 141352 2010-10-03 10:41 /usr/lib32/libQtTest.so.4.7.0
              lrwxrwxrwx 1 root root 21 2011-02-01 14:36 /usr/lib32/libQtXmlPatterns.so -> libQtXmlPatterns.so.4
              lrwxrwxrwx 1 root root 25 2011-02-01 14:36 /usr/lib32/libQtXmlPatterns.so.4 -> libQtXmlPatterns.so.4.7.0
              lrwxrwxrwx 1 root root 25 2011-02-01 14:36 /usr/lib32/libQtXmlPatterns.so.4.7 -> libQtXmlPatterns.so.4.7.0
              -rw-r--r-- 1 root root 4385680 2010-10-03 10:38 /usr/lib32/libQtXmlPatterns.so.4.7.0
              lrwxrwxrwx 1 root root 15 2011-02-01 14:36 /usr/lib32/libQtXml.so -> libQtXml.so.4.7
              lrwxrwxrwx 1 root root 17 2011-02-01 14:36 /usr/lib32/libQtXml.so.4 -> libQtXml.so.4.7.0
              lrwxrwxrwx 1 root root 17 2011-02-01 14:36 /usr/lib32/libQtXml.so.4.7 -> libQtXml.so.4.7.0
              -rw-r--r-- 1 root root 272192 2010-10-03 10:41 /usr/lib32/libQtXml.so.4.7.0

              Alain-Pierre

              1 Reply Last reply
              0
              • A Offline
                A Offline
                apclinux
                wrote on 11 Feb 2011, 08:47 last edited by
                #7

                and (part 1 of 2) in /usr/lib64 :

                ls -lF /usr/lib64/Qt
                -rw-r--r-- 1 root root 622 2010-11-19 17:43 /usr/lib64/libQt3Support.prl
                lrwxrwxrwx 1 root root 22 2011-02-01 17:09 /usr/lib64/libQt3Support.so -> libQt3Support.so.4.7.0
                lrwxrwxrwx 1 root root 22 2011-02-01 16:36 /usr/lib64/libQt3Support.so.4 -> libQt3Support.so.4.7.0
                lrwxrwxrwx 1 root root 22 2011-02-01 16:36 /usr/lib64/libQt3Support.so.4.7 -> libQt3Support.so.4.7.0
                -rw-r--r-- 1 root root 3131136 2010-11-19 17:51 /usr/lib64/libQt3Support.so.4.7.0
                -rw-r--r-- 1 root root 626 2010-11-19 17:43 /usr/lib64/libQtCLucene.prl
                lrwxrwxrwx 1 root root 21 2011-02-01 17:09 /usr/lib64/libQtCLucene.so -> libQtCLucene.so.4.7.0
                lrwxrwxrwx 1 root root 21 2011-02-01 16:35 /usr/lib64/libQtCLucene.so.4 -> libQtCLucene.so.4.7.0
                lrwxrwxrwx 1 root root 21 2011-02-01 16:35 /usr/lib64/libQtCLucene.so.4.7 -> libQtCLucene.so.4.7.0
                -rw-r--r-- 1 root root 1036144 2010-11-19 17:51 /usr/lib64/libQtCLucene.so.4.7.0
                -rw-r--r-- 1 root root 615 2010-11-19 17:43 /usr/lib64/libQtCore.prl
                lrwxrwxrwx 1 root root 18 2011-02-01 17:09 /usr/lib64/libQtCore.so -> libQtCore.so.4.7.0
                lrwxrwxrwx 1 root root 18 2011-02-01 16:35 /usr/lib64/libQtCore.so.4 -> libQtCore.so.4.7.0
                lrwxrwxrwx 1 root root 18 2011-02-01 16:35 /usr/lib64/libQtCore.so.4.7 -> libQtCore.so.4.7.0
                -rw-r--r-- 1 root root 2732832 2010-11-19 17:51 /usr/lib64/libQtCore.so.4.7.0
                -rw-r--r-- 1 root root 627 2010-11-19 17:43 /usr/lib64/libQtDBus.prl
                lrwxrwxrwx 1 root root 18 2011-02-01 17:09 /usr/lib64/libQtDBus.so -> libQtDBus.so.4.7.0
                lrwxrwxrwx 1 root root 18 2011-02-01 16:35 /usr/lib64/libQtDBus.so.4 -> libQtDBus.so.4.7.0
                lrwxrwxrwx 1 root root 18 2011-02-01 16:35 /usr/lib64/libQtDBus.so.4.7 -> libQtDBus.so.4.7.0
                -rw-r--r-- 1 root root 504184 2010-11-19 17:51 /usr/lib64/libQtDBus.so.4.7.0
                -rw-r--r-- 1 root root 633 2010-11-19 17:43 /usr/lib64/libQtDeclarative.prl
                lrwxrwxrwx 1 root root 25 2011-02-01 17:09 /usr/lib64/libQtDeclarative.so -> libQtDeclarative.so.4.7.0
                lrwxrwxrwx 1 root root 25 2011-02-01 17:09 /usr/lib64/libQtDeclarative.so.4 -> libQtDeclarative.so.4.7.0
                lrwxrwxrwx 1 root root 25 2011-02-01 17:09 /usr/lib64/libQtDeclarative.so.4.7 -> libQtDeclarative.so.4.7.0
                -rw-r--r-- 1 root root 3474136 2010-11-19 17:51 /usr/lib64/libQtDeclarative.so.4.7.0
                -rw-r--r-- 1 root root 557 2010-11-19 17:43 /usr/lib64/libQtDesignerComponents.prl
                lrwxrwxrwx 1 root root 32 2011-02-01 17:09 /usr/lib64/libQtDesignerComponents.so -> libQtDesignerComponents.so.4.7.0
                lrwxrwxrwx 1 root root 32 2011-02-01 16:36 /usr/lib64/libQtDesignerComponents.so.4 -> libQtDesignerComponents.so.4.7.0
                lrwxrwxrwx 1 root root 32 2011-02-01 16:36 /usr/lib64/libQtDesignerComponents.so.4.7 -> libQtDesignerComponents.so.4.7.0
                -rw-r--r-- 1 root root 2922856 2010-11-19 17:51 /usr/lib64/libQtDesignerComponents.so.4.7.0
                -rw-r--r-- 1 root root 512 2010-11-19 17:43 /usr/lib64/libQtDesigner.prl
                lrwxrwxrwx 1 root root 22 2011-02-01 17:09 /usr/lib64/libQtDesigner.so -> libQtDesigner.so.4.7.0
                lrwxrwxrwx 1 root root 22 2011-02-01 16:36 /usr/lib64/libQtDesigner.so.4 -> libQtDesigner.so.4.7.0
                lrwxrwxrwx 1 root root 22 2011-02-01 16:36 /usr/lib64/libQtDesigner.so.4.7 -> libQtDesigner.so.4.7.0
                -rw-r--r-- 1 root root 6447360 2010-11-19 17:51 /usr/lib64/libQtDesigner.so.4.7.0
                -rw-r--r-- 1 root root 671 2010-11-19 17:43 /usr/lib64/libQtGui.prl
                lrwxrwxrwx 1 root root 17 2011-02-01 17:09 /usr/lib64/libQtGui.so -> libQtGui.so.4.7.0
                lrwxrwxrwx 1 root root 17 2011-02-01 16:35 /usr/lib64/libQtGui.so.4 -> libQtGui.so.4.7.0
                lrwxrwxrwx 1 root root 17 2011-02-01 16:35 /usr/lib64/libQtGui.so.4.7 -> libQtGui.so.4.7.0
                -rw-r--r-- 1 root root 11425096 2010-11-19 17:51 /usr/lib64/libQtGui.so.4.7.0
                -rw-r--r-- 1 root root 622 2010-11-19 17:43 /usr/lib64/libQtHelp.prl
                lrwxrwxrwx 1 root root 18 2011-02-01 17:09 /usr/lib64/libQtHelp.so -> libQtHelp.so.4.7.0
                lrwxrwxrwx 1 root root 18 2011-02-01 17:09 /usr/lib64/libQtHelp.so.4 -> libQtHelp.so.4.7.0
                lrwxrwxrwx 1 root root 18 2011-02-01 17:09 /usr/lib64/libQtHelp.so.4.7 -> libQtHelp.so.4.7.0
                -rw-r--r-- 1 root root 562648 2010-11-19 17:51 /usr/lib64/libQtHelp.so.4.7.0
                -rw-r--r-- 1 root root 618 2010-11-19 17:43 /usr/lib64/libQtNetwork.prl
                lrwxrwxrwx 1 root root 21 2011-02-01 17:09 /usr/lib64/libQtNetwork.so -> libQtNetwork.so.4.7.0
                lrwxrwxrwx 1 root root 21 2011-02-01 16:35 /usr/lib64/libQtNetwork.so.4 -> libQtNetwork.so.4.7.0
                lrwxrwxrwx 1 root root 21 2011-02-01 16:35 /usr/lib64/libQtNetwork.so.4.7 -> libQtNetwork.so.4.7.0
                -rw-r--r-- 1 root root 1239376 2010-11-19 17:51 /usr/lib64/libQtNetwork.so.4.7.0
                -rw-r--r-- 1 root root 641 2010-11-19 17:43 /usr/lib64/libQtOpenGL.prl
                lrwxrwxrwx 1 root root 20 2011-02-01 17:09 /usr/lib64/libQtOpenGL.so -> libQtOpenGL.so.4.7.0
                lrwxrwxrwx 1 root root 20 2011-02-01 16:35 /usr/lib64/libQtOpenGL.so.4 -> libQtOpenGL.so.4.7.0
                lrwxrwxrwx 1 root root 20 2011-02-01 16:35 /usr/lib64/libQtOpenGL.so.4.7 -> libQtOpenGL.so.4.7.0
                -rw-r--r-- 1 root root 941088 2010-11-19 17:51 /usr/lib64/libQtOpenGL.so.4.7.0

                Alain-Pierre

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  apclinux
                  wrote on 11 Feb 2011, 08:48 last edited by
                  #8

                  (part 2 of 2) /usr/lib64 :

                  -rw-r--r-- 1 root root 644 2010-11-19 17:43 /usr/lib64/libQtScript.prl
                  lrwxrwxrwx 1 root root 20 2011-02-01 17:09 /usr/lib64/libQtScript.so -> libQtScript.so.4.7.0
                  lrwxrwxrwx 1 root root 20 2011-02-01 16:35 /usr/lib64/libQtScript.so.4 -> libQtScript.so.4.7.0
                  lrwxrwxrwx 1 root root 20 2011-02-01 16:35 /usr/lib64/libQtScript.so.4.7 -> libQtScript.so.4.7.0
                  -rw-r--r-- 1 root root 2688248 2010-11-19 17:51 /usr/lib64/libQtScript.so.4.7.0
                  -rw-r--r-- 1 root root 626 2010-11-19 17:43 /usr/lib64/libQtScriptTools.prl
                  lrwxrwxrwx 1 root root 25 2011-02-01 17:09 /usr/lib64/libQtScriptTools.so -> libQtScriptTools.so.4.7.0
                  lrwxrwxrwx 1 root root 25 2011-02-01 17:09 /usr/lib64/libQtScriptTools.so.4 -> libQtScriptTools.so.4.7.0
                  lrwxrwxrwx 1 root root 25 2011-02-01 17:09 /usr/lib64/libQtScriptTools.so.4.7 -> libQtScriptTools.so.4.7.0
                  -rw-r--r-- 1 root root 817856 2010-11-19 17:51 /usr/lib64/libQtScriptTools.so.4.7.0
                  -rw-r--r-- 1 root root 610 2010-11-19 17:43 /usr/lib64/libQtSql.prl
                  lrwxrwxrwx 1 root root 17 2011-02-01 17:09 /usr/lib64/libQtSql.so -> libQtSql.so.4.7.0
                  lrwxrwxrwx 1 root root 17 2011-02-01 16:36 /usr/lib64/libQtSql.so.4 -> libQtSql.so.4.7.0
                  lrwxrwxrwx 1 root root 17 2011-02-01 16:36 /usr/lib64/libQtSql.so.4.7 -> libQtSql.so.4.7.0
                  -rw-r--r-- 1 root root 261336 2010-11-19 17:51 /usr/lib64/libQtSql.so.4.7.0
                  -rw-r--r-- 1 root root 610 2010-11-19 17:43 /usr/lib64/libQtSvg.prl
                  lrwxrwxrwx 1 root root 17 2011-02-01 17:09 /usr/lib64/libQtSvg.so -> libQtSvg.so.4.7.0
                  lrwxrwxrwx 1 root root 17 2011-02-01 16:35 /usr/lib64/libQtSvg.so.4 -> libQtSvg.so.4.7.0
                  lrwxrwxrwx 1 root root 17 2011-02-01 16:35 /usr/lib64/libQtSvg.so.4.7 -> libQtSvg.so.4.7.0
                  -rw-r--r-- 1 root root 373984 2010-11-19 17:51 /usr/lib64/libQtSvg.so.4.7.0
                  -rw-r--r-- 1 root root 615 2010-11-19 17:43 /usr/lib64/libQtTest.prl
                  lrwxrwxrwx 1 root root 18 2011-02-01 17:09 /usr/lib64/libQtTest.so -> libQtTest.so.4.7.0
                  lrwxrwxrwx 1 root root 18 2011-02-01 17:09 /usr/lib64/libQtTest.so.4 -> libQtTest.so.4.7.0
                  lrwxrwxrwx 1 root root 18 2011-02-01 17:09 /usr/lib64/libQtTest.so.4.7 -> libQtTest.so.4.7.0
                  -rw-r--r-- 1 root root 142712 2010-11-19 17:51 /usr/lib64/libQtTest.so.4.7.0
                  -rw-r--r-- 1 root root 1461550 2010-11-19 17:51 /usr/lib64/libQtUiTools.a
                  -rw-r--r-- 1 root root 494 2010-11-19 17:43 /usr/lib64/libQtUiTools.prl
                  -rw-r--r-- 1 root root 469 2010-09-24 13:18 /usr/lib64/libQtWebKit.prl
                  lrwxrwxrwx 1 root root 20 2011-02-01 17:09 /usr/lib64/libQtWebKit.so -> libQtWebKit.so.4.7.0
                  lrwxrwxrwx 1 root root 20 2011-02-01 16:35 /usr/lib64/libQtWebKit.so.4 -> libQtWebKit.so.4.7.0
                  lrwxrwxrwx 1 root root 20 2011-02-01 16:35 /usr/lib64/libQtWebKit.so.4.7 -> libQtWebKit.so.4.7.0
                  -rw-r--r-- 1 root root 20935408 2010-09-24 14:13 /usr/lib64/libQtWebKit.so.4.7.0
                  -rw-r--r-- 1 root root 626 2010-11-19 17:43 /usr/lib64/libQtXmlPatterns.prl
                  lrwxrwxrwx 1 root root 25 2011-02-01 17:09 /usr/lib64/libQtXmlPatterns.so -> libQtXmlPatterns.so.4.7.0
                  lrwxrwxrwx 1 root root 25 2011-02-01 17:09 /usr/lib64/libQtXmlPatterns.so.4 -> libQtXmlPatterns.so.4.7.0
                  lrwxrwxrwx 1 root root 25 2011-02-01 17:09 /usr/lib64/libQtXmlPatterns.so.4.7 -> libQtXmlPatterns.so.4.7.0
                  -rw-r--r-- 1 root root 4752344 2010-11-19 17:45 /usr/lib64/libQtXmlPatterns.so.4.7.0
                  -rw-r--r-- 1 root root 610 2010-11-19 17:43 /usr/lib64/libQtXml.prl
                  lrwxrwxrwx 1 root root 17 2011-02-01 17:09 /usr/lib64/libQtXml.so -> libQtXml.so.4.7.0
                  lrwxrwxrwx 1 root root 17 2011-02-01 16:35 /usr/lib64/libQtXml.so.4 -> libQtXml.so.4.7.0
                  lrwxrwxrwx 1 root root 17 2011-02-01 16:35 /usr/lib64/libQtXml.so.4.7 -> libQtXml.so.4.7.0
                  -rw-r--r-- 1 root root 289704 2010-11-19 17:51 /usr/lib64/libQtXml.so.4.7.0

                  Alain-Pierre

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    apclinux
                    wrote on 11 Feb 2011, 08:49 last edited by
                    #9

                    Despite of this, one detail is very strange to me :
                    when linking my application, the linker gives some warnings (with red flag) about a few
                    Qt libraries:
                    /usr/bin/ld: skipping incompatible /usr/lib/libQtGui.so when searching for -lQtGui
                    /usr/bin/ld: skipping incompatible /usr/lib/libQtCore.so when searching for -lQtCore
                    /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
                    /usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
                    /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
                    /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
                    /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
                    /usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
                    Despite this, one executable is generated and can be launched.
                    It seems working well, except some warning messages about 64bit ELF format compatibility,
                    as soons as the application starts:

                    (<unknown>:10019): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so: mauvaise classe ELF: ELFCLASS64

                    (<unknown>:10019): Gtk-WARNING **: Loading IM context type 'cedilla' failed

                    (<unknown>:10019): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so: mauvaise classe ELF: ELFCLASS64

                    (<unknown>:10019): Gtk-WARNING **: Loading IM context type 'cedilla' failed

                    (<unknown>:10019): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so: mauvaise classe ELF: ELFCLASS64

                    (<unknown>:10019): Gtk-WARNING **: Loading IM context type 'cedilla' failed

                    and, also, later, like this:

                    /usr/lib/gio/modules/libgvfsdbus.so: mauvaise classe ELF: ELFCLASS64
                    Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so

                    So, there is something that is clearly wrong, and I tried to see if something could be explained
                    in the "mkspecs" profiles for qmake.
                    I couldn't notice anything about explicit "/usr/lib", "/usr/lib32" or "/usr/lib64" reference or path
                    declaration in relevant "qmake.conf" file in "linux-g++-32" mkspec subdir. I don't know
                    where to look for and check/verify the reference to default "/usr/lib" path for GCC (ld) link step ?
                    What I can see is a "-L/usr/lib" argument in the linker invocation even if I surcharge it by adding
                    explicit /usr/lib32 path reference to the LIBS variable in my application ".pro" file editable
                    with Qt Creator and then used by qmake during my application build process:

                    I tried to modify my application ".pro" file by adding/forcing the LIBS variable
                    (without further full success when linking my app):

                    LIBS -= /usr/lib
                    LIBS += /usr/lib32

                    or

                    LIBS = /usr/lib32

                    these two tries will show the linker taking /usr/lib32 into account, but unfortunately with /usr/lib
                    path systematically present just before /usr/lib32 reference :

                    g++ -m32 -o my_qt_app file_1.o ... file_N.o -L/usr/lib -L/usr/lib32 -lQtGui -lQtCore -lpthread
                    /usr/bin/ld: skipping incompatible /usr/lib/libQtGui.so when searching for -lQtGui
                    /usr/bin/ld: skipping incompatible /usr/lib/libQtCore.so when searching for -lQtCore
                    /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
                    /usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
                    /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
                    /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
                    /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
                    /usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
                    make: quittant le répertoire « /home/user/projets/divers/my_qt_app »
                    Le processus "/usr/bin/make" s'est terminé normalement.

                    so, LIBS variable seems not to be a right way, or -= or += syntax is not the right one ?

                    I don't know how to make linker ignore /usr/lib, and I am even not sure that such tries
                    to "suppress" /usr/lib default reference at linking build step can even have sense ?

                    Kind regards, anymore help & suggestion ?

                    Alain-Pierre

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      apclinux
                      wrote on 11 Feb 2011, 11:14 last edited by
                      #10

                      Hello again,

                      by temporarily redefining (forcing) the QMAKE_LIBDIR_QT variable in in the linux common qmake mkspec file "/usr/share/qt4/mkspecs/common/linux.conf" to point to "/usr/lib32"

                      #QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
                      QMAKE_LIBDIR_QT = /usr/lib32

                      link build step now executes (as expected, if what I'm expecting is right)

                      "g++ -m32 -o my_qt_app file_1.o … file_N.o -L/usr/lib32 -lQtGui -lQtCore -lpthread"

                      ("-L/usr/lib" not there anymore, that is what I think might be expected)

                      so, there are no link warnings (errors) anymore about Qt libs, but there are still the same
                      "ELF: ELFCLASS64" warnings when running the application being built... !?

                      as soons as the application starts:
                      (<unknown>:10019): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so: mauvaise classe ELF: ELFCLASS64
                      (<unknown>:10019): Gtk-WARNING **: Loading IM context type ‘cedilla’ failed
                      (<unknown>:10019): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so: mauvaise classe ELF: ELFCLASS64
                      (<unknown>:10019): Gtk-WARNING **: Loading IM context type ‘cedilla’ failed
                      (<unknown>:10019): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so: mauvaise classe ELF: ELFCLASS64
                      (<unknown>:10019): Gtk-WARNING **: Loading IM context type ‘cedilla’ failed
                      and, also, later, like this:
                      /usr/lib/gio/modules/libgvfsdbus.so: mauvaise classe ELF: ELFCLASS64
                      Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so

                      No more ideas at this point... And quite sure modifying the linux common mkspec definition
                      (QMAKE_LIBDIR_QT / QT_INSTALL_LIBS) is not a good idea...

                      Alain-Pierre

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        goetz
                        wrote on 13 Feb 2011, 18:01 last edited by
                        #11

                        Some GTK issues, probably caused by loading the wrong libraries. There are some bugreports open at launchpad/canonical; have a look here:

                        • https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/646954
                        • https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/641056
                        • http://plosquare.blogspot.com/2008/12/gtk-warning-wrong-elf-class-elfclass64.html

                        I don't know how to fix this and if everything is available on your Ubuntu box, maybe you should ask in some Ubuntu forum too.

                        http://www.catb.org/~esr/faqs/smart-questions.html

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          apclinux
                          wrote on 14 Feb 2011, 12:24 last edited by
                          #12

                          Thanks a lot Volker for your help & suggestions.
                          I finally posted a bug report both by Ubuntu & Qt-Nokia about all that.
                          Best regards.
                          Alain-Pierre

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            apclinux
                            wrote on 24 Feb 2011, 14:10 last edited by
                            #13

                            Hello again, Alain-Pierre is back...

                            Tried same things under x86_64 Fedora 14, can't get successfull when compiling my Qt app with forcing 32bit mode with “-spec linux-g++-32” build profile option.
                            Buid process stops on compiling error about missing QtCore/qconfig-i386.h

                            so, I made a new try opening a new bug report in Qt/Nokia bug tracking system:

                            http://bugreports.qt.nokia.com/browse/QTBUG-17747

                            Anymore help very appreciated.
                            Best regards.

                            Alain-Pierre

                            1 Reply Last reply
                            0
                            • G Offline
                              G Offline
                              goetz
                              wrote on 24 Feb 2011, 14:19 last edited by
                              #14

                              I doubt that Trolltech/Nokia will care of that. It's clearly something you should blame the distro vendors (Ubuntu/Launchpad, RedHat, etc.) for.

                              In your case I would manually build my own set of Qt libs for the 32 bit platform.

                              http://www.catb.org/~esr/faqs/smart-questions.html

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                apclinux
                                wrote on 24 Feb 2011, 17:33 last edited by
                                #15

                                Thanks again Volker for your suggestion,
                                might you have a crystal bowl ?
                                Qt team just answered quite same words as you for my QTBUG-17747
                                report/request:

                                Oswald Buddenhagen added a comment - 24/Feb/11 5:52 PM

                                please try a self-compiled, unpatched qt from us. that you are seeing
                                different errors on different distributions is the best indication that you are
                                seeing (unrelated) packaging-related problems.

                                http://bugreports.qt.nokia.com/browse/QTBUG-17747

                                Hmmmmm, okay okay...
                                It's not good news for me generally speaking...
                                So I'm going to forward my request to Fedora team, even if I will try to do
                                what you suggested to me...
                                What a maze...

                                Regards,

                                Alain-Pierre

                                1 Reply Last reply
                                0
                                • G Offline
                                  G Offline
                                  goetz
                                  wrote on 24 Feb 2011, 17:41 last edited by
                                  #16

                                  Oh, I would be happy if I had one, be assured :-)

                                  But in this case, the reaction was so clear and foreseeable. I would do (and actually do) nothing else than refer to the guys that caused the mess and recommend compiling a vanilla version.

                                  http://www.catb.org/~esr/faqs/smart-questions.html

                                  1 Reply Last reply
                                  0
                                  • A Offline
                                    A Offline
                                    apclinux
                                    wrote on 24 Feb 2011, 18:06 last edited by
                                    #17

                                    Ok Volker,
                                    but what shall I download exactly (LGPL packages) from Qt web site ?

                                    • Qt SDK for Linux/X11 32-bit** (422 MB) ?
                                    • Qt SDK for Linux/X11 64-bit** (530 MB) ?
                                    • Qt libraries 4.7.1 for Linux/X11(202 MB) ?
                                    • Qt libraries 4.7.1 for embedded Linux (202 MB) ?

                                    What can be exactly concerned by what I have largely descripted
                                    in my preceding posts ?

                                    Shall I re-generate Qt Creator ? qmake ? or only Qt libs ?
                                    Shall I choose the 3ébit or 64bit package ?

                                    As you know, I try to generate x86 32bit targets with my daily working platform
                                    being x86 64bit (Ubuntu or Fedora, not the matter), so what to do exactly ?

                                    About differences between different linux distros, would it be better/safer
                                    to work with a true Debian platform ? Would it have less pbs about my Qt
                                    disagreements than Fedora or Ubuntu ?

                                    Nice day / evening to you Volker (I'm going back to home now...)

                                    :-)

                                    Alain-Pierre

                                    [EDIT: fixed list items, use '*' instead of '-', Volker]

                                    1 Reply Last reply
                                    0
                                    • G Offline
                                      G Offline
                                      goetz
                                      wrote on 24 Feb 2011, 18:34 last edited by
                                      #18

                                      Ahm, use neither of these :-)

                                      Download the sources of the framework only:

                                      • go to http://qt.nokia.com/downloads
                                      • click on "go LGPL"
                                      • on the right side is "Qt: Framework Only"
                                      • the links to the sources are at the end of the introductory paragraph

                                      Then unpack the archive, and follow the "installation guide":http://doc.qt.nokia.com/4.7/installation.html. No need to recompile creator etc. qmake is built with every Qt installation you have.

                                      Once your compiler has finished and you have issued "make install", make the new Qt version visible to Qt creator: Go to the preferences, Qt 4 and hit the "+"-button and enter the full path to the newly built qmake (usually under /usr/local/Trolltech/Qt-4.7.1/bin) and give it a good name ("4.7.1 32bit" comes into mind).

                                      Then - important! - go to the project view in Creator and change the version used to the newly added one! If you forget this, your project will still be compiled against the 64 bit system Qt!

                                      http://www.catb.org/~esr/faqs/smart-questions.html

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        apclinux
                                        wrote on 25 Feb 2011, 09:32 last edited by
                                        #19

                                        Hello Volker,

                                        Fedora team has also closed my "bug report" because in case of Fedora (14), the solution is already existing...

                                        As Kevin Kofler said when closing the bug report :

                                        .......................................................................
                                        CLOSED NOTABUG

                                        Kevin Kofler 2011-02-24 13:41:26 EST

                                        su -c "yum install qt-devel.i686"
                                        .......................................................................

                                        :-) it works fine now, installing the qt-devel.i686 package did the job !

                                        Then, I 'm wondering now what would be the equivalent package to install, if ever possible/available, to solve the problem same way on Ubuntu (10.10) ?

                                        Without lights from Ubuntu team, I'll try what you proposed to me Volker and I'll inform you about working results.

                                        Have a nice w-e !

                                        Alain-Pierre

                                        1 Reply Last reply
                                        0
                                        • A Offline
                                          A Offline
                                          apclinux
                                          wrote on 28 Feb 2011, 15:05 last edited by
                                          #20

                                          Just (re)built my own Qt lib (and, more complicated, qvfb tool) for my Fedora 14

                                          http://developer.qt.nokia.com/forums/viewthread/4115/

                                          :-)

                                          Alain-Pierre

                                          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