Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 7117 - emerge qt does not respect CXX
Summary: emerge qt does not respect CXX
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Dan Armak (RETIRED)
URL:
Whiteboard:
Keywords:
: 6053 7316 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-08-27 08:16 UTC by Ole Tange
Modified: 2002-11-22 16:14 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ole Tange 2002-08-27 08:16:49 UTC
If CXX is set to g++-3.2 then emerge qt will disrespect that and use g++ 
instead. 
 
How to reproduce: 
In make.conf: 
CXX=g++-3.2 
 
run: emerge qt 
Look for g++-3.2 and g++. g++-3.2 is never there.
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2002-08-28 01:42:29 UTC
do other ebuilds respect it?
Comment 2 Ole Tange 2002-08-28 01:49:53 UTC
Yes.

My guess is that arts does not use CXX in the Makefile, but use g++ instead.
Comment 3 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-08-28 07:17:29 UTC
The problem is that mkspecs/linux-g++/qmake.conf hardcodes the compiler to g++,
regardless. We'll have to do some patching on this one, so I'll have to confer
with Dan Armak first.
Comment 4 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-08-28 08:24:51 UTC
Dan: Is it advisable to patch this one so close to 1.4 release ?

My current suggestion would be to patch the spec file in src_unpack, where we
simply remove the CXX setting altogether. This way, the user may toy with switch
between compilers by doing CXX="foo" ebuild qt compile, without having to
reunpack it between each time.
Comment 5 Dan Armak (RETIRED) gentoo-dev 2002-08-30 06:57:27 UTC
Yes, that sounds ok. As long as we can be sure $CXX will always be set. Should 
I check for it not being set? 
Comment 6 Dan Armak (RETIRED) gentoo-dev 2002-08-30 07:33:37 UTC
OK, I've committed a masked test ebuild (3.0.5-r2) that seds qmake.conf to use 
$CC and $CXX if defined (each separately). Works ok here afaics. Please tell me 
if this answers.  
Comment 7 SpanKY gentoo-dev 2002-08-31 23:29:13 UTC
*** Bug 7316 has been marked as a duplicate of this bug. ***
Comment 8 SpanKY gentoo-dev 2002-08-31 23:32:12 UTC
*** Bug 6053 has been marked as a duplicate of this bug. ***
Comment 9 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-09-08 16:01:30 UTC
Is this code actually correct ?

        # use env's $CC, $CXX
        if [ -n "$CXX" ]; then
            einfo 'Using environment definition of $CXX'
            cp qmake.conf qmake.conf.orig
            sed -e "s:= cc:= ${CC}:" qmake.conf.orig > qmake.conf
        fi
        if [ -n "$CC" ]; then
            einfo 'Using environment definition of $CC'
            cp qmake.conf qmake.conf.orig
            sed -e "s:= g++:= ${CXX}:" qmake.conf.orig > qmake.conf
        fi

Isn't ${CXX} and ${CC} switched ?

Apart from that, it works.
Comment 10 Dan Armak (RETIRED) gentoo-dev 2002-09-09 02:50:42 UTC
Um, yes sorry :-) I've switched it to be correct and committed. I'm going to ask for testing on -core, -dev. 
Comment 11 Christian Trefzer 2002-09-12 15:20:47 UTC
Hello there,  noticing that CFLAGS for qt ebuilds are always set to -O2, I was wondering if  it would break compilation to "persuade" qmake to use system-wide CFLAGS in  the same manner. In some customized ebuild I do  source /etc/make.conf && export CC CXX CFLAGS CXXFLAGS  and later on, I replace -O2 with $CFLAGS just the way CC and CXX are inserted.    I reported this quite some time ago, and the only response was that there was  work in progress concerning this issue, but there was no change to the  qt-3.0.5-r2 ebuild except the switched CC/CXX issue.    Sincerely  Chris  
Comment 12 Dan Armak (RETIRED) gentoo-dev 2002-09-13 06:29:55 UTC
Christian: I tried that twice, and came up against various compile issues. They 
may or may not be still valid with the latest QTs and gcc versions. This is on 
my todo list but very far down. 
Comment 13 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-11-01 17:24:54 UTC
I'm shuffling this over to Dan, as this is after all "his" ebuild.
Comment 14 Dan Armak (RETIRED) gentoo-dev 2002-11-22 16:14:10 UTC
The CC, CXX code is in the latest ebuilds (unmasked for some time now). 
The CFLAGS thing is still way down the todo list... I think I've got another bug for it 
somewhere, anyway...