Migration to science overlay from main tree
The BLAS and LAPACK stack in the science overlay are incompatible with the BLAS and LAPACK stack from the main tree. If you want to use the version from the science overlay you will have to migrate your installation.
If you see random packages fail to configure with problems finding BLAS and LAPACK you probably have already pulled in the science stack.
The ebuilds provided by the science overlay have no stable keywords. So if you are not running unstable (e.g. ~amd64) you will have to unmask them via the package.accept_keywords file.
First step is to mask the packages from the main tree which could interfere. Append the following to /etc/portage/package.mask to get them out of your system.
## mask packages superseded by science overlay
Now we need to installfrom science overlay, which manages the new stack.
emerge --oneshot --ask --verbose app-admin/eselect::science
Next we install and configure the core components of the new BLAS and LAPACK stack.
FEATURES="-preserve-libs" emerge --oneshot --ask --verbose sci-libs/blas-reference::science
eselect blas set reference
FEATURES="-preserve-libs" emerge --oneshot --ask --verbose sci-libs/cblas-reference::science
eselect cblas set reference
FEATURES="-preserve-libs" emerge --oneshot --ask --verbose sci-libs/lapack-reference::science
eselect lapack set reference
Now we move all libraries to their version from the science overlay. The following usesto find out which these are.
FEATURES="-preserve-libs" emerge --oneshot --ask --verbose --exclude sci-libs/blas-reference --exclude sci-libs/cblas-reference --exclude sci-libs/lapack-reference `eix --only-names --installed --in-overlay science`
We disabled the preserve-libs feature so that it does not preserve something we want to get rid of. This may break some reverse-dependencies so we need to fix this up. (This needs revdep-rebuild from.)
At this point you should be migrated to the science overlay. If something goes wrong look at the next section for hints. If there is a gap in this migration guide, please write an email.
If you tried the above but had preserve-libs enabled you will need to remove libblas.so and run revdep-rebuild to get rid of it.
You should also check for potential links named libclas.so and liblapack.so. With the science stack you shouldn't have any files or links named libblas.so, llibclas.so or liblapack.so under /usr/lib or /usr/lib64. Similarly you shouldn't have any static library counterpart (.a file).