Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, March 2008
Building issues


Message 1 in thread

Good day community.


I have some strange problem. I want to make mine application dynamically 
load some interface parts.

So I've decided to create the plugin which will be returning the QWidget 
*reference.

I've linked those as the same project with the directory template. So 
they 're linked to the same libraries.

When I'm loading the plugin on the QAction::triggered signal I'm getting 
the message  

In /home/zipito/workspace_pdt/lex_rpc/plugins/libspr_fiz_lic.so:
  Plugin uses incompatible Qt library (4.3.3) [release]


And when I try to get the QWidget* reference to variable from plugin,  
I'm getting the sigfault error

*** glibc detected *** ./lex_rpc: double free or corruption (out): 
0xbf7ffbf0 ***


I've double checked the linkage of the main lex_rpc executable

[zipito@zipitohost lex_rpc]$ ldd lex_rpc
        linux-gate.so.1 =>  (0x00110000)
        libQtSvg.so.4 => /usr/lib/qt-3.3/lib/libQtSvg.so.4 (0x007a7000)
        libQtXml.so.4 => /usr/lib/qt-3.3/lib/libQtXml.so.4 (0x003df000)
        libQtOpenGL.so.4 => /usr/lib/qt-3.3/lib/libQtOpenGL.so.4 
(0x001d7000)
        libQtGui.so.4 => /usr/lib/qt-3.3/lib/libQtGui.so.4 (0x02e9f000)
        libQtNetwork.so.4 => /usr/lib/qt-3.3/lib/libQtNetwork.so.4 
(0x00c25000)
        libQtCore.so.4 => /usr/lib/qt-3.3/lib/libQtCore.so.4 (0x0740f000)
        libGLU.so.1 => /usr/lib/libGLU.so.1 (0x0028e000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0x00164000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00772000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x02aac000)
        libm.so.6 => /lib/libm.so.6 (0x00740000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00dc5000)
        libc.so.6 => /lib/libc.so.6 (0x005e5000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00ab1000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0x00d91000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0x00d44000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0x00c1a000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0x009ef000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00b16000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x009e8000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00b0a000)
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00aab000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00a1d000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00ad9000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x004dc000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x00899000)
        libz.so.1 => /lib/libz.so.1 (0x0078d000)
        libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0x004f2000)
        librt.so.1 => /lib/librt.so.1 (0x0099b000)
        libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x07828000)
        libdl.so.2 => /lib/libdl.so.2 (0x0076b000)
        libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x0015d000)
        libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00dd3000)
        libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00d37000)
        /lib/ld-linux.so.2 (0x005c6000)
        libexpat.so.1 => /lib/libexpat.so.1 (0x009fa000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x007a2000)
        libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x00506000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00873000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00891000)


And of the plugin:

[zipito@zipitohost lex_rpc]$ ldd ./plugins/libspr_fiz_lic.so
        linux-gate.so.1 =>  (0x00110000)
        libQtXml.so.4 => /usr/lib/qt-3.3/lib/libQtXml.so.4 (0x00114000)
        libQtGui.so.4 => /usr/lib/qt-3.3/lib/libQtGui.so.4 (0x005e3000)
        libQtNetwork.so.4 => /usr/lib/qt-3.3/lib/libQtNetwork.so.4 
(0x0016f000)
        libQtCore.so.4 => /usr/lib/qt-3.3/lib/libQtCore.so.4 (0x00201000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00383000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0039c000)
        libm.so.6 => /lib/libm.so.6 (0x00487000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x004b0000)
        libc.so.6 => /lib/libc.so.6 (0x00d95000)
        libz.so.1 => /lib/libz.so.1 (0x004bc000)
        libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0x004cf000)
        librt.so.1 => /lib/librt.so.1 (0x004d4000)
        libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x004dd000)
        libdl.so.2 => /lib/libdl.so.2 (0x005a8000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00eee000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0x005ad000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0x00f14000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0x005b6000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00f2e000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x005bf000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00f37000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00f3c000)
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00f46000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00f49000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00fd5000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x01e25000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x03d7d000)
        /lib/ld-linux.so.2 (0x005c6000)
        libexpat.so.1 => /lib/libexpat.so.1 (0x02067000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x04bc2000)
        libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x04bb2000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x04d52000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x04bf2000)

So as you can see the lex_rpc and libspr_fiz_lic.so are linked to the 
same libraries!!!

I'm stub!..

Best regards,
 Ilya Dyoshin.

Message 2 in thread

Hi,

> I have some strange problem. I want to make mine application dynamically 
> load some interface parts.
> 
> So I've decided to create the plugin which will be returning the QWidget 
> *reference.
> 
> I've linked those as the same project with the directory template. So 
> they 're linked to the same libraries.
> 
> When I'm loading the plugin on the QAction::triggered signal I'm getting 
> the message  
> 
> In /home/zipito/workspace_pdt/lex_rpc/plugins/libspr_fiz_lic.so:
>   Plugin uses incompatible Qt library (4.3.3) [release]

The code producing this message compares the version of the Qt libraries the 
plugin was *built* against and the version of the Qt libraries the application 
was *built* with:

if ((qt_version > QT_VERSION) || ((QT_VERSION & 0xff0000) > (qt_version & 
0xff0000))) {

Have you upgraded Qt between building the plugin and building the application? 
If so, what happens if you rebuild both the plugin and the application against 
  the current version of Qt?

> And when I try to get the QWidget* reference to variable from plugin,  
> I'm getting the sigfault error
> 
> *** glibc detected *** ./lex_rpc: double free or corruption (out): 
> 0xbf7ffbf0 ***

If the plugin has not been loaded correctly, anything can happen.

> I've double checked the linkage of the main lex_rpc executable
> 
> [zipito@zipitohost lex_rpc]$ ldd lex_rpc
>         linux-gate.so.1 =>  (0x00110000)
>         libQtSvg.so.4 => /usr/lib/qt-3.3/lib/libQtSvg.so.4 (0x007a7000)
>         [...]

By the way, why install Qt 4 in /usr/lib/qt-3.3?

> So as you can see the lex_rpc and libspr_fiz_lic.so are linked to the 
> same libraries!!!

Yes, but this is at run-time. As far as I can see the plugin infrastructure 
compares Qt versions used at build-time.

--
 [ signature omitted ] 

Message 3 in thread

Thank you for your time.

The problem was with linking of the plugin. In plugin I use the
QxtXmlRpcClient class, which wasn't correctly linked to the plugin (I'm
using the static linkage inside the main lex_rpc application and no such
static linkage inside the plugin). I've fixed that and all problems with
incompatible libraries disapeeared.

But pretty strange 'cause the linker haven't rised the error about
absent methods when linking the plugin.

Thanks.
Best regards,
Ilya Dyoshin.



Dimitri ÐÐÑÐÑ:
> Hi,
>
>> I have some strange problem. I want to make mine application 
>> dynamically load some interface parts.
>>
>> So I've decided to create the plugin which will be returning the 
>> QWidget *reference.
>>
>> I've linked those as the same project with the directory template. So 
>> they 're linked to the same libraries.
>>
>> When I'm loading the plugin on the QAction::triggered signal I'm 
>> getting the message 
>> In /home/zipito/workspace_pdt/lex_rpc/plugins/libspr_fiz_lic.so:
>>   Plugin uses incompatible Qt library (4.3.3) [release]
>
> The code producing this message compares the version of the Qt 
> libraries the plugin was *built* against and the version of the Qt 
> libraries the application was *built* with:
>
> if ((qt_version > QT_VERSION) || ((QT_VERSION & 0xff0000) > 
> (qt_version & 0xff0000))) {
>
> Have you upgraded Qt between building the plugin and building the 
> application? If so, what happens if you rebuild both the plugin and 
> the application against  the current version of Qt?
>
>> And when I try to get the QWidget* reference to variable from 
>> plugin,  I'm getting the sigfault error
>>
>> *** glibc detected *** ./lex_rpc: double free or corruption (out): 
>> 0xbf7ffbf0 ***
>
> If the plugin has not been loaded correctly, anything can happen.
>
>> I've double checked the linkage of the main lex_rpc executable
>>
>> [zipito@zipitohost lex_rpc]$ ldd lex_rpc
>>         linux-gate.so.1 =>  (0x00110000)
>>         libQtSvg.so.4 => /usr/lib/qt-3.3/lib/libQtSvg.so.4 (0x007a7000)
>>         [...]
>
> By the way, why install Qt 4 in /usr/lib/qt-3.3?
>
>> So as you can see the lex_rpc and libspr_fiz_lic.so are linked to the 
>> same libraries!!!
>
> Yes, but this is at run-time. As far as I can see the plugin 
> infrastructure compares Qt versions used at build-time.
>
> -- 
> Dimitri
>
> -- 
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>


--
 [ signature omitted ]