Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 675542 - dev-python/numpy - ld: /usr/lib64/librefblas.so: undefined reference to `_gfortran_st_write_done@GFORTRAN_7'
Summary: dev-python/numpy - ld: /usr/lib64/librefblas.so: undefined reference to `_gfo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-15 19:33 UTC by Horea Christian
Modified: 2020-05-13 00:32 UTC (History)
2 users (show)

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


Attachments
1.14.5 build.log (build.log,11.14 KB, text/plain)
2019-01-15 19:33 UTC, Horea Christian
Details
1.15.4 build.log (build.log,11.05 KB, text/plain)
2019-01-15 19:34 UTC, Horea Christian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Horea Christian 2019-01-15 19:33:34 UTC
Created attachment 561346 [details]
1.14.5 build.log

This happens for both =dev-python/numpy-1.14.5 and =dev-python/numpy-1.15.4 and probably other versions as well.

I have checked and both lapack and cblas are installed and selected.
Comment 1 Horea Christian 2019-01-15 19:34:11 UTC
Created attachment 561348 [details]
1.15.4 build.log
Comment 2 François Bissey 2019-01-16 09:46:54 UTC
Would you using gcc-8 by any chance?
x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe /var/tmp/portage/dev-python/numpy-1.15.4/temp/tmpW2Yg3q/var/tmp/portage/dev-python/numpy-1.15.4/temp/tmpW2Yg3q/source.o -L/usr/lib64 -lrefblas -lrefcblas -o /var/tmp/portage/dev-python/numpy-1.15.4/temp/tmpW2Yg3q/a.out
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libgfortran.so.4, needed by /usr/lib64/librefblas.so, not found (try using -rpath or -rpath-link)

libgfortran.so.4 is provided by gcc-7 but gcc-8 provides libgfortran.so.5 which means that blas and lapack have to be rebuilt.
Comment 3 Horea Christian 2019-01-16 10:30:21 UTC
As you have correctly identified from the log, I do indeed use `x86_64-pc-linux-gnu-8.2.0`. Your suggestion also solved the issue :) thanks!

The only remaining question for me is: why did neither `emerge @preserved-rebuild` nor `revdep-rebuild` pick up on this?
Comment 4 François Bissey 2019-01-16 23:59:03 UTC
That particular one is not picked up for a number of reasons. It is a hard case. But I have been fielding that problem for some months.
It started when moving to gcc-7 where libgortran moved from so.3 to so.4. And now with gcc-8 where it moved to so.5.

For a long time gfortran stayed at so.3 so it was not a problem. Part of the issue is FORTRAN itself which is underdefined compared to C or C++. Unlike those there is no "forward" compatibility in the language spec.
Comment 5 Mathy Vanvoorden 2019-07-03 12:03:26 UTC
Can confirm, reinstalling lapack and blas after upgrade to gcc 8 fixed issues with numpy for me.
Comment 6 Benda Xu gentoo-dev 2019-07-15 04:39:38 UTC
Sorry that we did not foresee this during the gfortran transition.  But let's close it as obsolete for now.
Comment 7 Benda Xu gentoo-dev 2019-07-15 04:40:50 UTC
Sorry, it is not obsolete.  There is still potential breakage in the future.
Comment 8 Benda Xu gentoo-dev 2019-07-15 04:41:32 UTC
(In reply to Horea Christian from comment #3)
> As you have correctly identified from the log, I do indeed use
> `x86_64-pc-linux-gnu-8.2.0`. Your suggestion also solved the issue :) thanks!
> 
> The only remaining question for me is: why did neither `emerge
> @preserved-rebuild` nor `revdep-rebuild` pick up on this?

I am having the same question.
Comment 9 Benda Xu gentoo-dev 2020-05-13 00:32:29 UTC
This is finally fixed in bug 646090.