Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148126 - GCC Upgrading Guide: add step to do env-update?
Summary: GCC Upgrading Guide: add step to do env-update?
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: nm (RETIRED)
URL: http://www.gentoo.org/doc/en/gcc-upgr...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-18 15:41 UTC by FieldySnuts
Modified: 2006-10-06 10:50 UTC (History)
3 users (show)

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


Attachments
gcc-upgrading.xml.patch (gcc-upgrading.xml.patch,1.55 KB, patch)
2006-09-24 15:04 UTC, Alexander Gabert (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description FieldySnuts 2006-09-18 15:41:10 UTC
I am currently moving to gcc 4.1.1-r1 using the document that I put in the URL box. After switching the gcc profile to 4.1.1-r1, quickpgking 3.4.6-r1 and removing 3.4.6-r1, a gcc --version showed 4.1.1-r1 was indeed in use. I logged out and back in, and gcc --version failed because it could find no gcc whatsoever. I had to do switch the profile again. gcc --version returned 4.1.1-r1 once again.

Out of curiousity, i logged in/out and once again, it couldn't find gcc and I had to switch the profile again.

The guide mentions source /etc/profile, but it seems this was not enough to make the switch stick. kojiro in #gentoo mentioned that I should do an env-update, and that indeed made it stick.

What do you think of adding env-update as a step in this guide, for 3.* to 4.1.1 migration? Or, am I a lunatic?

Portage 2.1.2_pre1 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.17.11-reiser4-3 i686)
=================================================================
System uname: 2.6.17.11-reiser4-3 i686 AMD Athlon(TM) XP 1800+
Gentoo Base System version 1.12.5
Last Sync: Mon, 18 Sep 2006 14:20:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-java/java-config: 1.3.6-r1, 2.0.28-r1
dev-lang/python:     2.3.5, 2.4.3-r3
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.mirrors.tds.net/gentoo http://mirror.datapipe.net/gentoo"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://156.56.247.193/gentoo-portage"
USE="x86 3dnow X alsa am berkdb bitmap-fonts bzip2 cairo cdr chroot cli crypt dbus dlloader dri dv dvd dvdr eds elibc_glibc emboss encode fam firefox fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal input_devices_keyboard input_devices_mouse isdnlog jpeg kde kdeenablefinal kernel_linux libg++ linguas_en mad mikmod mmx mp3 mpeg ncurses nls nptl nptlonly ogg oggvorbis opengl oss pam pcre pdflib perl png ppds pppd pwdb python qt3 qt4 quicktime readline reflection sdl session spell spl sse ssl tiff truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_nv vorbis win32codecs xml xmms xorg xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Neil McKenzie 2006-09-20 21:50:57 UTC
I can reproduce this behaviour, and I agree that 'env-update' should be added to the upgrade guide.
Comment 2 Alexander Gabert (RETIRED) gentoo-dev 2006-09-24 15:04:02 UTC
Created attachment 97982 [details, diff]
gcc-upgrading.xml.patch

patch as from the conversation with Fieldy on -hardened IRC
Comment 3 nm (RETIRED) gentoo-dev 2006-09-28 04:53:05 UTC
(In reply to comment #2)
Patches against HTML are completely useless. Please use diff -Nut against the original XML source, not the displayed HTML in your browser.

You can view the original document HTML by downloading the page in question and appending ?passthru=1 to its URL:

http://www.gentoo.org/doc/en/gcc-upgrading.xml?passthru=1 for example.
Comment 4 Jan Kundrát (RETIRED) gentoo-dev 2006-10-01 11:40:25 UTC
Toolchain folks, is the behavior described in comment #0 normal?
Comment 5 SpanKY gentoo-dev 2006-10-01 15:13:32 UTC
when you upgrade to gcc-4.1 from gcc-3.4, you need to run `gcc-config` yourself to switch from 3.4 to 4.1

if you didnt do that, and then you unmerged the gcc-3.4 toolchain, you would hit the behavior described in comment #0

gcc-config runs `env-update` for you when you change profiles
Comment 6 FieldySnuts 2006-10-01 17:09:23 UTC
Re comment #5:

Yes, I had done gcc-config myself. I was following the guide, it mentions gcc-config. Perhaps something is "unusual" on my system?
Comment 7 SpanKY gentoo-dev 2006-10-01 17:49:22 UTC
i cant really diagnosis the situation if your system is working now and you cant recreate the issue ...
Comment 8 FieldySnuts 2006-10-01 18:03:17 UTC
The profile change stuck after I did an env-update manually, which is why I requested the change, and someone else was kind enough to provide a patch for the doc, after also seeing this behavior (See comment #1).

kojiro in #gentoo had suggested env-update, and as soon as I did that, the profile change stuck. Without doing it manually, every new login was reverting back to the old gcc (which i had removed as per the docs).

I'm not sure what else I can say, or what else I can add, sorry.

Maybe neilbags has further comment?

Thank you for considering the document change :)
Comment 9 nm (RETIRED) gentoo-dev 2006-10-06 10:43:14 UTC
Okay, there were enough confirmations to warrant the change. Added env-update to the source /etc/profile instruction.

Fixed in CVS, thanks for reporting.
Comment 10 Jan Kundrát (RETIRED) gentoo-dev 2006-10-06 10:50:01 UTC
(In reply to comment #9)
> Okay, there were enough confirmations to warrant the change. Added env-update
> to the source /etc/profile instruction.

"gcc-config runs `env-update` for you when you change profiles" doesn't look like a confirmation (see comment #5)