User talk:Houseofsuns

From Gentoo Wiki
Jump to: navigation, search

Migration to science overlay from main tree

Applicability

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.

Migration

Note
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.

CODE
## mask packages superseded by science overlay
app-admin/eselect::gentoo
app-eselect/eselect-blas
app-eselect/eselect-cblas
app-eselect/eselect-lapack
virtual/blas::gentoo
virtual/cblas::gentoo
virtual/lapack::gentoo
sci-libs/gsl::gentoo
app-doc/blas-docs::gentoo
app-doc/lapack-docs::gentoo
sci-libs/blas-reference::gentoo
sci-libs/cblas-reference::gentoo
sci-libs/lapack-reference::gentoo
sci-libs/mkl::gentoo

Now we need to install app-admin/eselect from science overlay, which manages the new stack.

root #emerge --oneshot --ask --verbose app-admin/eselect::science

Next we install and configure the core components of the new BLAS and LAPACK stack.

root #FEATURES="-preserve-libs" emerge --oneshot --ask --verbose sci-libs/blas-reference::science
root #eselect blas set reference
root #FEATURES="-preserve-libs" emerge --oneshot --ask --verbose sci-libs/cblas-reference::science
root #eselect cblas set reference
root #FEATURES="-preserve-libs" emerge --oneshot --ask --verbose sci-libs/lapack-reference::science
root #eselect lapack set reference

Now we move all libraries to their version from the science overlay. The following uses app-portage/eix to find out which these are.

root #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 app-portage/gentoolkit.)

root #revdep-rebuild

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.

Possible Pitfalls

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.

root #rm /usr/lib{64}/libblas.so
root #revdep-rebuild

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).