Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using 32 bits library on 64 bits platforms

Using 32 bits library on 64 bits platforms

Scheduled Pinned Locked Moved General and Desktop
15 Posts 3 Posters 9.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.
  • mistralegnaM Offline
    mistralegnaM Offline
    mistralegna
    wrote on last edited by
    #1

    Hi !

    Another problem about the cross compilation on Linux (Debian Squeeze).

    This time, I have compiled all my application (plugins included) with the correct options (-m32 and some other compiler flags to force 32 bits compilation on 64 bits platforms).

    So, when I perform a :
    file myapplication
    I get something like that : 32 bits LSB executable

    For each of my plugins, I also have the same architecture output :
    32 bits

    When I check the ldd command, either on the application or on the plugins, all of them are linked to the 32 bits versions of Qt libraries.

    Nevertheless, when I try to load one plugin after having lauched the application, I got this problem

    expected build key "i386 Linux g++-4.* full-config", got "x86_64 Linux g++-4.* full-config"

    I didn't manage to find it out !

    Could someone help me ?

    Thanks a lot !

    1 Reply Last reply
    0
    • mistralegnaM Offline
      mistralegnaM Offline
      mistralegna
      wrote on last edited by
      #2

      Did someone solve this issue ? I didn't :(

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jim_kaiser
        wrote on last edited by
        #3

        Well.. did you pass the appropriate makespec to configure? And, thats unusual, I have for some time now, compiled Qt regularly without problem in 32bit on 64bit machine.. mostly on Windows, didn't try this particular combo under Linux, but I might in a day or two. Will update you then.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          Seems that it tries to load the plugins from the wrong path. Did you check the library paths with something like this:

          @
          qDebug() << QApplication::libraryPaths();
          @

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

          1 Reply Last reply
          0
          • mistralegnaM Offline
            mistralegnaM Offline
            mistralegna
            wrote on last edited by
            #5

            Thanks. I try it today and I keep you aware of the results.

            I forgot to precise that I'm using CMake to compile my project.

            But I suppose there exists a command to set the makespec in the cmake tool.

            I'll try to find it that day !

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jim_kaiser
              wrote on last edited by
              #6

              hmm okay... i was talking about the Qt install. I'm guessing, it should be okay to use CMake for your project, don't think the makespec affects this. Just to confirm.. you're trying to create Qt Designer plugins right? I'll post the settings we use, translated to linux, once I get to work.

              1 Reply Last reply
              0
              • mistralegnaM Offline
                mistralegnaM Offline
                mistralegna
                wrote on last edited by
                #7

                The plugins are not Qt designer plugins, just plugins inheriting from an interface, and with a source file declaring the macro Q_EXPORT_PLUGIN2.

                It try to load them using the QPluginLoader. It's during this operation that I have this error.

                Thanks for your reactivity, I'm also on it ;-)

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #8

                  As you are on Linux, there is a relatively easy way to check what's going on:

                  @
                  strace -e trace=file -o file-open-log.txt /path/to/your/application
                  @

                  This leaves a file file-open-log.txt in your current directory. In that, all file system calls are logged (including stat for checking if a file exists). You can check which plugins and libraries are actually pulled into your application.

                  I solved some otherwise mysterious plugin path errors this way.

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

                  1 Reply Last reply
                  0
                  • mistralegnaM Offline
                    mistralegnaM Offline
                    mistralegna
                    wrote on last edited by
                    #9

                    Hi,

                    Breaking news : I manage to load the plugin using the QLibrary object. However, I still have the problem when I use the QPluginLoader object. The only difference between those two objects seems to be :

                    QPluginLoader checks the plugin is linked against the same libraries as the main application, QLibrary doesn't.

                    Do someone know how can I modify the built key using cmake ?

                    1 Reply Last reply
                    0
                    • mistralegnaM Offline
                      mistralegnaM Offline
                      mistralegna
                      wrote on last edited by
                      #10

                      Guys ? No one can help me ?

                      I tried to change the qmakespec, to came back to Qmake compilation (not using the cmake tool).

                      And I still got the same issue. It seems Qt doesn't recognize the plugins have been built using a cross compilation 32 bits on a 64 bits architecture.

                      Could it be a bug of Qt itself ?

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        goetz
                        wrote on last edited by
                        #11

                        I doubt it's a bug of Qt.

                        I would guess for a wrong path to an include file. The build key is defined in QtCore/qconfig.h, it has a #define QT_BUILD_KEY in it. Maybe you pick up the default from your 64 bit system, instead of the adapted for the 32 bit cross compiler?

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

                        1 Reply Last reply
                        0
                        • mistralegnaM Offline
                          mistralegnaM Offline
                          mistralegna
                          wrote on last edited by
                          #12

                          On Qt Debian squeeze, do I have to install some specific 32 bits headers ?

                          Or more generally, how can I pick up the correct build key ?

                          Thanks a lot for your help !

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            goetz
                            wrote on last edited by
                            #13

                            The standard installation would be a 64bit, I guess. If you have built Qt 32 manually it should be in /usr/local/Trolltech/Qt-4.7.x if you used the default path and did a make install. You must make sure that you use the qmake of that path to build your plugin. Also, make sure that none of the system provided include files are used. You can check the command lines of your compiler calls, it must not contain paths to e.g. /usr/include/qt4, as this would be the wrong version.

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

                            1 Reply Last reply
                            0
                            • mistralegnaM Offline
                              mistralegnaM Offline
                              mistralegna
                              wrote on last edited by
                              #14

                              Yes, I got it. Thanks.

                              The matter is I didn't compile Qt manually. And I don't want to. I have to install it from the Debian packages.

                              So, my question was more : on the specified platform, do those 32 bits headers exist in the Debian default packages ? I already run an apt-cache search and I didn't find some obvious file. Do you ?

                              (excuse my poor English, it's not my native language)

                              1 Reply Last reply
                              0
                              • G Offline
                                G Offline
                                goetz
                                wrote on last edited by
                                #15

                                If there is no separate package, I would say: no.

                                But that's getting kind of out of scope for this forum now. To get a definitive answer I would better ask in a Debian forum. I personally have only an older version of Kubuntu running.

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

                                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