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

Bug 370439

Summary: 'emerge --depclean' from sys-apps/portage-2.1.10 deletes blas-reference, sci-libs/lapack-reference and sci-libs/cblas-reference not recognizing that they are needed by other packages.
Product: Portage Development Reporter: Juergen Rose <rose>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bkohler, mlspamcb, tomka
Priority: Normal    
Version: 2.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 283587, 41417, 192319    
Bug Blocks:    

Description Juergen Rose 2011-06-07 10:54:23 UTC
'emerge --depclean' deleted blas-reference, sci-libs/lapack-reference  and sci-libs/cblas-reference. The next revdep-rebuild wants to reemerge  sci-chemistry/apbs:0 sci-libs/arpack:0 sci-libs/cholmod:0 sci-libs/superlu:0 sci-libs/umfpack:0 sci-mathematics/octave:0 because of missing libblas and liblapack.

'emerge sci-libs/arpack' fails then with:
checking for sgemm_ in -lblas... (cached) no
checking for sgemm_ in -lblas... (cached) no
configure: error: Cannot find blas libraries

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sci-libs/arpack-96-r3/work/ARPACK/config.log
 * ERROR: sci-libs/arpack-96-r3 failed (configure phase):

There are still blas-atlas and lapack-atlas installed. But they are not eselected, because the eigen function of R generates segfaults with them for me.

root@moose:/usr/src(33)# eselect blas list
Installed BLAS for library directory lib64
  [1]   atlas
  [2]   atlas-threads
root@moose:/usr/src(34)# eselect lapack list
Installed LAPACK for library directory lib64
  [1]   atlas


Reproducible: Always




root@moose:/usr/src(38)# emerge --info 
Portage 2.1.10 (default/linux/amd64/10.0/desktop, gcc-4.5.2, glibc-2.13-r2, 2.6.39-gentoo x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9650_@_3.00GHz-with-gentoo-2.0.2
Timestamp of tree: Tue, 07 Jun 2011 08:00:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.2
dev-util/cmake:           2.8.4-r1
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.2-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21
sys-devel/gcc:            4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r2
Repositories: gentoo science x11 java-overlay sunrise arcon proaudio qting-edge x-portage x-cpan g-octave
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula googleearth AdobeFlash-10.1 cadsoft"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.2/ext-active/ /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.2/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.2/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de fr"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science /var/lib/layman/x11 /var/lib/layman/java-overlay /var/lib/layman/sunrise /var/lib/layman/arcon /var/lib/layman/pro-audio /var/lib/layman/qting-edge /usr/local/portage /var/lib/cpan /var/lib/g-octave"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit R X Xaw3d a52 aac abiword acl acpi admin afs alsa amd64 ao apache2 applet archive arpack asf aspell assistant audacious audiofile automap automount bash-completion beagle berkdb blas blast bluetooth boo boost branding bzip2 cairo cdda cddb cdf cdio cdparanoia cdr cg cgi chm cli consolekit corba cracklib crypt css cuda cups curl cxx daap db dbase dbi dbm dbus declarative designer devhelp device-mapper dga dia djvu doc dri ds2490 ds9097 ds9097u dts dv dvb dvd dvdr dvi dynamicplugin eds elf emacs emboss emf encode epiphany evo examples exif expat extensions extra extras fam fame ffmpeg fftw firefox fits flac fltk fontconfig foomaticdb fortran fortran95 fpx fts3 fuse galago garmin gcj gd gdal gdbm gdu gedit geoip geolocation geos gfortran gif gimp ginac git glade glib gml gmp gmtsuppl gnome gnome-keyring gnome-print gnuplot gnutls gphoto2 gpm grammar graphics graphtft graphviz grass gs gsl gsm gstreamer gtk guile harness hddtemp hdf hdf5 hdri http httpd hvm iconv icq icu id3 ide imagemagick imap innodb inotify ipod ipv6 irda ithreads jabber jadetex java java6 jbig john jpeg jpeg2k kdrive kerberos kpathsea kqemu kvm ladspa lame lapack latex latex3 lcms ldap lensfun libffi libgda libnotify libsamplerate lirc lm_sensors lua lzo mad mail maildir mapnik math matroska mkl mmx mmxext mng modules mono moonlight motif mozilla mp3 mp4 mpeg mpi mpi-threads mplayer mtp mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networking networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs ntp numpy nvidia obex objc ocaml octave odbc ogdi ogg ole openexr opengl openmp overview pae pam pango pcre pda pdf perl plotutils plugins png podcast policykit portaudio posix postgres postscript ppds pppd preview-latex proj projectx pstricks pulseaudio python python-bindings q16 q32 qemu qhull qt3support qt4 quicktime readline reiserfs reports rle romio rpc rrdcgi rrdtool samba sasl science sdk sdl secure-delete semantic-desktop server session sip slang slp smbclient smp sms sndfile snmp soup sox speex spell sql sqlite sse sse2 sse4 ssl ssse3 startup-notification stlport subtitles subversion suexec svg svm swig sysfs szip t1lib tcl tcpd tex tex4ht texmacs tgif theora threads thunderbird tidy tiff tk tntc tools truetype udev unicode usb userlocales utempter v4l2 video virtualbox vorbis wav webdav webdav-serf webkit wifi wmf wxwidgets x264 xattr xcb xemacs xext xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc yaml zlib zvbi" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="canon" 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 ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" NETBEANS_MODULES="apisupport cnd dlight enterprise ergonomics groovy gsf harness ide identity j2ee java mobility nb php profiler ruby websvccommon xml" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv nouveau vesa" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Klemen Mihevc 2011-06-07 13:55:10 UTC
It also trys to remove nano system package unless you reemerge it in to world.
Comment 2 Juergen Rose 2011-06-07 14:46:49 UTC
But there are dependencies and the package is eselected:

root@lynx:/root(5)# equery d blas-reference
 * These packages depend on blas-reference:
virtual/blas-1.0 (sci-libs/blas-reference)
root@lynx:/root(6)# eselect blas list
Installed BLAS for library directory lib64
  [1]   atlas
  [2]   atlas-threads
  [3]   reference *
root@lynx:/root(7)# emerge -p --depclean
...
>>> These are the packages that would be unmerged:

 sci-libs/blas-reference
    selected: 20070226-r2 
   protected: none 
     omitted: none
Comment 3 Lukas Zavodny 2011-06-07 17:46:05 UTC
I can confirm that depclean is broken and wants to remove needed packages
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2011-06-09 22:26:59 UTC
Wrong product.
Comment 5 Zac Medico gentoo-dev 2011-06-09 22:51:16 UTC
(In reply to comment #2)
> But there are dependencies and the package is eselected:
> 
> root@lynx:/root(5)# equery d blas-reference
>  * These packages depend on blas-reference:
> virtual/blas-1.0 (sci-libs/blas-reference)
> root@lynx:/root(6)# eselect blas list
> Installed BLAS for library directory lib64
>   [1]   atlas
>   [2]   atlas-threads
>   [3]   reference *

It's likely related to this commit:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4f66159887fc4e3ec8bd87ae0f08ba249f98631b

As discussed in bug 370295, this commit (included in portage-2.1.0) makes --depclean eliminate redundant packages more effectively. The nature of anything that's eselected like this is that there are redundant choices, so you'd expect --depclean to remove the ones that aren't in your world file. The established solution is to add them to your world file, like this:

  emerge --noreplace blas-reference

If you want emerge to look at your eselect settings, that's already been requested in bug 198200 and bug 283587, but not implemented yet.
Comment 6 Zac Medico gentoo-dev 2011-06-10 10:28:12 UTC
(In reply to comment #1)
> It also trys to remove nano system package unless you reemerge it in to world.

I've added a new FAQ entry about this. See bug #370295, comment #28.

(In reply to comment #3)
> I can confirm that depclean is broken and wants to remove needed packages

The explanation for your case is likely similar to that given in comment #5.
Comment 7 Lukas Zavodny 2011-06-10 12:35:33 UTC
(In reply to comment #6)
> (In reply to comment #1)
> > It also trys to remove nano system package unless you reemerge it in to world.
> 
> I've added a new FAQ entry about this. See bug #370295, comment #28.
> 
> (In reply to comment #3)
> > I can confirm that depclean is broken and wants to remove needed packages
> 
> The explanation for your case is likely similar to that given in comment #5.

Thats not the case. For example my depclean wants to uninstall :

gnome-extra/gnome-utils
    selected: 3.0.1 
   protected: none 
     omitted: none 

but :

equery d gnome-utils
* These packages depend on gnome-utils:
gnome-base/gnome-extra-apps-3.0.0 (>=gnome-extra/gnome-utils-3.0.0)

This is no virtual/eselected/whatever packege. It is normal package merged as dependency of other package. Same unrar, merged as dependency of packages with rar flag. There is something more wrong...
Comment 8 Zac Medico gentoo-dev 2011-06-10 12:56:33 UTC
(In reply to comment #7)
> This is no virtual/eselected/whatever packege. It is normal package merged as
> dependency of other package. Same unrar, merged as dependency of packages with
> rar flag. There is something more wrong...

Alright, clearly that's a different issue. Please file a new bug.
Comment 9 Antti Mäkelä 2011-06-14 06:05:16 UTC
For me, with portage 2.2_alpha41, the --depclean wants to suddenly remove nano:

# emerge --depclean

 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 * 
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence, it is often necessary to run `emerge --update
 * --newuse --deep @world` prior to depclean.

Calculating dependencies... done!
>>> Calculating removal order...

                                                                                
!!! 'app-editors/nano' (virtual/editor) is part of your system profile.         
!!! Unmerging it may be damaging to your system.                                
                                                                                
>>> Waiting 10 seconds before starting...                                       
>>> (Control-C to abort)...
Press Ctrl-C to Stop in:  10 9

Why is this occurring? I mean, it *is* part of the system profile, right?
Comment 10 Zac Medico gentoo-dev 2011-06-14 16:35:47 UTC
(In reply to comment #9)
> Why is this occurring? I mean, it *is* part of the system profile, right?

Only indirectly via virtual/editor. You must have another editor installed. See bug 370295, comment #24.
Comment 11 Antti Mäkelä 2011-06-14 21:12:59 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Why is this occurring? I mean, it *is* part of the system profile, right?
> 
> Only indirectly via virtual/editor. You must have another editor installed. See
> bug 370295, comment #24.

Apparently I had ed installed. I still don't understand the warnings about removing system packages - if virtual/editor is a system package, it shouldn't warn me about nano, right? So is this a problem with the @system or portage?
Comment 12 Zac Medico gentoo-dev 2011-06-14 22:36:33 UTC
(In reply to comment #11)
> Apparently I had ed installed. I still don't understand the warnings about
> removing system packages - if virtual/editor is a system package, it shouldn't
> warn me about nano, right?

Well, virtual/editor makes the system set ambiguous, therefore there's ambiguity in deciding whether or not it should warn. Maybe it's a good idea to err on the safe side and show the warning even though it's ambiguous? I think so.

Also, note that the warning message includes virtual/editor in parenthesis. This is intended to denote the ambiguity.

> So is this a problem with the @system or portage?

I don't think it's a problem, though it may take some time for people to grow accustomed to editors being removed by --depclean like this. Some have argued that app-editors/nano should be added to the system set in order to prevent --depclean from removing it, which is debatable. Some would argue that anything satisfying virtual/editor should suffice.
Comment 13 Ben Kohler gentoo-dev 2014-08-01 20:03:50 UTC
There are several issues going on in this bug and I believe they are all better covered in another existing bug.  There's bug #283587 for removing currently "active" or "eselected" packages, and bug #375115 for ambiguity with virtuals.

*** This bug has been marked as a duplicate of bug 283587 ***