Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 136495

Summary: eselect-compiler lists configurations for compilers that are not installed
Product: Gentoo Linux Reporter: Mike Auty (RETIRED) <ikelos>
Component: Current packagesAssignee: Jeremy Huddleston (RETIRED) <eradicator>
Status: RESOLVED WORKSFORME    
Severity: normal CC: jakub, toolchain
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mike Auty (RETIRED) gentoo-dev 2006-06-11 17:07:31 UTC
Eselect-compiler seems to list profiles that should not exist:

plasma ~ # eselect compiler list
Available compilers for CTARGET i386-pc-linux-gnu
  [1]   i386-pc-linux-gnu-3.4.4/hardened
  [2]   i386-pc-linux-gnu-3.4.4/hardenednopie
  [3]   i386-pc-linux-gnu-3.4.4/hardenednopiessp
  [4]   i386-pc-linux-gnu-3.4.4/hardenednossp
  [5]   i386-pc-linux-gnu-3.4.4/vanilla
Available compilers for CTARGET i686-pc-linux-gnu
  [6]   i686-pc-linux-gnu-3.4.5/hardened
  [7]   i686-pc-linux-gnu-3.4.5/hardenednopie
  [8]   i686-pc-linux-gnu-3.4.5/hardenednopiessp
  [9]   i686-pc-linux-gnu-3.4.5/hardenednossp
  [10]  i686-pc-linux-gnu-3.4.5/vanilla
  [11]  i686-pc-linux-gnu-4.1.1/hardened

Activated profiles:
  i686-pc-linux-gnu *       i686-pc-linux-gnu-4.1.1/hardened
plasma ~ # eselect compiler set 6
!!! Error: Error determining reference timestamp for binaries.  Please file a bug report at http://bugs.gentoo.org.
exiting.

My system only has gcc-4.1.1 installed, but eselect lists the old 3.4.5, and for some reason also lists 3.4.4 even though I haven't had that there for very long time.  Gimme a shout if you need any more info...  5:)

Portage 2.1 (default-linux/x86/2006.0, gcc-4.1.1/hardened, glibc-2.4-r3, 2.6.16-gentoo-r9 i686)
=================================================================
System uname: 2.6.16-gentoo-r9 i686 Intel(R) Pentium(R) M processor 1400MHz
Gentoo Base System version 1.12.1
ccache version 2.4 [enabled]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
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.16.1-r2
sys-devel/gcc-config: [Not Present]
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mtune=pentium4 -march=pentium4 -O2 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"CXXFLAGS="-mtune=pentium4 -march=pentium4 -O2 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache confcache cvs distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug strict userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j2"
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/overlays/shc-tools /usr/local/overlays/gcc41 /usr/local/overlays/as-needed /usr/local/overlays/personal /usr/local/overlays/vmware"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 GAPING_SECURITY_HOLE X acl acpi alsa apache2 asf avi bash-completion berkdb bitmap-fonts bluetooth boundschecking browserplugin bzip2 cairo ccache cdr cli crypt cups dba dbus dlloader dri dvb dvd dvi emboss encode ethereal ffmpeg firefox foomaticdb gd gif gimpprint glitz gnome gnuplot gps graphviz gstreamer gtk gtk2 gtkhtml hal hardened ipv6 isdnlog java john jpeg kerberos ldap ldapsam libg++ libnotify libsexy libwww mad madwifi mikmod mmx mng mono mp3 mpeg mscash mssql mysql nautilus ncurses nls nogecko-sdk nptl nptlonly ntlm ogg opengl pam patch pcmcia pcre pdf pdflib perl pic png postgres pppd python quicktime readline reflection samba sasl sdl session slp smux snmp sox spell spl sse sse2 ssl svg svn-mirror syslog tcpd textables theora truetype truetype-fonts type1-fonts udev usb v4l2 vorbis win32codecs winbind xml xml2 xorg xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev input_devices_synaptics kernel_linux userland_GNU video_cards_radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeremy Huddleston (RETIRED) gentoo-dev 2006-06-12 03:22:18 UTC
Just delete the files in /etc/eselect/compiler/*.conf .  This is a problem stemming from portage not knowing it should delete files in /etc/eselect/compiler/* on unmerge until eselect-compiler is installed and the install not deleting all invalid profiles when you merge eselect-compiler.  It tries to, but you probably still have /usr/lib/gcc-bin/$CHOST/<version> directories on your system for those profiles.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-06-12 13:46:36 UTC
[ Searching for file(s) /etc/eselect/compiler/i686-pc-linux-gnu-3.4.4.conf,/etc/eselect/compiler/i686-pc-linux-gnu-4.0.3.conf,/etc/eselect/compiler/i686-pc-linux-gnu-4.1.1.conf in *... ]
sys-devel/gcc-3.4.4-r1 (/etc/eselect/compiler/i686-pc-linux-gnu-3.4.4.conf)
sys-devel/gcc-4.0.3 (/etc/eselect/compiler/i686-pc-linux-gnu-4.0.3.conf)
sys-devel/gcc-4.1.1 (/etc/eselect/compiler/i686-pc-linux-gnu-4.1.1.conf)

So, why doesn't gcc create a CONFIG_PROTECT_MASK entry so that this cruft can be removed on uninstall?
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2006-06-16 12:42:35 UTC
/etc/eselect/compiler was in CONFIG_PROJECT_MASK in base, but about a month ago that was being cleaned out and forced onto packages.  vapier had me put it in eselect-compiler instead of gcc.  True gcc installs the file, but you can have multiple versions of gcc installed at the same time and thus you'd have file collission.

eselec-compiler clears out the invalid profiles whe it is first installed.  I'm more curious why these didn't get removed when eselect-compiler was installed, but the likely reason is that portage didn't remove /usr/lib/gcc-bin/$CHOST/<version> when you unmerged the old compiler.
Comment 4 Mike Auty (RETIRED) gentoo-dev 2006-06-16 12:53:08 UTC
Sorry, I forgot to get back to you about this.  Removing the files worked fine.  I checked for the /usr/lib/gcc-bin/$CHOST/<version> directories, I found one for the i386 CHOST, but not the one for 3.4.5...

Anything I can do help you test it out?  5:)
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-06-19 00:34:55 UTC
(In reply to comment #3)
> True gcc installs the file, but you can have
> multiple versions of gcc installed at the same time and thus you'd have file
> collission.

Erm, it's not one file for all of them - it's one file per slot, so there can't be any collisions there.
Comment 6 Jeremy Huddleston (RETIRED) gentoo-dev 2006-06-20 01:37:55 UTC
Ok, well closing.  I agree that the CONFIG_PROJECT_MASK should've been provided by gcc.  It was originally in base, but vapier removed it and had me put it in eselect-compiler which made me need to come up with this hack around the problem.  If you want to blame someone about that decision, blame him.  Everything was working great when it was in base.