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

Qt-jambi-interest Archive, February 2007
Symbol not found error in designer with Beta


Message 1 in thread

When I run the designer that is shipped with the beta from the command line 
and tell it to create a simple Main Window which I then throw away by closing
the designer I get the following error message on the console:-

/usr/local/share/qtjambi-linux-1.0.0-beta/bin/designer: symbol lookup 
error: /usr/local/share/qtjambi-linux-1.0.0-beta/bin/designer: undefined 
symbol: _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent

This did not seem to get in the way of running the system, but I suppose
it might be related to an error I get in Eclipse where I get:-

Unable to create 
view: /usr/local/callisto/eclipse/plugins/com.trolltech.qtdesigner.linux.x86_0.0.4/lib/libqtdesigner.so: /usr/local/callisto/eclipse/plugins/com.trolltech.qtdesigner.linux.x86_0.0.4/lib/libqtdesigner.so: 
undefined symbol: _ZN20QEventDispatcherGlibC2EP13_GMainContextP7QObject

in the slot editor and property editor windows.  

I had removed the old preview code from the Eclipse and unpacked the new,
and it claimed to have done that correctly.

From the About Eclipse panel I get in the plugins section:-

com.trolltech.qtdesigner (0.0.4) "Qt Designer Plugin" [Active]
com.trolltech.qtdesigner.linux.x86 (0.0.4) "Qt Designer Fragment (Linux,x86)" 
[Resolved]
com.trolltech.qtjambi (0.0.4) "Qt Jambi Plugin" [Active]

and all three appear in the list of configured plugins.

This is running on a Debian unstable system running a 2.6.18 kernel.  

David


Message 2 in thread

David Goodenough wrote:
> When I run the designer that is shipped with the beta from the command line 
> and tell it to create a simple Main Window which I then throw away by closing
> the designer I get the following error message on the console:-
> 
> /usr/local/share/qtjambi-linux-1.0.0-beta/bin/designer: symbol lookup 
> error: /usr/local/share/qtjambi-linux-1.0.0-beta/bin/designer: undefined 
> symbol: _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent

That symbol should definitly be present int he QtCore4.so file. Do you 
have any other versions of Qt on your system that might conflict with 
the Qt Jambi one?

-
Gunnar


Message 3 in thread

On Thursday 08 February 2007 13:31, Gunnar Sletta wrote:
> David Goodenough wrote:
> > When I run the designer that is shipped with the beta from the command
> > line and tell it to create a simple Main Window which I then throw away
> > by closing the designer I get the following error message on the
> > console:-
> >
> > /usr/local/share/qtjambi-linux-1.0.0-beta/bin/designer: symbol lookup
> > error: /usr/local/share/qtjambi-linux-1.0.0-beta/bin/designer: undefined
> > symbol: _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent
>
> That symbol should definitly be present int he QtCore4.so file. Do you
> have any other versions of Qt on your system that might conflict with
> the Qt Jambi one?
>
> -
> Gunnar
I do have the debian libqt4* packages installed (4.2.1).  Presumably I need
to put the .so files in the 
/usr/local/callisto/eclipse/plugins/com.trolltech.qtdesigner.linux.x86_0.0.4/lib
directory into before the others for running designer on its own or for 
running eclipse with Jambi support.  I suppose I had assumed that it would 
load its own in preference to the global ones but obviously that directory
gets added to the end of the library path.

David


Message 4 in thread

Hi, David.

David Goodenough wrote:

>>>When I run the designer that is shipped with the beta from the command
>>>line and tell it to create a simple Main Window which I then throw away
>>>by closing the designer I get the following error message on the
>>>console:-
>>>
>>>/usr/local/share/qtjambi-linux-1.0.0-beta/bin/designer: symbol lookup
>>>error: /usr/local/share/qtjambi-linux-1.0.0-beta/bin/designer: undefined
>>>symbol: _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent
>>>      
>>>
>>That symbol should definitly be present int he QtCore4.so file. Do you
>>have any other versions of Qt on your system that might conflict with
>>the Qt Jambi one?
>>
>>    
>>
>I do have the debian libqt4* packages installed (4.2.1).  Presumably I need
>to put the .so files in the 
>/usr/local/callisto/eclipse/plugins/com.trolltech.qtdesigner.linux.x86_0.0.4/lib
>directory into before the others for running designer on its own or for 
>running eclipse with Jambi support.  I suppose I had assumed that it would 
>load its own in preference to the global ones but obviously that directory
>gets added to the end of the library path.
>  
>

In order to get Eclipse running with Jambi support, you will have to set 
you LD_LIBRARY_PATH to path/to/jambi/lib.

In order to run designer on its own, it should be sufficient to run the 
designer.sh script which is contained in the package. Have you tried 
this, and does it not work?

-- Eskil


Message 5 in thread

On Thursday 08 February 2007 14:54, Eskil A. Blomfeldt wrote:
> Hi, David.
>
> David Goodenough wrote:
> >>>When I run the designer that is shipped with the beta from the command
> >>>line and tell it to create a simple Main Window which I then throw away
> >>>by closing the designer I get the following error message on the
> >>>console:-
> >>>
> >>>/usr/local/share/qtjambi-linux-1.0.0-beta/bin/designer: symbol lookup
> >>>error: /usr/local/share/qtjambi-linux-1.0.0-beta/bin/designer: undefined
> >>>symbol: _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent
> >>
> >>That symbol should definitly be present int he QtCore4.so file. Do you
> >>have any other versions of Qt on your system that might conflict with
> >>the Qt Jambi one?
> >
> >I do have the debian libqt4* packages installed (4.2.1).  Presumably I
> > need to put the .so files in the
> >/usr/local/callisto/eclipse/plugins/com.trolltech.qtdesigner.linux.x86_0.0
> >.4/lib directory into before the others for running designer on its own or
> > for running eclipse with Jambi support.  I suppose I had assumed that it
> > would load its own in preference to the global ones but obviously that
> > directory gets added to the end of the library path.
>
> In order to get Eclipse running with Jambi support, you will have to set
> you LD_LIBRARY_PATH to path/to/jambi/lib.
>
> In order to run designer on its own, it should be sufficient to run the
> designer.sh script which is contained in the package. Have you tried
> this, and does it not work?

Well I had not tried it, but I just did and it has a bug in it.  At the start
you find the current directory, and use that to adjust various environment
variables, and run bin/designer rather than $me/bin/designer, so it only 
runs from the jambi directory in which case all the finding the current
directory seems rather pointless.

However it also seems to have another problem.  I have java in the path, java
-version gives:-

java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

but it designer.sh complains with:-

david@stargate:/usr/local/share/qtjambi-linux-1.0.0-beta$ ./designer.sh
Jambi: failed to load: '/jre/lib/i386//client/libjvm.so'
./designer.sh: line 17:  3819 Segmentation fault      PATH=$me/bin:$PATH 
LD_LIBRARY_PATH=$me/lib:$LD_LIBRARY_PATH QT_PLUGIN_PATH=$me/plugins 
CLASSPATH=$me/qtjambi.jar:$me bin/designer

This may be to do with the way that Debian alternatives works.  Interestingly
this does NOT happen if you just start $me/bin/designer manually.

However running LD_LIBRARY_PATH=lib:$LD_LIBRARY_PATH bin/designer does work
and gets rid of the problem I reported in the first note.

David

> -- Eskil


Message 6 in thread

Hi, David.

David Goodenough wrote:

>but it designer.sh complains with:-
>
>david@stargate:/usr/local/share/qtjambi-linux-1.0.0-beta$ ./designer.sh
>Jambi: failed to load: '/jre/lib/i386//client/libjvm.so'
>./designer.sh: line 17:  3819 Segmentation fault      PATH=$me/bin:$PATH 
>LD_LIBRARY_PATH=$me/lib:$LD_LIBRARY_PATH QT_PLUGIN_PATH=$me/plugins 
>CLASSPATH=$me/qtjambi.jar:$me bin/designer
>
>  
>

I see. The reason this only happens with the designer.sh file is because 
it sets the $QT_PLUGIN_PATH environment variable to make Designer load 
the Qt Jambi plugins. This will in turn need to bind against your JVM 
library in order for you to get e.g. custom widgets. Something here 
seems to have gone wrong. We will look into this, but could you try 
setting the $JAVADIR environment variable as well. This should point to 
the installation directory of your Java installation, so that

    $JAVADIR/jre/lib/i386/client/libjvm.so

is an existing file.

Does this work?

Sorry about this =)
Eskil



Message 7 in thread

On Thursday 08 February 2007 15:28, Eskil A. Blomfeldt wrote:
> Hi, David.
>
> David Goodenough wrote:
> >but it designer.sh complains with:-
> >
> >david@stargate:/usr/local/share/qtjambi-linux-1.0.0-beta$ ./designer.sh
> >Jambi: failed to load: '/jre/lib/i386//client/libjvm.so'
> >./designer.sh: line 17:  3819 Segmentation fault      PATH=$me/bin:$PATH
> >LD_LIBRARY_PATH=$me/lib:$LD_LIBRARY_PATH QT_PLUGIN_PATH=$me/plugins
> >CLASSPATH=$me/qtjambi.jar:$me bin/designer
>
> I see. The reason this only happens with the designer.sh file is because
> it sets the $QT_PLUGIN_PATH environment variable to make Designer load
> the Qt Jambi plugins. This will in turn need to bind against your JVM
> library in order for you to get e.g. custom widgets. Something here
> seems to have gone wrong. We will look into this, but could you try
> setting the $JAVADIR environment variable as well. This should point to
> the installation directory of your Java installation, so that
>
>     $JAVADIR/jre/lib/i386/client/libjvm.so
>
> is an existing file.
>
> Does this work?
>
> Sorry about this =)
> Eskil
Yes this works a lot better.  There is an exception logged, but all I did
was to open designer, close the wizard and close the app, so this could be
normal behaviour:-

 export JAVADIR=/usr/lib/j2sdk1.5-sun/
david@stargate:/usr/local/share/qtjambi-linux-1.0.0-beta$ ./designer.sh
QtJambiTypeManager::getInternalTypeName: Couldn't find internal type name 
of 'java/lang/Object'
QtJambi: Exception pending in native codeException in thread "main" 
java.lang.NullPointerException
        at 
com.trolltech.tools.designer.ResourceBrowser.disposed(ResourceBrowser.java:14)

However not being able to find java/lang/Object does look a bit of a problem.

David


Message 8 in thread

On Thursday 08 February 2007 15:36, David Goodenough wrote:
> On Thursday 08 February 2007 15:28, Eskil A. Blomfeldt wrote:
> > Hi, David.
> >
> > David Goodenough wrote:
> > >but it designer.sh complains with:-
> > >
> > >david@stargate:/usr/local/share/qtjambi-linux-1.0.0-beta$ ./designer.sh
> > >Jambi: failed to load: '/jre/lib/i386//client/libjvm.so'
> > >./designer.sh: line 17:  3819 Segmentation fault      PATH=$me/bin:$PATH
> > >LD_LIBRARY_PATH=$me/lib:$LD_LIBRARY_PATH QT_PLUGIN_PATH=$me/plugins
> > >CLASSPATH=$me/qtjambi.jar:$me bin/designer
> >
> > I see. The reason this only happens with the designer.sh file is because
> > it sets the $QT_PLUGIN_PATH environment variable to make Designer load
> > the Qt Jambi plugins. This will in turn need to bind against your JVM
> > library in order for you to get e.g. custom widgets. Something here
> > seems to have gone wrong. We will look into this, but could you try
> > setting the $JAVADIR environment variable as well. This should point to
> > the installation directory of your Java installation, so that
> >
> >     $JAVADIR/jre/lib/i386/client/libjvm.so
> >
> > is an existing file.
> >
> > Does this work?
> >
> > Sorry about this =)
> > Eskil
>
> Yes this works a lot better.  There is an exception logged, but all I did
> was to open designer, close the wizard and close the app, so this could be
> normal behaviour:-
>
>  export JAVADIR=/usr/lib/j2sdk1.5-sun/
> david@stargate:/usr/local/share/qtjambi-linux-1.0.0-beta$ ./designer.sh
> QtJambiTypeManager::getInternalTypeName: Couldn't find internal type name
> of 'java/lang/Object'
> QtJambi: Exception pending in native codeException in thread "main"
> java.lang.NullPointerException
>         at
> com.trolltech.tools.designer.ResourceBrowser.disposed(ResourceBrowser.java:
>14)
>
> However not being able to find java/lang/Object does look a bit of a
> problem.
>
> David
I just tried adding the same LD_LIBRARY_PATH into my eclipse startup script
and this does NOT cure the problem.  I have heard that eclipse is kind of
fussy about library paths.  I already had one entry in LD_LIBRARY_PATH, which
was for mozilla-firefox extensions (I think this was for use with an plugin
which handled XUI), so I added it to the end of that with a colon between
the two.

David


Message 9 in thread

Hi, David.

David Goodenough wrote:

>> export JAVADIR=/usr/lib/j2sdk1.5-sun/
>>david@stargate:/usr/local/share/qtjambi-linux-1.0.0-beta$ ./designer.sh
>>QtJambiTypeManager::getInternalTypeName: Couldn't find internal type name
>>of 'java/lang/Object'
>>QtJambi: Exception pending in native codeException in thread "main"
>>java.lang.NullPointerException
>>        at
>>com.trolltech.tools.designer.ResourceBrowser.disposed(ResourceBrowser.java:
>>14)
>>However not being able to find java/lang/Object does look a bit of a
>>problem.
>>    
>>

Yes, I can reproduce this. It does not seem to affect the use of 
Designer, but we'll work get it sorted out for the next version.

>I just tried adding the same LD_LIBRARY_PATH into my eclipse startup script
>and this does NOT cure the problem.  I have heard that eclipse is kind of
>fussy about library paths.  I already had one entry in LD_LIBRARY_PATH, which
>was for mozilla-firefox extensions (I think this was for use with an plugin
>which handled XUI), so I added it to the end of that with a colon between
>the two.
>  
>

I'm assuming this is regarding the missing symbol for the 
QEventDispatcherGlib constructor that takes a _GMainContext and a 
QObject? This constructor was added specifically to fix a problem 
discovered when testing the Eclipse integration, and was not present in 
Qt 4.2 or earlier versions, so it would seem like Eclipse is trying to 
load some incompatible Qt libraries. In the "About Eclipse SDK" dialog 
there's a button reading "Configuration Details". Could you click this 
and check what "java.library.path" is set to, please? If that does not 
help, could you try running ldd on the libqtdesigner.so file with the 
same environment as the one in which you are running Eclipse?

-- Eskil


Message 10 in thread

On Friday 09 February 2007 10:08, Eskil A. Blomfeldt wrote:
> Hi, David.
>
> David Goodenough wrote:
> >> export JAVADIR=/usr/lib/j2sdk1.5-sun/
> >>david@stargate:/usr/local/share/qtjambi-linux-1.0.0-beta$ ./designer.sh
> >>QtJambiTypeManager::getInternalTypeName: Couldn't find internal type name
> >>of 'java/lang/Object'
> >>QtJambi: Exception pending in native codeException in thread "main"
> >>java.lang.NullPointerException
> >>        at
> >>com.trolltech.tools.designer.ResourceBrowser.disposed(ResourceBrowser.jav
> >>a: 14)
> >>However not being able to find java/lang/Object does look a bit of a
> >>problem.
>
> Yes, I can reproduce this. It does not seem to affect the use of
> Designer, but we'll work get it sorted out for the next version.
>
> >I just tried adding the same LD_LIBRARY_PATH into my eclipse startup
> > script and this does NOT cure the problem.  I have heard that eclipse is
> > kind of fussy about library paths.  I already had one entry in
> > LD_LIBRARY_PATH, which was for mozilla-firefox extensions (I think this
> > was for use with an plugin which handled XUI), so I added it to the end
> > of that with a colon between the two.
>
> I'm assuming this is regarding the missing symbol for the
> QEventDispatcherGlib constructor that takes a _GMainContext and a
> QObject? This constructor was added specifically to fix a problem
> discovered when testing the Eclipse integration, and was not present in
> Qt 4.2 or earlier versions, so it would seem like Eclipse is trying to
> load some incompatible Qt libraries. In the "About Eclipse SDK" dialog
> there's a button reading "Configuration Details". Could you click this
> and check what "java.library.path" is set to, please? If that does not
> help, could you try running ldd on the libqtdesigner.so file with the
> same environment as the one in which you are running Eclipse?
>
> -- Eskil
OK, I fixed this one.  I was adding the wrong path to the library path
(I was adding the plugin lib path, not the qtjambi lib path).  That fixed
that problem but now it crashes Eclipse.  This may be a stack/memory 
problem so I will experiment with adding some options to the Eclipse startup.

David


Message 11 in thread

Hi, David.

David Goodenough wrote:

>OK, I fixed this one.  I was adding the wrong path to the library path
>(I was adding the plugin lib path, not the qtjambi lib path).  That fixed
>that problem but now it crashes Eclipse.  This may be a stack/memory 
>problem so I will experiment with adding some options to the Eclipse startup.
>  
>

Hmm, odd. Are you getting a crash log for this that I could look at, 
possibly?

-- Eskil