PDA

View Full Version : how to force a specifik compiler ?



Kenia
06-10-2002, 04:22 AM
I'm getting a lot of Qstrings errors when i try compile Seq, naturally it doenst work.
From a quick search it seems that i have to build QT and Seq with the same version of the compiler, am i right on that ?
If i am right, how do i force the use of a specifik compiler ? I can see QT is build with a standard gcc/g++ (i cant remember it specifik atm), and Seq is beeing build with gcc3/g++3.

My system is build on a Gentoo (i had to try after Ratt's post), everything went flawless after about 20 hours compiling and configuration :) with the exception of the Seq build of course.
I have the compilers gcc-3.1 and g++-3.1 installed, and gcc, g++ (i cant remember version number on thos however, except its 2.xx something).

I am a seriously n00b concerning Linux in general, but it was fun trying out the Gentoo, and i aint given up yet.

Dedpoet
06-10-2002, 06:33 AM
I haven't done this for Gentoo yet (gcc 3.0.4 still building as I write this), but check out step 2 in this thread:

http://www.hackersquest.org/boards/viewtopic.php?t=276

That tells you exactly what you are looking for.

casey
06-10-2002, 07:06 AM
qt doesnt use the standard autoconf tools, so its an execption on how to change its compilers. you'll need to edit the file configs/linux-g++-shared (its in the qt dir after is untarred) and change all occurences of gcc to gcc-3.1 and g++ to g++-3.1

in vi, just open the file and type

:%s/gcc/gcc-3.1/g
:%s/g++/g++-3.1/g
:wq

to accomplish that.

in gentoo-speak it'll be something like

ebuild /usr/portage/x11-libs/qt/qt-2.3.2-r1.ebuild clean fetch unpack
cd to the temp unpack area, mess with the files
(maybe /usr/portage/qt-2.3.2-r1/work/qt-2.3.2/configs)
ebuild /usr/portage/x11-libs/qt/qt-2.3.2-r1.ebuild install merge

3.0.4 is the newest version in gentoo i see, but i always build showeq agaisnt 2.3.2.

Kenia
06-10-2002, 07:47 AM
Thanks a ton guys, ill give it another shot as soon as when I come home (sitting at work right now).

Btw Casey, the Gentoo way you supposed, will QT be compiled with the -thread thingie ?

Dedpoet
06-10-2002, 08:42 AM
Yes. If you look at the ebuild script, it configures it with:

-sm -thread -system-zlib -system-jpeg -system-libmng -gif -ldl -lpthread -no-g++-exceptions -platform.

Those are the suggestions posted by Zaphod a while back and a few others as well.

I have qt-2.3.2 building right now, so I should be up and running soon as well. Casey's post was almost right on. The actual temporary directory for me was /var/tmp/portage/qt-2.3.2-r1/work/qt-2.3.2. Then I went into configs and edited the file. Crunching along for about 20 minutes so far...

Dedpoet
06-10-2002, 09:07 AM
Ok, it's up and running for me now, Kenia. /cheer.

I did have to emerge libpcap first though, as it wasn't built by default with anything else I had installed. I then did the following after the cvs checkout:

export QTDIR=/usr/qt/2 (Gentoo puts it there instead of /usr/lib)
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$ATDIR/lib:$LD_LIBRARY_PATH
export CC=gcc-3.0
export CXX=g++-3.0

Thanks for the pointers, casey and good luck, Kenia.

-A very happy Dedpoet

fryfrog
06-10-2002, 09:27 AM
ded, someone pointed out a great way to do your exports easily(sp).



make -f Makefile.dist && CC=gcc-3.1 CXX=g++-3.1 QTDIR=/path/to/qt-2.3.2 ./configure && make && make install



saves you a LOT of those "export XX" type lines, and only sets up CC, CXX and QTDIR for the ./configure line (the one that needs it). you also don't need a "make distclean" or "make clean" at first, as "make -f Makefile.dist" does a much better job of this (per Zaphod).

Dedpoet
06-10-2002, 11:37 AM
Thanks, fryfrog. I do actually use that method, but I was just being very explicit in my post. This whole Gentoo thing is very new to me and I just want to make sure I don't give bad advice. :)

I thought the $QTDIR/bin and $QTDIR/lib settings might be redundant but I wanted to be sure the first time I built it. A few small kinks to work out and I'll be a happy Gentoo user. Maybe I should actually do some work though...they are paying me for being here, afterall, :p

Kenia
06-11-2002, 01:24 AM
Everything is working as intended now.
After i made the changes, every thing compiled without a hitch, so Seq is up and running again.

Thanks a million for the help and hints guys.

unknown_errors
06-19-2002, 03:44 AM
when i ./configure this stuff right off the bat it tells me the i dont have a working c compiler whice has to be bull jive because i just used it for the qt install here the error to the t
configure: error: installation or configuration problem: C compiler cannot create exeutables

i'm guess this is a configuration issue, any ideas on what fixes it ?

unknown_errors
06-19-2002, 04:24 AM
configure:625: checking host system type
configure:646: checking target system type
configure:664: checking build system type
configure:753: checking for gcc
configure:866: checking whether the C compiler (gcc ) works
configure:882: gcc -o conftest conftest.c 1>&5
gcc: installation problem, cannot exec `cpp0': No such file or directory
configure: failed program was:

#line 877 "configure"
#include "confdefs.h"

its checking for gcc and not gcc3
but i do have both
rpm check shows this
gcc3.0-cpp-2mdk
gcc-c++2,96-0.76mdk
gcc3-c++3.0.1-3
libgcc3.0.4-2mdk
gcc3-3.0.1-3
libgcc-3.0.1-3

i have working at this for some time now not gonna give in to the want to play EQ till i have showEQ up and running

Mr. Suspicious
06-19-2002, 04:50 AM
Well, unknown_errors, you have so many different error messages in different threads, it's impossible to give you any sane advice now. Please stop X-posting in every post.