PDA

View Full Version : How to compile QT 2.3.2 in RH 8



datadog
11-23-2002, 05:10 PM
I just built a new RH 8 box. Had problems with SEQ locking up in old world zones.

I read a thread on these boards that suggested I download and compile QT 2.3.2 and recompile SEQ using it ..

I read INSTALL.newbies and got QT 2.3.2 downloaded and config'd following the instructions there.. but im stuck on the 'make' part.

make is trying to use g++3. But I cant find RPM's for either g++3 or gcc3 on the distro CD's or the RHN download site.

When I do a gcc -v i get

gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

I assume in this case 'gcc' is adequate to compile it, but i dont know how to get make to use 'gcc' instead of 'gcc3' or in this case 'g++3'.

I searched through here , on Trolltechs site, and the RH 8 docs... couldnt find anything..

Hoping someone here can jar my memory for me... I know this is not that hard.. just cant figure it out..

datadog
11-23-2002, 05:15 PM
I guess a follow up question would be...


Will the QT 2.3.2 RPM's i used to build my RH 7.2 box work?

A assume not.. im sure I read somewhere that they must be compiled...

Sorry for being such a newb...

datadog
11-23-2002, 08:57 PM
Well,

I tried to install the RPM for qt-2.3.2 that i used on 7.2. There were some dependencies to older verions of stuff .... anyway.. didnt work...

I'm still looking for info on how to do this..

Any suggestions would be appreciated

datadog
11-23-2002, 09:06 PM
Well,

I tried to install the RPM for qt-2.3.2 that i used on 7.2. There were some dependencies to older verions of stuff .... anyway.. didnt work...

I'm still looking for info on how to do this..

Any suggestions would be appreciated

Dedpoet
11-24-2002, 08:38 AM
You say make is trying to use gcc3. That's correct. Is it not working, or have you just not tried it? You just get the QT source, untar it where you want it installed, "configure -thread", then "make". Oh, I think you need to do a "QTDIR=/path/to/qt/2.3.2" before you do the make. I recall RH8 yelling at me about that when I set it up for a friend.

Are you getting an error or are you just stopping because you think something is weird?

datadog
11-24-2002, 11:44 AM
When i run make its trying to compile with "g++3" and not finding it (and neither am I hehe)


root@localhost qt-2.3.2]# make
make[1]: Entering directory `/usr/lib/qt-2.3.2'
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
make[2]: g++3: Command not found
make[2]: *** [mocgen.o] Error 127
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

Spent most of yesterday evening either trying to find and install 'g++3' (no luck) or to figure out how to get 'make' to use 'g++' or 'gcc', either of which are there... When i run 'gcc -v' or 'g++ -v' both return
root@localhost qt-2.3.2# gcc -v
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

root@localhost qt-2.3.2# g++ -v
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

Im just missing something REALLY obvious.

i dont think you have to set QTDIR at this point. Its not compiled yet. Thats what I need to do once I get 2.3.2 compiled so I can rebuild SEQ with it...

Im still stuck on this tho..

Dedpoet
11-24-2002, 02:00 PM
Sounds like you may be doing "export CC=gcc3" and "export CXX=g++3" but you don't need to do that with RH8. It's already using gcc3 by default so don't export those lines.

As for the QTDIR thing, I just remember when I did "make" on my friend's setup it told me I had to do it, and that was an out of the box install. Maybe you won't need to.

immortalsam
11-24-2002, 06:11 PM
I read INSTALL.newbies and got QT 2.3.2 downloaded and config'd following the instructions there.. but im stuck on the 'make' part.

ok, sounds like you have a newer version of G++3 and gcc3
simple enough, and sometimes complex..
easiest thing to do is open a console window, type gcc and hit tab 2 times.. this will display the version of gcc you have.. the exact version.. in the install instructions for qt, it tells you to change 4 lines from gcc and g++ to gcc3 and g++3.. you need to change them from gcc and g++ to whatever the double tab revealed..
my case it is gcc-3.2 and g++-3.2
if you dont, it wont compile properly, if at all.
if this doesnt do it, let me know, ill try to think of something else..

datadog
11-24-2002, 06:38 PM
ok...

i figured it out..

it took going back and re-reading paragraph para. 1.4 in 'INSTALL.newbies'.

Following the instructions in paragraph 1.4

1.4 Editting linux-g++-shared
edit the file "qt-src/configs/linux-g++-shared and change all
references to "gcc" to "gcc3" as well as "g++" to "g++3"
(lines 3, 4, 35, and 59). save your changes (ctrl-o, ctrl-x)

i had changed these to gcc3 and g++3 respectively... without checking to see which compiler i actually had available. Then i ran ./configure -thread as per the instructions..

Then when make failed.. i went back and re-editied the file to use gcc and g++ ... only problem is I never re-ran ./configure -thread. i went straight to 'make'.

/bonk datadog

Thanks for the help.. i KNEW it was something stupid... oh well. thats how you learn I guess..

datadog
11-24-2002, 08:15 PM
Fix confirmed...

Successfully compiled qt-2.3.2, exported QTDIR=/usr/lib/qt-2.3.2/, and recompiled SEQ.

All of my performance problems are gone. AND... ZOOM is working again..

For some reason, the zoom functionality disappeared when i had compiled with QT3. Its back now though... all is well