Closed strogdon closed 7 years ago
Actually upstream is using 2.1 but yes it looks like something is faulty with gsl 2.1 to use it as cblas. I'll have a look.
Also, the installed gsl.pc
file is probably not correct. I believe one should get
pkg-config --libs gsl
-lgsl -lgslcblas -lm
Embarrassing I have gsl 2.1 installed from a private overlay. Scouting for differences.
It looks like gsl 2.1 uses numeric-int64-multibuild.eclass
from science overlay.
It does and it has the useflag cblas-external I am building stuff to see what happens, since when do I have multi-abi enabled, I'll have to check that.
OK it looks like if have USE=cblas-external
, libgslcblas is still produced but none of the alternative files to switch to gsl as a cblas provider are installed. But then gsl.pc looks like:
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
includedir=/usr/include
GSL_CBLAS_LIB=-lopenblas_threads
Name: GSL
Description: GNU Scientific Library
Version: 2.1
Libs: -L/usr/lib64 -lgsl ${GSL_CBLAS_LIB} -lm -lm
Cflags: -I/usr/include
so pkg-config --libs gsl
should have a cblas in it. Looking at the other scenario with cblas-external
disabled.
Outcome seems to be what I expect (or almost) for USE=-cblas-external
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
includedir=/usr/include
GSL_CBLAS_LIB=-lgslcblas
Name: GSL
Description: GNU Scientific Library
Version: 2.1
Libs: -L/usr/lib64 -lgsl ${GSL_CBLAS_LIB} -lm -lm
Cflags: -I/usr/include
and the alternative files are there. It is a bit dubious in my opinion to cblas.pc point to gsl.pc but I guess it works. So it looks like you have an incorrect gsl.pc for some reason. Can you post it?
Ha! USE="-cblas-external -int64"
produce an incorrect gsl.pc
:
prefix="/usr"
exec_prefix="/usr"
libdir="/usr/lib64"
includedir="/usr/include"
Name: gsl
Description: GNU Scientific Library CBLAS implementation
Version: 2.1
URL: http://www.gnu.org/software/gsl/
Requires:
Requires.private:
Conflicts:
Libs: -L"/usr/lib64" -L${libdir} -lgsl
Libs.private: -lm
Cflags: -I"/usr/include" -I${includedir}
And I believe that's what you have.
Yes, that's what I have.
The gsl.pc
files should be identical, at least output wise, for USE="-cblas-external int64"
and USE="-cblas-external -int64"
but clearly they are not. Definitely a science overlay bug. Still trying to track it. Should open a matching issue for the science overlay.
Temporary fix is to have USE=int64
added for gsl
.
if ! numeric-int64_is_static_build; then
create_pkgconfig \
--name ${profname} \
--description "${DESCRIPTION} CBLAS implementation" \
--libs "-L\${libdir} -l${libname}" \
--libs-private "-lm" \
--cflags "-I\${includedir} $(numeric-int64_get_fortran_int64_abi_fflags)" \
${profname}
fi
must be run for int32 only build when it shouldn't - it should only run for int64 builds. I am not sure what is the logic that leads to that happening.
Do you get?
>>> Installing (1 of 1) sci-libs/gsl-2.1::science
>>> needed sym /storage/strogdon/gentoo-rap/usr/lib64/libgsl.so.0
>>> needed obj /storage/strogdon/gentoo-rap/usr/lib64/libgsl.so.0.17.0
!!! Error: Can't load module cblas-int64
This is in prefix.
I thought that was fixed :(
Did you have both -cblas-external
and int64
in your useflags?
Yes
[I] sci-libs/gsl
Available versions: 1.14 1.16 1.16-r2[1] 2.1(0/19) 2.1(0/19)[1] {cblas-external int64 static-libs ABI_X86="32 64"}
Installed versions: 2.1[1](02:15:33 AM 06/22/2016)(int64 -cblas-external -static-libs ABI_X86="64 -32")
Homepage: http://www.gnu.org/software/gsl/
Description: GNU Scientific Library
[1] "science" /storage/strogdon/gentoo-prefix/var/lib/layman/science
This needs to go to the science overlay. That's at least two bugs. Then there would be a question of intent. gslcblas should be a separate thing from gsl in my opinion but the added complexity may be too much to handle.
With -cblas-external
and int64
useflags
pkg-config --libs cblas
-lgsl -lgslcblas -lm
I think this should only be -lgslcblas
for my cblas
and there is no /usr/include/cblas.h
symlink
See earlier comments, cblas.pc
is linked to gsl.pc
- terrible but you have to redesign things to separate the two. It is the correct thing to do of course.
The header is indeed missing. Potentially a third bug (fourth if we count separation of gslcblas).
Perhaps not the most correct thing, but I think a gsl-2.1 ebuild could be designed around that of gsl-1.16-r2
I think I just nuked my private version of gsl-2.1
based on gsl-1.6-r2
from my private overlay :(
Shouldn't be hard to redo anyway.
I see, 1.6-r2 doesn't support int64
and I am not sure why the useflag has been added since there is no library for int64 generated and the one pointed to by gsl-int64.pc doesn't exist. Who commited this mess.
I seems to work here if I move gsl-1.16-r2
to my local overlay as gsl-2.1
and add alternatives-2.eclass
I am preparing a new ebuild to submit as a PR to the scence overlay. Copying 1.6-r2 to 2.1 won't be allowed because it is EAPI 5 and they will only accept EAPI 6 in, unless there is a compelling reason to do otherwise. I think the int64 stuff was added as a "cheap" way to get there. Do you have a 32bit machine anywhere? Not just a multi-abi machine, something that boots as x86 rather than x86_64. There is a test in gsl 2.1 that fails in 32 bits ABI when I build multi abi on my x86_64 machine. That's numerical precision stuff of numbers close to zero.
Sorry, I don't have a 32 bit machine anymore.
Turns out it doesn't fix my problem.
Will still go on with the PR soon because the current ebuild has the same problem anyway.
This is probably a science-overlay bug. sage-on-gentoo requires
>=sci-libs/gsl-1.16
butgsl-2.1
will not work. The symptom after installinggsl-2.1
andeselect cblas set gsl
.and the symlink
/usr/include/cblas.h
is missing. This latter causesiml
to fail. After installinggsl-2.1
and then downgrading togsl-1.16-r2
the/usr/include/cblas.h
symlink is still missing even thougheselect cblas list
returnsgsl
as the currentcblas
-eselect cblas set gsl
then restores the symlink.