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



  • 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.



  • 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



  • 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



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



  • 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



  • 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



  • (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



  • 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



  • 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



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

    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.



  • 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



  • 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



  • 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.



  • 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



  • 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.



  • 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]



  • 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!



  • 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



  • 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



  • Hello again,

    it seems that the two download links relative to "Qt libraries 4.7.1 for Linux/X11(202 MB)" and "Qt libraries 4.7.1 for embedded Linux (202 MB)"
    on the official LGPL Qt download pages will download the same "qt-everywhere-opensource-src-4.7.1.tar.gz" compressed archive file :

    is this ok ?

    And what to do when configuring the make process ?

    How to proceed when issuing the "./configure" command if wanting to build a "normal" Qt-X11 lib kit AND a Qt-embedded lib kit ? Is it by adding a "-embedded" option and indicating different target paths for the normal and embedded targets ?

    As I understand, default target path will be something like "/usr/local/Trolltech/Qt-4.7.1", but how to specify a different path ?

    Also, for what target may I specify a (the) "-qvfb" option ? Is it for the normal Qt-X11 one or for the embedded one ?

    All these details are not clear at all in my mind.
    Thanks for any lights about that, regards.

    Alain-Pierre



  • Did you have a look at the output of

    @
    ./configure -help
    @

    Hint: -prefix is your friend. This way you can install multiple Qt variants of the same version on your system.

    To compile for specific system/system variant, use -platform and the same argument as you would for qmake -spec.

    EDIT: The source packages are always the same, it does not matter where you get them.



  • Hello again Volker,

    • so, I try again to generate my own Qt lib as following :

    ./configure -platform linux-g++-32 -qvfb ; gmake ; gmake install
    Which edition of Qt do you want to use ?

    Type 'c' if you want to use the Commercial Edition.
    Type 'o' if you want to use the Open Source Edition.

    o

    This is the Qt for Linux/X11 Open Source Edition.

    You are licensed to use this software under the terms of
    the Lesser GNU General Public License (LGPL) versions 2.1.
    You are also licensed to use this software under the terms of
    the GNU General Public License (GPL) versions 3.

    Type '3' to view the GNU General Public License version 3.
    Type 'L' to view the Lesser GNU General Public License version 2.1.
    Type 'yes' to accept this license offer.
    Type 'no' to decline this license offer.

    Do you accept the terms of either license? yes

    Creating qmake. Please wait...
    g++ -c -o project.o -m32 -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/aoip/qt-everywhere-opensource-src-4.7.1/include -I/home/aoip/qt-everywhere-opensource-src-4.7.1/include/QtCore -I/home/aoip/qt-everywhere-opensource-src-4.7.1/src/corelib/global -I/home/aoip/qt-everywhere-opensource-src-4.7.1/src/corelib/xml -I/home/aoip/qt-everywhere-opensource-src-4.7.1/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/aoip/qt-everywhere-opensource-src-4.7.1/mkspecs/linux-g++-32 -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT project.cpp
    g++ -c -o property.o -m32 -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/aoip/qt-everywhere-opensource-src-4.7.1/include -I/home/aoip/qt-everywhere-opensource-src-4.7.1/include/QtCore -I/home/aoip/qt-everywhere-opensource-src-4.7.1/src/corelib/global -I/home/aoip/qt-everywhere-opensource-src-4.7.1/src/corelib/xml -I/home/aoip/qt-everywhere-opensource-src-4.7.1/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/aoip/qt-everywhere-opensource-src-4.7.1/mkspecs/linux-g++-32 -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT property.cpp

    ...
    ...
    ...

    (to be continued)



    • but it is stopping for obscure reason I don't know what to think about :

    g++ -c -o qxmlutils.o -m32 -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/aoip/qt-everywhere-opensource-src-4.7.1/include -I/home/aoip/qt-everywhere-opensource-src-4.7.1/include/QtCore -I/home/aoip/qt-everywhere-opensource-src-4.7.1/src/corelib/global -I/home/aoip/qt-everywhere-opensource-src-4.7.1/src/corelib/xml -I/home/aoip/qt-everywhere-opensource-src-4.7.1/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/aoip/qt-everywhere-opensource-src-4.7.1/mkspecs/linux-g++-32 -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT /home/aoip/qt-everywhere-opensource-src-4.7.1/src/corelib/xml/qxmlutils.cpp
    g++ -o "/home/aoip/qt-everywhere-opensource-src-4.7.1/bin/qmake" project.o property.o main.o makefile.o unixmake2.o unixmake.o mingw_make.o option.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o borland_bmake.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o symbiancommon.o registry.o epocroot.o qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfile.o qfsfileengine_unix.o qfsfileengine_iterator_unix.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlinkedlist.o qurl.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o -m32
    Basic XLib functionality test failed!
    You might need to modify the include and library search paths by editing
    QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/aoip/qt-everywhere-opensource-src-4.7.1/mkspecs/linux-g++-32.
    /home/aoip/qt-everywhere-opensource-src-4.7.1/bin/qmake -spec mkspecs/linux-g++-64 -o Makefile projects.pro
    cd /src/tools/bootstrap/ && /home/aoip/qt-everywhere-opensource-src-4.7.1/bin/qmake /src/tools/bootstrap/bootstrap.pro -spec /home/aoip/qt-everywhere-opensource-src-4.7.1/mkspecs/linux-g++-64 -o Makefile
    Cannot find file: /src/tools/bootstrap/bootstrap.pro.
    gmake: *** [/src/tools/bootstrap/Makefile] Erreur 2
    cd /src/tools/bootstrap/ && /home/aoip/qt-everywhere-opensource-src-4.7.1/bin/qmake /src/tools/bootstrap/bootstrap.pro -spec /home/aoip/qt-everywhere-opensource-src-4.7.1/mkspecs/linux-g++-64 -o Makefile
    Cannot find file: /src/tools/bootstrap/bootstrap.pro.
    gmake: *** [/src/tools/bootstrap/Makefile] Erreur 2
    [root@vbox-fedora14-64b qt-everywhere-opensource-src-4.7.1]#

    • What is "/src/tools/bootstrap/bootstrap.pro" relative to ?

    • What about "Basic XLib functionality test failed!" ?!

    • Following the "Basic XLib functionality test failed!" message, why the make procedure suddenly switches to 64bit compiling mode ?!

    :-(

    I've read the README file as suggested by the "-help" option of the configure script against the "-platform" option, but it is just directing us to a Qt/Nokia link relative to "tier1/2/3" groups of supported platforms, which is not saying anything about what "values" to set for the "-platform" option... Hu ?

    • So, if I'm understanding your last post, I decided to specify "-platform linux-g++-32" to make the build procedure compiling Qt lib sources as 32bit x86 target ? It seems it was "ok" because gcc using "-m32" flag as a result untill the "XLib" problem... Was it supposed to be ok ?

    And I still don't know if "-qvfb" is a valid option for the configure script ?

    And even when I regenerate and relink the "qvfb" tool with my own built Qt lib (64bit by default when not trying to force the -platform option), my generated applications will not connect to the running qvfb... I was supposing that 32bit generated apps cannot connect to a 64bit qvfb, that is the reason I would build my own Qt lib as 32bit x86 target mode, relink my apps with hat own 32bit Qt lib, rebuild/relink the qvfb with that same own 32bit Qt lib, and then, trying to make my 32bit builtQt app run inside qvfb virtual frame buffer.

    Lesser and lesser understanding, still not found the way-out, like a mouse in a maze...

    Alain-Pierre



  • That bootstrap.pro is to .... tada... bootstrap Qt :-) It basically creates some tools that are needed in the further build process.

    So, no working XLib ... it's what it states. Seems you do not have a 32bit version of XLib installed. And now the two well known options: Look if your distro has a 32bit version or compile yourself. But I seriously doubt this is the last library that bails out...

    Did you consider setting up a virtual machine and install a native 32bit version of your Linux distro? That would save you a big bunch of further hassles...



  • I was in fact in opposite situation: I was working on a true Fedora 8 system running on a 3Ghz Pentium 4 pc and I was logging to that linux system with ssh / Putty and X11 rendering on my own workstation (Dell Vostro PC) which is a Win Seven 64 bits powered by a quadcore cpu (2.8 Ghz Core-i7)... This is a little strange, no ?

    All the Qt Creator, qmake and other Qt/Linux tools run on a single cpu and we are using a multicore cpu machine as a X11 rendering terminal...
    So, what I was trying was to "duplicate" the Fedora 8 platform as virtual platform (64bit Ubuntu 10.10 & 64bit Fedora 14) under VirtualBox on the multicore pc workstation to benefit of the multicore power and not having to use Putty which often crashes unexpectingly under Win Seven 64bit !? Or, may be, there is a problem between the XMing server and Putty/SSH ?

    Before Win Seven 64bit, I was using a desktop pc with 32bit Win XP system powered by an Athlon64-X2 cpu and Putty was never crashing...

    IT'S THE REASON why I tried to work with "direct" virtual Linux platforms on my new Win Seven 64 system multicore workstation, and thus, I thought "why not trying modern 64bit Linux platforms like latest Ubuntu and/or Fedora systems with VirtualBox ?

    You know what is the result about 32bit vs 64bit compatibility problems I've been encountering doing so...

    Thus, effectively, I may try a "normal" 32bit Linux platform virtualized by mean of VirtualBox... May be I could simply mirror our true Fedora 8 server as a virtual image being run under VrtualBox...

    What a pity !

    Thank you again Volker for your help which was really valuable concerning Qt libs and tools.

    :-)

    A-P.



  • Hi All,

    I am having the same problem. I am working on X86_64, compiling the C++ files for 32-bit ARM.
    In fact I am using Qt_Embedded.
    @ubuntu:~/qt-target$ make
    cd /src/tools/bootstrap/ && /home/post4pavan/qt-target/bin/qmake /src/tools/bootstrap/bootstrap.pro -spec /home/post4pavan/qt-target/mkspecs/qws/linux-mxc-g++ -o Makefile
    Cannot find file: /src/tools/bootstrap/bootstrap.pro.
    make: *** [/src/tools/bootstrap/Makefile] Error 2@

    I have Xlib dev,dbg needed.
    Could not find what went wrong.
    Please Suggest!


  • Moderators

    I avoid these types of problems by developing in chroot environments, using the schroot debian package to help with the setup.

    Basically I create a separate (32 or 64bit) linux installation on my ubuntu per project I work on. That way I detect dependency changes in projects pretty easily (as each installation only contains the development stuff needed for that project), it allows to test code using different distributions and it greatly simplifies building 32bit software on my 64bit machine. After all is the whole chroot is 32bit then it can not pick up 64bit libraries anywhere;-)

    Debbootstrap is a really simple way to set up such chroots that works great for both debian and ubuntu in all kinds of flavors;-)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.