Error ** $Id: TGQt.cxx 2 After update UBUNTU 9.10 -Qt4 vs 5

Hello, When I had ubuntu 9.04 and Root 5.22 all my programs Qt+Root worked well. But after my update 9.10 my applications doesn’t work!
Separately, all works and root application or Qt4 application! But when I’m trying run together, I got error:

** $Id: TGQt.cxx 26689 2008-12-06 07:03:04Z brun $ this=0x1fec810
 *** Break *** segmentation violation
Attaching to program: /proc/4580/exe, process 4580

May be anybody knows : What happened ?
My simple application for check.

Thanks!
HelloWord.cxx (1.14 KB)

I can not reproduce your issue.

Can you say how your application was built?
In addition, can you invoke

ldd HelloWordand upload the output.
I’ve re-built my test examples:
[ul] root.bnl.gov/QtRoot/root/qtExamples/HelloWord/
root.bnl.gov/QtRoot/root/qtExamples/HelloCanvas/[/ul]I found no problem yet.
Thank you

I’ve tried to compile your version of the code and got the compilation error

[rcas6002] ~/<1>expert/RootForum/2010.01.29/HelloCanvas/> make g++ -c -m32 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/afs/rhic.bnl.gov/@sys/opt/star/sl53_gcc432/qt4.4/mkspecs/linux-g++-32 -I. -I/afs/rhic.bnl.gov/@sys/opt/star/sl53_gcc432/qt4.4/include/QtCore -I/afs/rhic.bnl.gov/@sys/opt/star/sl53_gcc432/qt4.4/include/QtCore -I/afs/rhic.bnl.gov/@sys/opt/star/sl53_gcc432/qt4.4/include/QtGui -I/afs/rhic.bnl.gov/@sys/opt/star/sl53_gcc432/qt4.4/include/QtGui -I/afs/rhic.bnl.gov/@sys/opt/star/sl53_gcc432/qt4.4/include/Qt3Support -I/afs/rhic.bnl.gov/@sys/opt/star/sl53_gcc432/qt4.4/include/Qt3Support -I/afs/rhic.bnl.gov/@sys/opt/star/sl53_gcc432/qt4.4/include -I/afs/rhic.bnl.gov/star/packages/.DEV2/.sl53_gcc432/include -I/afs/rhic.bnl.gov/star/ROOT/5.99.99/.sl53_gcc432/rootdeb/include -I. -I. -o HelloCanvas.o HelloCanvas.cxx HelloCanvas.cxx: In function ‘int main(int, char**)’: HelloCanvas.cxx:9: error: invalid use of incomplete type ‘struct QApplication’ /afs/rhic.bnl.gov/@sys/opt/star/sl53_gcc432/qt4.4/include/QtGui/qwindowdefs.h:83: error: forward declaration of ‘struct QApplication’ HelloCanvas.cxx:10: error: invalid use of incomplete type ‘struct QApplication’ /afs/rhic.bnl.gov/@sys/opt/star/sl53_gcc432/qt4.4/include/QtGui/qwindowdefs.h:83: error: forward declaration of ‘struct QApplication’ HelloCanvas.cxx:38: error: invalid use of incomplete type ‘struct QApplication’ /afs/rhic.bnl.gov/@sys/opt/star/sl53_gcc432/qt4.4/include/QtGui/qwindowdefs.h:83: error: forward declaration of ‘struct QApplication’
Can you download and run QtRoot test suite?
See root.bnl.gov/QtRoot/How2Install4Unix.html

Hi fine, thanks for your help. I still continue recieving this error and your “HelloWorld” too.
I done ldd QTSimpleRoot. Results in file.
I downloaded tqrootexample from root.bnl.gov/QtRoot/downloads and I recieve this message:
Project MESSAGE: No ROOT Qt Extension was found. Use Qt-layer instead
What I should be doing now ?
Error.txt (3.75 KB)

[quote=“Annega”]Hi fine, thanks for your help. I still continue recieving this error and your “HelloWorld” too. [/quote] It is a pity :cry: . I suspect you did not compile the source code properly.Can you provide step-by-step instruction that I can use to reproduce your trouble?

[quote=“Annega”]I done ldd QTSimpleRoot. Results in file.[/quote]I did not understand :blush: yet what “QTSimpleRoot” :unamused: is . You did not mention it before. [quote=“Annega”]I downloaded tqrootexample from root.bnl.gov/QtRoot/downloads and I recieve this message:
Project MESSAGE: No ROOT Qt Extension was found. Use Qt-layer insteadWhat I should be doing now ?[/quote]I did not understand :blush: what you downloaded from “downloads” directory. Anyway, each QtRoot subtest is provided with README file explaining what should be done. I suspect the next step should be “make”.
However, . . .
To help you I need my previous questions to be answered :bulb: first?
The first question was[quote=“Valeri Fine”]. . . Can you say how your application was built?[/quote]Can you show?
I did not ask for " ldd QTSimpleRoot". I do not know what QTSimpleRoot is.
I did ask [quote=“Valeri Fine”] Can you download and run QtRoot test suite?
See root.bnl.gov/QtRoot/How2Install4Unix.html[/quote]Did you attend that page? Did you try to follow it?
Can you provide step-by-step instruction that I can use to reproduce your trouble?

Hello fine, you’re right! :slight_smile: )

If I’m doing so :

  1. qmake-qt4 HelloWord.pro
  2. make
  3. ./HelloWord
    All work very well! But If I’m doing otherwise:
  4. g++ root-config --cflags --glibs -I$QTDIR/include -DQT_GUI_LIB -DQT_CORE_LIB -L$QTDIR/lib -lQtCore -lQtGui HelloWord.cxx -o HelloWord
    I got this error:
HelloWord.cxx:2:29: error: QtGui/QPushButton: No such file or directory
HelloWord.cxx: In function ‘int main(int, char**)’:
HelloWord.cxx:9: error: ‘QPushButton’ was not declared in this scope
HelloWord.cxx:9: error: expected ‘;’ before ‘hello’
HelloWord.cxx:10: error: ‘hello’ was not declared in this scope

I don’t know why that… :confused:

[quote]
Valeri Fine wrote:
Can you download and run QtRoot test suite?
See root.bnl.gov/QtRoot/How2Install4Unix.html
Did you attend that page? Did you try to follow it?
Can you provide step-by-step instruction that I can use to reproduce your trouble?[/quote]
I’m not sure may be I not right understood your idea ?
I did this:
I downloaded qtExamples, I done qmake, make and got error:

annega@annega-desktop:~/qtRoot/qtExamples$ qmake CONFIG+=debug
Project MESSAGE: This project us to build HelloCanvas HelloWord HelloClick HelloZoomer ex1/tqrootexample.pro HelloLife Qt4/CustomWidgets Qt4/HelloFileBrowser Qt4/HelloSignal Qt/Root examples
annega@annega-desktop:~/qtRoot/qtExamples$ make
cd HelloCanvas && qmake HelloCanvas.pro "CONFIG+=debug" -o Makefile
cd HelloCanvas && make -f Makefile
make[1]: Entering directory `/home/annega/qtRoot/qtExamples/HelloCanvas'
g++ -c -pipe -g -Wall -W -O0 -D_REENTRANT  -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -I/usr/share/qt3/mkspecs/default -I. -I"/home/annega/root//include" -I/usr/include/qt3 -o HelloCanvas.o HelloCanvas.cxx
HelloCanvas.cxx:13:18: error: QLabel: No such file or directory
In file included from HelloCanvas.cxx:9:
/home/annega/root//include/TQtWidget.h: In member function ‘int TQtWidgetBuffer::Height() const’:
/home/annega/root//include/TQtWidget.h:89: error: ‘class QPaintDevice’ has no member named ‘height’
/home/annega/root//include/TQtWidget.h: In member function ‘int TQtWidgetBuffer::Width() const’:
/home/annega/root//include/TQtWidget.h:90: error: ‘class QPaintDevice’ has no member named ‘width’
HelloCanvas.cxx: In function ‘int main(int, char**)’:
HelloCanvas.cxx:24: error: ‘class TQtWidget’ has no member named ‘setToolTip’
HelloCanvas.cxx:53: error: ‘QLabel’ was not declared in this scope
HelloCanvas.cxx:53: error: ‘label’ was not declared in this scope
HelloCanvas.cxx:53: error: expected type-specifier before ‘QLabel’
HelloCanvas.cxx:53: error: expected ‘;’ before ‘QLabel’
make[1]: *** [HelloCanvas.o] Error 1
make[1]: Leaving directory `/home/annega/qtRoot/qtExamples/HelloCanvas'
make: *** [sub-HelloCanvas] Error 2

It should be noted that If I’m doing this with qmake-qt4 and make I get the same error. Maybe error with my Qt4 ? :confused:

I not clearly expressed his thoughts :slight_smile: ))
I’m trying run this simple application:
root.bnl.gov/QtRoot/downloads/qt … ect.tar.gz
I’m doing all step by step like in README file:

  1. Download and unpack the Qt project directory
  2. “Un-tar” the archive
  3. To create the your platform makefile:"qmake-qt4 tqrootexample.pro"
    and I got error:

qtRootProject$ qmake-qt4 tqrootexample.pro 
Project MESSAGE: No ROOT Qt Extension was found. Use Qt-layer instead
uic: File generated with too old version of Qt Designer (3.3)

I have not installed QtDesigner 3, I have installed QtDesigner 4! Maybe I should do install QtDesigner 3?

My impression that there is no QTDIR environment variable defined at all in your build / run-time environment that the project files and shell scripts rely on.

Can you print it out?

On the other hand, there are likely Qt3 as well as Qt4 flavors side by side installed on your system and you are picking one to build your program and another one to run it. It is hard to say more precisely.
May be you can find some sysadmin around to help you to sort things out.

Another way is to install the Qt version yourself. This way you will know what is going.
You may just use the script the page root.bnl.gov/QtRoot/How2Install4Unix.html describes. It can build all components and set the environment. It takes time. However, it takes the PC time. This discussion takes time too.

[quote=“Annega”]I’m trying run this simple application:
root.bnl.gov/QtRoot/downloads/qt … ect.tar.gz
[/quote]Can you do root.bnl.gov/QtRoot/How2Install4 … Complement
or

cvs -d :pserver:cvsuser@cvs.bnl.gov:/data01/CVS login # do this at once password: cvsuser cvs -d :pserver:cvsuser@cvs.bnl.gov:/data01/CVS co -d qtExamples root/qtExamplesto get the fresh version?
However, I strongly recommend to follow: root.bnl.gov/QtRoot/How2Install4 … Complement
Since your issue is not ROOT related I would advise to seek support via the dedicated mail list lists.bnl.gov/mailman/listinfo/qt-root-l