Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650358 - sci-physics/root: should link to gslcblas explicitly
Summary: sci-physics/root: should link to gslcblas explicitly
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Guilherme Amadio
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-13 08:11 UTC by Benda Xu
Modified: 2018-08-03 02:26 UTC (History)
0 users

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


Attachments
build.log.xz (build.log.xz,158.33 KB, application/x-xz)
2018-03-13 08:11 UTC, Benda Xu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benda Xu gentoo-dev 2018-03-13 08:11:40 UTC
Created attachment 523694 [details]
build.log.xz

In root-6.12.06/math/mathmore/src/cblas.cxx, cblas_dgemm is called directly.

But the

root-6.12.06/math/mathmore/CMakeLists.txt only specified to link against gsl.


The error (in the attached build.log.xz)

> CMakeFiles/MathMore.dir/src/cblas.cxx.o: In function ROOT::Math::Blas::AMultB(int, int, int, double const*, double const*, double*)': cblas.cxx:(.text+0x30): undefined reference to `cblas_dgemm'
> CMakeFiles/MathMore.dir/src/cblas.cxx.o: In function `ROOT::Math::Blas::ATMultB(int, int, int, double const*, double const*, double*)':
> cblas.cxx:(.text+0x70): undefined reference to `cblas_dgemm'
> collect2: error: ld returned 1 exit status  

disappears upon adding '-lgslblas' to the linking command.

# emerge -pv root

These are the packages that would be merged, in order:

Calculating dependencies              ... done!                 
[ebuild   R    ] sci-physics/root-6.12.06:6.12/06::gentoo  USE="X asimage fortran gdml gsl math minuit python roofit tbb threads tiff tmva unuran xml -R (-aqua) -avahi -davix -emacs -examples -fftw -fits -graphviz -http -jemalloc -kerberos -ldap -libcxx -memstat -mysql -odbc -opengl* -oracle -postgres (-prefix) -pythia6 -pythia8 (-qt4) -root7 -shadow -sqlite -ssl -table {-test} -vc -xinetd -xrootd" PYTHON_SINGLE_TARGET="python3_6* -python2_7* -python3_4 -python3_5" PYTHON_TARGETS="python2_7 python3_6 -python3_4 -python3_5" 0 KiB
Comment 1 Guilherme Amadio gentoo-dev 2018-07-05 09:52:59 UTC
Hi Benda, how is your GSL configured? My GSL adds cblas to its flags:

$ gsl-config 
Usage: gsl-config [OPTION]

Known values for OPTION are:

  --prefix		show GSL installation prefix 
  --libs		print library linking information, with cblas
  --libs-without-cblas	print library linking information, without cblas
  --cflags		print pre-processor and compiler flags
  --help		display this help and exit
  --version		output version information

An external CBLAS library can be specified using the GSL_CBLAS_LIB
environment variable. The GSL CBLAS library is used by default.

epsft-53 master $ gsl-config --libs
-L/usr/lib64 -lgsl -lgslcblas -lm

Also, ROOT uses "gsl-config --libs" to set $GSL_LIBRARIES to link against.
Comment 2 Benda Xu gentoo-dev 2018-07-08 14:08:37 UTC
(In reply to Guilherme Amadio from comment #1)
> Hi Benda, how is your GSL configured? My GSL adds cblas to its flags:
> 
> $ gsl-config 
> Usage: gsl-config [OPTION]
> 
> Known values for OPTION are:
> 
>   --prefix		show GSL installation prefix 
>   --libs		print library linking information, with cblas
>   --libs-without-cblas	print library linking information, without cblas
>   --cflags		print pre-processor and compiler flags
>   --help		display this help and exit
>   --version		output version information
> 
> An external CBLAS library can be specified using the GSL_CBLAS_LIB
> environment variable. The GSL CBLAS library is used by default.
> 
> epsft-53 master $ gsl-config --libs
> -L/usr/lib64 -lgsl -lgslcblas -lm
> 
> Also, ROOT uses "gsl-config --libs" to set $GSL_LIBRARIES to link against.

Interesting, my `gsl-config --libs` outputs,
-L/usr/lib64 -lgsl -lm
Comment 3 Guilherme Amadio gentoo-dev 2018-07-11 05:31:48 UTC
Maybe you have USE=cblas-external for your gsl?

$ equery u gsl
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for sci-libs/gsl-2.4:
 U I
 - - cblas-external : Link gsl with external cblas provided by (virtual/cblas) instead of shipped internal version
 + + deprecated     : Enable deprecated functions
 - - static-libs    : Build static versions of dynamic libraries as well
Comment 4 Benda Xu gentoo-dev 2018-07-11 08:12:47 UTC
(In reply to Guilherme Amadio from comment #3)
> Maybe you have USE=cblas-external for your gsl?
> 
> $ equery u gsl
> [ Legend : U - final flag setting for installation]
> [        : I - package is installed with flag     ]
> [ Colors : set, unset                             ]
>  * Found these USE flags for sci-libs/gsl-2.4:
>  U I
>  - - cblas-external : Link gsl with external cblas provided by
> (virtual/cblas) instead of shipped internal version
>  + + deprecated     : Enable deprecated functions
>  - - static-libs    : Build static versions of dynamic libraries as well

Looks like I don't, this is the output of emerge -pv gsl

[ebuild   R    ] sci-libs/gsl-2.4:0/23::science  USE="-cblas-external -static-libs" 0 KiB

Oh, wait a minute, maybe it is the problem from gsl of science overlay.
Comment 5 Guilherme Amadio gentoo-dev 2018-08-02 15:28:05 UTC
Was this a local problem? Can we close?
Comment 6 Benda Xu gentoo-dev 2018-08-03 02:26:18 UTC
Ok, let's close it for the moment.