Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 529608 - sys-devel/gcc should automatically call gcc-config on upgrade when no alternative gcc is available
Summary: sys-devel/gcc should automatically call gcc-config on upgrade when no alterna...
Status: RESOLVED DUPLICATE of bug 130772
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 584516 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-17 09:41 UTC by moshe2go
Modified: 2016-05-31 14:42 UTC (History)
2 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 moshe2go 2014-11-17 09:41:11 UTC
After system updating, I cound not emerge any new package, but get this message:
'gcc-config: Active gcc profile is invalid!'
As you can see in the last part of this Topic from Gentoo's Forum:
https://forums.gentoo.org/viewtopic-p-7652106.html#7652106.
GCC was updated to 4.8.3 but I did not select it.
Then I ran emerge --depclean, which removed my active older gcc,leaving with a newer but inactve gcc.
My suggest, in order to prevent manaully GCC's select, is of 2 options:
1. After updating GCC, Portage will select automatically,the newer GCC.     
2. At least- Adding request for GCC configuration, to the last message of system updating:'IMPORTANT: 2 config files in '/etc' need updating.'
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-17 13:09:49 UTC
1) Please post your `emerge --info' output in a comment.
2) Please attach the entire gcc-config output in a comment.
Comment 2 moshe2go 2014-11-17 13:54:04 UTC
emerge --info
Portage 2.2.8-r2 (default/linux/amd64/13.0/desktop/kde, gcc-4.8.3, glibc-2.19-r1, 3.14.14-gentoo x86_64)
=================================================================
System uname: Linux-3.14.14-gentoo-x86_64-Intel-R-_Pentium-R-_Dual_CPU_E2180_@_2.00GHz-with-gentoo-2.2
KiB Mem:     3074092 total,    151852 free
KiB Swap:    2097148 total,   2092400 free
Timestamp of tree: Sun, 16 Nov 2014 15:15:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.7, 3.3.5-r1, 3.4.1
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.heanet.ie/pub/gentoo/ http://mirror.isoc.org.il/pub/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync1.ie.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg kde kipi lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 readline sdl semantic-desktop session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="he" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 3 moshe2go 2014-11-17 13:55:14 UTC
gcc-config
Usage: gcc-config [options] [CC Profile]
Change the current compiler profile, or give info about profiles.

Options:
  -C, --nocolor              Disable color output
  -O, --use-old              Use the old profile if one was selected.
  -f, --force                Make sure all config files are regenerated.
  -c, --get-current-profile  Print current used gcc profile.
  -l, --list-profiles        Print a list of available profiles.
  -S, --split-profile        Split profiles into their components
  -E, --print-environ        Print environment that can be used to setup the
                             current gcc profile, or a specified one.
  -B, --get-bin-path         Print path where binaries of the given/current
                             profile are located.
  -L, --get-lib-path         Print path where libraries of the given/current
                             profile are located.

Profile names are of the form:  <CTARGET>-<version>
For example:                    i686-pc-linux-gnu-3.2.1
Comment 4 moshe2go 2014-11-17 14:05:18 UTC
(In reply to Jeroen Roovers from comment #1)
> 1) Please post your `emerge --info' output in a comment.
> 2) Please attach the entire gcc-config output in a comment.

Please be aware that I already had solved the GCC config issue, by manually select the newer, however, I opened this file bug, to see if you can prevent this manually configuration, and get it done mautomaticaly!

Regards
Comment 5 Carter Young 2014-11-17 16:01:32 UTC
It isn't Gentoo's policy to force an upgrade... If you want multiple GCC's you need to use emerge --noreplace sys-devel/gcc-<version>
Comment 6 moshe2go 2014-11-17 18:58:17 UTC
(In reply to Carter Young from comment #5)
> It isn't Gentoo's policy to force an upgrade... If you want multiple GCC's
> you need to use emerge --noreplace sys-devel/gcc-<version>

May be I was not so clear - As you can see from the attached link of Gentoo's Forum in the origin file - It was not a case of forcing upgrade: During last system's updating, GCC was upgraded by portage, and afterword --depclean removed the old one. So at this stage , the system had only one GCC - the new one - but it was not selected, so I could not emerge any new package. For me, as facing this issue for the first time, it took quite long time till figure out the problem, and resolve it with the Forum's help. All I am asking is that, when depclean removes the old ver (this action itself should be considered...), then it should select the new one, otherwise, we left without GCC at all. At least, portage should send a message at the end of update, that we need to configure GCC.   

Regards
Comment 7 David Kredba 2014-11-17 19:27:34 UTC
I can confirm this behavior. Anytime I do "ebuild ... gcc install" then I ran the testsuite and call "ebuild ... gcc merge" it removes previous active gcc's env file and then call to fix_libtool_files.sh fails two times because gcc-config does not see it.
After ". /etc/profile" is called in console fix_libtool_files.sh (with parameters seen in failure report produced before) can be ran by hand without troubles.

Maybe the previous active gcc env file can be removed in pkg_postrm phase?
Comment 8 SpanKY gentoo-dev 2016-04-14 05:41:12 UTC
this should be fixed by:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5fdfd991ec21885d4141440da97189f29dfa7b9

the bad news is that it won't help any existing installed versions or binpkgs because the pkg_* funcs are cached in the ebuild metadata, but it will help with all new builds moving forward.  i guess lesson of the day is don't unmerge what you're using :).
Comment 9 SpanKY gentoo-dev 2016-05-13 15:51:18 UTC

*** This bug has been marked as a duplicate of bug 130772 ***
Comment 10 SpanKY gentoo-dev 2016-05-31 14:42:17 UTC
*** Bug 584516 has been marked as a duplicate of this bug. ***