PDA

View Full Version : Problems with qt compilation.



Total Vision
04-28-2002, 03:20 PM
Was hoping one of the veterans of the distribution could give assist me with a problem I am having when trying to compile qt-2.3.2.

After following the Redhat 7.2 guide, I am having a persistent problem with the gt-2.3.2 compilation. I installed all of the necessary modules, as specified in the README, and also made changes to the necessary configs/linux-g++ files - Changing G++ and gcc to G++3 and gcc3.

My problem is, (I should note, that the configure with the '-threads' option works fine), when attempting the make, I get the following error:


[root@anakin qt-2.3.2]# ./configure -threads ; make


The environment variable $QTDIR is not set correctly. It is currently
set to "", but it should be set to this directory,
which is "/usr/lib/qt-2.3.2".

Please read the INSTALL file for instructions on how to set $QTDIR
correctly. If you have set $QTDIR in your .profile or .login, you
will need to log out and log in again to make the setting effective.


make[1]: Entering directory `/usr/lib/qt-2.3.2'

Qt must first be configured using the "configure" script.

The make process will now run this...


This is the Qt Free Edition.

You are licensed to use this software under the terms of either
the Q Public License (QPL) or the GNU General Public License (GPL).

Type 'Q' to view the Q Public License.
Type 'G' to view the GNU General Public License.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of the license?
yes

This target is using the GNU C++ compiler (linux-g++).

Recent versions of this compiler automatically include
code for exceptions, which increase both the size of
the Qt library and the amount of memory taken by your
applications.

You may elect to re-run ./configure with the -no-g++-exceptions
option to compile Qt without exceptions. This is
completely binary compatible, and existing
applications will continue to work (like KDE 2).


Build type: linux-g++-shared

Thread support..................... no
GIF support........................ no
MNG support........................ no
JPEG support....................... no
OpenGL support .................... yes
NAS sound support.................. no
Session management................. yes
Xft support (Anti-Aliased Fonts) .. yes
XKB support ....................... yes

Creating makefiles...
Qt is now configured for building. Just run make.
To reconfigure, run make clean and configure.

cd src/moc; make
make[2]: Entering directory `/usr/lib/qt-2.3.2/src/moc'
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o mocgen.o mocgen.cpp
y.tab.c: In function `int yyparse()':
y.tab.c:3102: warning: suggest parentheses around assignment used as truth
value
y.tab.c:3150: warning: label `yyerrlab' defined but not used
y.tab.c:3145: warning: label `yynewerror' defined but not used
/usr/lib/qt-2.3.2/include/qlist.h: At top level:
mocgen.cpp:3: warning: `char yysccsid[36]' defined but not used
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qbuffer.o ../tools/qbuffer.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qcollection.o ../tools/qcollection.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qcstring.o ../tools/qcstring.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qdatastream.o ../tools/qdatastream.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qdatetime.o ../tools/qdatetime.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qfile.o ../tools/qfile.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qgarray.o ../tools/qgarray.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qgdict.o ../tools/qgdict.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qglist.o ../tools/qglist.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qglobal.o ../tools/qglobal.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qgvector.o ../tools/qgvector.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qiodevice.o ../tools/qiodevice.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qregexp.o ../tools/qregexp.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qstring.o ../tools/qstring.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qtextcodec.o ../tools/qtextcodec.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qtextstream.o ../tools/qtextstream.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qutfcodec.o ../tools/qutfcodec.cpp
g++3 -c -I/usr/lib/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qfile_unix.o ../tools/qfile_unix.cpp
g++3 -o ./moc mocgen.o qbuffer.o qcollection.o qcstring.o qdatastream.o qdatetime.o qfile.o qgarray.o qgdict.o qglist.o qglobal.o qgvector.o qiodevice.o qregexp.o qstring.o qtextcodec.o qtextstream.o qutfcodec.o qfile_unix.o
/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
make[2]: *** [moc] Error 1
make[2]: Leaving directory `/usr/lib/qt-2.3.2/src/moc'
make[1]: *** [src-moc] Error 2
make[1]: Leaving directory `/usr/lib/qt-2.3.2'
make: *** [init] Error 2
[root@anakin qt-2.3.2]#

I have read several conflicting reports, some which state that the binary is incomplete, to modules that may be uninstalled.

I even reinstalled this box twice, to make sure I got the packages I needed via the 'select individual package' option.

I did remember to do an export QTDIR=/usr/lib/qt-2.3.2/

Any suggestions?

Thanks in advance.

- TV

*** Note ***

After reading further, I attempted the installation using the qt RPMs. The looked to have installed fine, but here is the message I get when trying to compile ShowEQ(Starting at the configure)
[root@anakin showeq]# ./configure
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for g++... g++
checking for supported compiler version... no
checking for gcc-3.0... no
checking for gcc3... no
checking for g++-3.0... no
checking for g++3... g++3
checking alternate compiler for supported compiler version... no
configure: error: You need at least GCC G++ 3.0 or greater to compile ShowEQ
[root@anakin showeq]#


I thought I would check one more thing, which is to see if gcc was installed. I believe it is in place as it should be, but please feel free to correct me if I am missing something.

[root@anakin showeq]# rpm -qa | grep gcc
gcc-objc-2.96-98
qt-gcc3-devel-2.3.2-1
gcc-g77-2.96-98
gcc-c++-2.96-98
gcc3-c++-3.0.1-3
qt-gcc3-2.3.2-1
gcc-2.96-98
libgcc-3.0.1-3

And finally, my environment...

[root@anakin showeq]# env
PWD=/tmp/showeq
HOSTNAME=anakin.unixadministrator.com
LD_LIBRARY_PATH=/opt/qt-gcc3-2.3.2/lib:
QTDIR=/opt/qt-gcc3-2.3.2
LESSOPEN=|/usr/bin/lesspipe.sh %s
MANPATH=/opt/qt-gcc3-2.3.2/doc/man:
CC=gcc3
USER=root
MACHTYPE=i386-redhat-linux-gnu
CXX=g++3
OLDPWD=/tmp
MAIL=/var/spool/mail/root
INPUTRC=/etc/inputrc
BASH_ENV=/root/.bashrc
LANG=en_US
LOGNAME=root
SHLVL=1
SHELL=/bin/bash
USERNAME=root
HOSTTYPE=i386
OSTYPE=linux-gnu
HISTSIZE=1000
TERM=vt100
HOME=/root
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
PATH=/opt/qt-gcc3-2.3.2/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin
_=/usr/bin/env

Cryonic
04-28-2002, 04:56 PM
read the INSTALL file that came with qt (just like it told you to when it ran into an error configuring).

PhoenixZorn
04-29-2002, 02:22 AM
I know it sounds dumb as hell to say that... but it works... I had a problem with the RPM version of qt 2.3.2 as well... so I searched yahoo for "qt-2.3.2 tar", and it gave me the link for the free version tar.gz from Troll.no. It is still installing now on my 350 k62, but I'm pretty sure it is farther than it has ever gotten before. By the way.. I mentioned that it is still installing because it has taken the last 3 hours now to install the shit.


Anyway... QT was the only thing stoping me from running SEQ, so hopefully, it will start up tomorrow afternoon when I get home from work. =)

Total Vision
04-29-2002, 03:57 AM
I definitely believe it works, of course it does.. I'm just missing a step somewhere.

In any case, I followed the guide posted here, as opposed to the one on hackersquest. In any case, the script, rpm install, everything went fine.. Untill it got to the end of the script(which is of course, the compilation).

Now it's complaining about having gcc-3.0 installed. I thought that's what the script was doing for me.

I must be missing a path, step, or something somewhere.. Just haven't been able to find it as of yet.

Any ideas anyone? I'm following the readme to a tee. Possibly a problem with the Redhat 7.2 distribution I have?

Total Vision
04-29-2002, 05:39 AM
Got it working this morning - Had to play around with the pathing a bit..

Coolest program I have used in a very long time!

Thanks.

- TV