Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 466112 - sci-libs/libghemical-3.0.0 fails to configure - blas library not found due to package expecting tradition blas.so lapack.so symlinks in /usr/lib
Summary: sci-libs/libghemical-3.0.0 fails to configure - blas library not found due to...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Chemistry-Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 466258
  Show dependency tree
 
Reported: 2013-04-16 14:39 UTC by cmuelle8
Modified: 2013-04-18 12:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
1366081008-install-sci-libs_libghemical-3.0.0:0::gentoo.out (1366081008-install-sci-libs_libghemical-3.0.0:0::gentoo.out,10.97 KB, text/plain)
2013-04-16 14:41 UTC, cmuelle8
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cmuelle8 2013-04-16 14:39:53 UTC
cave show -f libghemical::gentoo
* sci-libs/libghemical::gentoo
    ::gentoo                  2.00 2.99.1 3.0.0(~)* {:0}
    sci-libs/libghemical-3.0.0:0::gentoo
    Description               Chemical quantum mechanics and molecular mechanics
    Homepage                  http://bioinformatics.org/ghemical/
    Herds                     sci-chemistry
    Long Description          Ghemical supports both quantum-mechanics (semi-empirical and ab initio) models and molecular mechanics models (there is an experimental Tripos 5.2-like force field for organic molecules). Also a tool for reduced protein models is included. Geometry optimization, molecular dynamics and a large set of visualization tools are currently available.
    Use flags                 mopac7 mpqc -static-libs build_options: symbols=strip dwarf_compress -optional_tests -trace work=remove 
        Overridden Masks
            Keywords          ~amd64 ~ppc ~x86



pkg-config --libs --cflags blas
-I//opt/acml5.3.0/gfortran64_mp/include -L//opt/acml5.3.0/gfortran64_mp/lib -lacml_mp 


There are a bunch of packages using blas / lapack that are not using pkg-config to get includes and library paths right.  There's two ways to solve this:

a) either fix all of the offending packages (like libghemical) to use pkg-config

b) let blas / lapack variants install /usr/lib/lib{blas,lapack}.{so,a} symlinks to _current eselect profile

====================================================================================
I've used b) and solved the problem by putting links to the libraries into /etc/env.d/alternatives/{blas,lapack} like this (only blas shown as an example):

# ls -l /etc/env.d/alternatives/blas/acml-gfortran64-openmp/usr/lib64/
insgesamt 4
lrwxrwxrwx 1 root root   39 16. Apr 05:13 libblas.a -> ../../opt/acml5.3.0/lib64/libacml_mp.so
lrwxrwxrwx 1 root root   39 16. Apr 05:13 libblas.so -> ../../opt/acml5.3.0/lib64/libacml_mp.so
drwxr-xr-x 2 root root 4096 24. Mär 14:13 pkgconfig

# eselect blas list
Available providers for blas:
  [1]   acml-gfortran64
  [2]   acml-gfortran64-openmp *
  [3]   eigen
  [4]   openblas-threads

# eselect blas set acml-gfortran64-openmp

# ls -l /usr/lib64/libblas*
lrwxrwxrwx 1 root root 62 16. Apr 16:29 /usr/lib64/libblas.a -> ../../etc/env.d/alternatives/blas/_current/usr/lib64/libblas.a
lrwxrwxrwx 1 root root 63 16. Apr 16:29 /usr/lib64/libblas.so -> ../../etc/env.d/alternatives/blas/_current/usr/lib64/libblas.so


Since this is a symbolic link to a link within a _current profile, it will properly switch with (or break) on an eselect change of blas, which is what we want.  The links are updates by eselect itself on a library change.
====================================================================================


To use b) as a fix throughout the system every package installing a blas/lapack variant should install working symlinks within /etc/env.d/alternatives/{blas,lapack}/${variant}/usr/$(get-libdir) e.g.
  /etc/env.d/alternatives/blas/${variant}/usr/lib64/libblas.so
  /etc/env.d/alternatives/blas/${variant}/usr/lib64/libblas.a

-> bugs should be filed for every package installing a blas/lapack variant that does not


In case a)
-> bugs should be filed for each package not using pkg-config to find libs and cflags when linking blas or lapack


Greetings

Reproducible: Always
Comment 1 cmuelle8 2013-04-16 14:41:06 UTC
Created attachment 345698 [details]
1366081008-install-sci-libs_libghemical-3.0.0:0::gentoo.out