PDA

View Full Version : errors while installing Qt4.2 in Linux



nimmyj
6th December 2006, 07:48
hi,
I am getting errors while trying to install Qt4.2 open source software in linux.
one of the error was "leaving the directory".can any one tell the procedure to install in linux

wysota
6th December 2006, 09:59
"Leaving the directory" in not an error, just a message what make is currently doing. If you have any errors, they are probably earlier in the log.

nimmyj
7th December 2006, 13:39
hi,
I was trying to install Qt4.2 in Linux.Icame accross many Problems.i 'm giving the errors i got while installing.Hope some body can help me.
Plzzzzz Help



[root@localhost qt-x11-eval-src-4.2.0]# gmake
cd src && gmake -f Makefile
gmake[1]: Entering directory `/home/nimmyj/qt-x11-eval-src-4.2.0/src'
cd tools/moc && gmake -f Makefile
gmake[2]: Entering directory `/home/nimmyj/qt-x11-eval-src-4.2.0/src/tools/moc'
g++ -c -pipe -O2 -Wall -W -DQT_BOOTSTRAPPED -DQT_MOC -DQT_NO_CODECS -DQT_LITE_UNICODE -DQT_NO_LIBRARY -DQT_NO_STL -DQT_NO_COMPRESS -DQT_NO_DATASTREAM -DQT_NO_TEXTSTREAM -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_THREAD -DQT_NO_REGEXP
-DQT_NO_QOBJECT -DQT_NO_SYSTEMLOCALE -I../../../mkspecs/linux-g++ -I. -I../../corelib/arch/generic -I/include -I. -I/include/QtCore -I. -o ./moc.o moc.cpp
In file included from moc.h:25,
from moc.cpp:22:
parser.h:25:18: QStack: No such file or directory
In file included from parser.h:26,
from moc.h:25,
from moc.cpp:22:
symbols.h:26:19: QString: No such file or directory
symbols.h:27:17: QHash: No such file or directory
symbols.h:28:19: QVector: No such file or directory
symbols.h:29:18: QDebug: No such file or directory
In file included from parser.h:26,
from moc.h:25,
from moc.cpp:22:
symbols.h:36: parse error before `&' token
symbols.h:36: missing ';' before right brace
symbols.h: In constructor `SubArray::SubArray()':
symbols.h:35: class `SubArray' does not have any field named `from'
symbols.h:35: class `SubArray' does not have any field named `len'
symbols.h: At global scope:
symbols.h:37: warning: `inline' is not at beginning of declaration
symbols.h:37: ISO C++ forbids defining types within return type
symbols.h:37: semicolon missing after declaration of `struct SubArray'
symbols.h: In function `int SubArray(const char*)':
symbols.h:37: only constructors take base initializers
symbols.h:37: confused by earlier errors, bailing out
gmake[2]: *** [moc.o] Error 1
gmake[2]: Leaving directory `/home/nimmyj/qt-x11-eval-src-4.2.0/src/tools/moc'
gmake[1]: *** [sub-tools_moc-make_default] Error 2
gmake[1]: Leaving directory `/home/nimmyj/qt-x11-eval-src-4.2.0/src'
gmake: *** [sub-src-make_default-ordered] Error 2
[root@localhost qt-x11-eval-src-4.2.0]# cd /usr/
[root@localhost usr]# ls
bin etc include lib local share tmp
dict games kerberos libexec sbin src X11R6
[root@localhost usr]# cd local/
[root@localhost local]# ls
bin etc games include lib libexec sbin share src Trolltech
[root@localhost local]# cd Trolltech/
[root@localhost Trolltech]# ls
Qt-4.2.0 Qt-4.2.2
[root@localhost Trolltech]# cd ../..
[root@localhost usr]# ls
bin etc include lib local share tmp
dict games kerberos libexec sbin src X11R6
[root@localhost usr]# cd ..
[root@localhost /]# cd /home/nimmyj/qt-x11-eval-src-4.2.0/
[root@localhost qt-x11-eval-src-4.2.0]# ls
bin configure include Makefile README
changes-4.2.0 demos INSTALL mkspecs src
config.status doc lib projects.pro tools
config.tests examples LICENSE qmake translations
[root@localhost qt-x11-eval-src-4.2.0]# gmake install
cd src && gmake -f Makefile install
gmake[1]: Entering directory `/home/nimmyj/qt-x11-eval-src-4.2.0/src'
cd tools/moc && gmake -f Makefile install
gmake[2]: Entering directory `/home/nimmyj/qt-x11-eval-src-4.2.0/src/tools/moc'
g++ -c -pipe -O2 -Wall -W -DQT_BOOTSTRAPPED -DQT_MOC -DQT_NO_CODECS -DQT_LITE_UNICODE -DQT_NO_LIBRARY -DQT_NO_STL -DQT_NO_COMPRESS -DQT_NO_DATASTREAM -DQT_NO_TEXTSTREAM -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_THREAD -DQT_NO_REGEXP
-DQT_NO_QOBJECT -DQT_NO_SYSTEMLOCALE -I../../../mkspecs/linux-g++ -I. -I../../corelib/arch/generic -I/include -I. -I/include/QtCore -I. -o ./moc.o moc.cpp
In file included from moc.h:25,
from moc.cpp:22:
parser.h:25:18: QStack: No such file or directory
In file included from parser.h:26,
from moc.h:25,
from moc.cpp:22:
symbols.h:26:19: QString: No such file or directory
symbols.h:27:17: QHash: No such file or directory
symbols.h:28:19: QVector: No such file or directory
symbols.h:29:18: QDebug: No such file or directory
In file included from parser.h:26,
from moc.h:25,
from moc.cpp:22:
symbols.h:36: parse error before `&' token
symbols.h:36: missing ';' before right brace
symbols.h: In constructor `SubArray::SubArray()':
symbols.h:35: class `SubArray' does not have any field named `from'
symbols.h:35: class `SubArray' does not have any field named `len'
symbols.h: At global scope:
symbols.h:37: warning: `inline' is not at beginning of declaration
symbols.h:37: ISO C++ forbids defining types within return type
symbols.h:37: semicolon missing after declaration of `struct SubArray'
symbols.h: In function `int SubArray(const char*)':
symbols.h:37: only constructors take base initializers
symbols.h:37: confused by earlier errors, bailing out
gmake[2]: *** [moc.o] Error 1
gmake[2]: Leaving directory `/home/nimmyj/qt-x11-eval-src-4.2.0/src/tools/moc'
gmake[1]: *** [sub-tools_moc-install_subtargets] Error 2
gmake[1]: Leaving directory `/home/nimmyj/qt-x11-eval-src-4.2.0/src'
gmake: *** [sub-src-install_subtargets-ordered] Error 2
[root@localhost qt-x11-eval-src-4.2.0]# cd /usr/local/Trolltech/Qt-4.2.0/
[root@localhost Qt-4.2.0]# ls
lib
[root@localhost Qt-4.2.0]# cd lib/
[root@localhost lib]# ls

jacek
7th December 2006, 20:25
Have you read README and INSTALL files that come with Qt sources and run configure script before "make"?

Also please, don't start multiple threads on the same problem.

nimmyj
8th December 2006, 08:19
thank you Jacek
when I downloaded the evaluation version one error I got like"Error reading header after proceesing 0 entries..
qt-x11-eval-src-4.2.0.tar, is this Qt version compatable with red hat 9

sunil.thaha
8th December 2006, 11:05
Here are the steps to be followed
1. After you download the Qt tar.gz file
2. Unzip it : tar xfvz qt-x11-eval-src-4.2.0.tar.gz
3. Go to the unzipped folder
4. run configure : ./Configure
5. start compilation : make
6. if make is successful, now you can install it. for that
7.login as root : su
8. install Qt4.2 : make install

Now you have it installed, probably in /usr/local/Trolltech/Qt-4.2.0
set the path to the new qmake by issuing

PATH=/usr/local/Trolltech/Qt-4.2.0/bin:$PATH
then try compiling

jacek
8th December 2006, 11:21
when I downloaded the evaluation version one error I got like"Error reading header after proceesing 0 entries..
Maybe there was some error during the transmission and that file is corrupted? If there is MD5 sum available on the website from which you downloaded that file, you can check if the file is correct.

nimmyj
13th December 2006, 08:28
hi,
I tried installing the Open source version Of Qt4.2.Installation was done .the Path was set as
PATH=/home/nimmyj/qt-x11-opensource-src-4.2.2/bin:$PATH:$HOME/bin:/usr/local/Trolltech/Qt-4.2.2/bin
But still my designer for QT4.2 is not opening .im Still Having designer for Qt3.11.
What shall i do to get Designer in Start up.

sunil.thaha
13th December 2006, 09:57
Did you give a make install ?
if so, then see if it is installed in /usr/local/Trolltech/Qt...
and then set that path in the path environment variable ...


One more thing

How do you open the designer ? is it thourgh the same shell in which the path has been set ? It is a common mistake to set the path in one of the terminals and then trying to open it from the start menu...

So once the path has been set. simply type designer & see which designer pops up ? if you still don't get the Qt4 designer, post the result of " which designer "

nimmyj
13th December 2006, 12:43
hi,
I tried which designer .this is the result.can you find the problem

[nimmyj@localhost sample]$ which designer
~/qt-x11-opensource-src-4.2.2/bin/designer
[nimmyj@localhost sample]$ designer &
[1] 2410
designer: error while loading shared libraries: libQtDesignerComponents.so.4: cannot open shared object file: No such file or directory
[nimmyj@localhost sample]$

nimmyj
13th December 2006, 12:47
hi Sunil,
we also tried doing one example with out dessigner. it created pro file and make file was made but some error came.

[nimmyj@localhost sample]$ qmake -project
[nimmyj@localhost sample]$ qmake
/home/nimmyj/.qmake.cache:19: Parse Error ('--cflags [-I'/usr/include']')
[nimmyj@localhost sample]$ ls
main.cpp Makefile sample.pro
[nimmyj@localhost sample]$ ./sample
bash: ./sample: No such file or directory
[nimmyj@localhost sample]$ make
g++ -c -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../qt-x11-opensource-src-4.2.2/mkspecs/solaris-g++ -I. -I/usr/local/Trolltech/Qt-4.2.2/include/QtCore -I/usr/local/Trolltech/Qt-4.2.2/include/QtCore -I/usr/local/Trolltech/Qt-4.2.2/include/QtGui -I/usr/local/Trolltech/Qt-4.2.2/include -I. -I. -I. -I/usr/sfw/include -o main.o main.cpp
main.cpp:1:24: QApplication: No such file or directory
main.cpp:2:23: QPushButton: No such file or directory
main.cpp: In function `int main(int, char**)':
main.cpp:6: `QApplication' undeclared (first use this function)
main.cpp:6: (Each undeclared identifier is reported only once for each function
it appears in.)
main.cpp:6: parse error before `(' token
main.cpp:8: `QPushButton' undeclared (first use this function)
main.cpp:9: `hello' undeclared (first use this function)
main.cpp:12: `app' undeclared (first use this function)
main.cpp:5: warning: unused parameter `int argc'
main.cpp:5: warning: unused parameter `char**argv'
make: *** [main.o] Error 1

nimmyj
13th December 2006, 12:58
hi sunil,
we had set envirn variable for library wrongly .we changed it and dessigner is getting open when dessigner & is given.now the only problem is running example program from console.
[nimmyj@localhost sample]$ ls
main.cpp Makefile sample.pro
[nimmyj@localhost sample]$ qmake
/home/nimmyj/.qmake.cache:19: Parse Error ('--cflags [-I'/usr/include']')