Linux Archive

Linux Archive (
-   Gentoo Development (
-   -   cmake, ELF DT_NEEDED, sonames, and libcblas... Help!!! (

"Andreas K. Huettel" 11-29-2010 08:57 PM

cmake, ELF DT_NEEDED, sonames, and libcblas... Help!!!

I'm trying to fix the clapack ebuild so it links against _c_blas, not blas.
(Which, as soon as it works, will remove the fortran dependency for e.g.

I have a 99.99% working ebuild[*]. It generates a perfectly fine libclapack,
with one small problem: the libclapack is missing a NEEDED entry for libcblas.
$ scanelf -n

Obviously this is a problem, because as soon as another application wants to
link against libclapack, it "does not know" that it also needs libcblas, and
ends up with unresolved symbols. If I tell cmake to link against blas, this
looks fine:

$ scanelf -n /usr/lib64/
ET_DYN,, /usr/lib64/

The relevant cmake code is for cblas (bad):

target_link_libraries(clapack cblas f2c)

and for blas (good):

target_link_libraries(clapack blas f2c)

(one byte difference). Any clue what is going on here?

I have a personal suspicion, namely that is (on my system)
actually (symlinked to), and that maybe cmake reacts because
the library filename is not equal its SONAME. Does this make sense? And if
yes, what can I do about it?

Thanks a lot in advance for your help...

Cheers, Andreas


Andreas K. Huettel
Gentoo Linux developer

All times are GMT. The time now is 07:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.