Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 6859 - gcc 3.2 ebuild bug
Summary: gcc 3.2 ebuild bug
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-21 15:27 UTC by Dominik Westner
Modified: 2003-01-28 00:30 UTC (History)
0 users

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 Dominik Westner 2002-08-21 15:27:06 UTC

I think I have compiled gcc 3.2 for the third time now (on a 233 Pentium) until
I found out that the 
build_multiple function in the ebuild seems to have a little bug.

So here is the problem. When emerging gcc-3.2 I always enden up that the build
was postfixed with -3.2 which is a good think. But how do I change the default
compiler? ( CC in make.conf does not seem to change it in all the cases, e.g. c++)

To get rid of the postfix I umerged my old gcc version and linked gcc-3.2 to
gcc. This works, but if you unmerge the old versions and just set
CC=gcc=3.2 in make.conf it won't work and you still end up with a postfixed 3.2 gcc.

The reasond seems to be that the build_multiple function in the gcc ebuild does
not respect the CC env variable, but directly references gcc.

Dominik
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2002-08-23 01:01:42 UTC
shouldn't changing the /etc/make.profile link take care of all this?
Comment 2 Dominik Westner 2002-08-23 02:01:15 UTC
well, this does not work for me. I set the make.profile to default-x86.profile, then emerged 
gcc-3.2, then did a pkg-cean and removed all the old gcc versions.
When I try to emerge a package I get:
brain root # emerge less
Calculating dependencies ...done!
>>> emerge sys-apps/less-376 to /
>>> md5 ;-) less-376.tar.gz
>>> Unpacking source...
>>> Unpacking less-376.tar.gz
>>> Source unpacked.
creating cache ./config.cache
checking for gcc... distcc gcc
checking whether the C compiler (distcc gcc -fomit-frame-pointer -pipe -mpreferred-
stack-boundary=2 -march=pentium3 -O3 -mmmx -msse ) works... no
configure: error: installation or configuration problem: C compiler cannot create 
executables.

!!! ERROR: The ebuild did not complete successfully.
!!! Function src_compile, Line 1, Exitcode 1
!!! (no error message)

!!! emerge aborting on  /usr/portage/sys-apps/less/less-376.ebuild .

To work around this, I need to manually create a link from gcc-3.2 to gcc, then reemerge 
gcc-3.2 and then I am done.

I think that is not the intended procedure.
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2002-08-23 15:16:42 UTC
Try add in to make.conf:

CC=gcc-3.2
CXX=g++-3.2


Then, to have the current ebuild build gcc as the default compiler, and
*not* one postfixed (gcc-<ver>), you have to:

1)  use the default-1.0-gcc3 profile.

2)  the current default gcc must be version 3

3)  do before merge:  export GCCBUILD="default"


Anyhow, I will not recommend updating a 2.95.3 build system to use gcc3
as defaut compiler .. rather then wait for Gentoo 1.4 build stages, and
do a rebuild of your system. OR use the current 1.3 images.
Comment 4 Dominik Westner 2002-08-23 17:16:38 UTC
well, that's more or less how I ended up doing it.

The reason for posting this to bugzilla was not my problem, but more in general, that I 
think it is a bad idea to have an ebuild depend on the state of the system, e.g. the order 
ebuild are emerged, which will be the default compiler.

I like it much more the way it is handled with the different java vms to hava a config tool, 
which will set the default.