Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 639886 - dev-python/numexpr-2.6.2 - from numpy.linalg import lapack_lite, _umath_linalg ImportError: libgfortran.so.3: cannot open shared object file: No such file or directory
Summary: dev-python/numexpr-2.6.2 - from numpy.linalg import lapack_lite, _umath_linal...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 459038
Blocks:
  Show dependency tree
 
Reported: 2017-12-05 09:40 UTC by Silvio
Modified: 2020-03-28 11:28 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Silvio 2017-12-05 09:40:16 UTC
The compilation output:

>>> Emerging (1 of 4) dev-python/numexpr-2.6.2::gentoo
 * numexpr-2.6.2.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                            [ ok ]
>>> Unpacking source...
>>> Unpacking numexpr-2.6.2.tar.gz to /var/tmp/portage/dev-python/numexpr-2.6.2/work
>>> Source unpacked in /var/tmp/portage/dev-python/numexpr-2.6.2/work
>>> Preparing source in /var/tmp/portage/dev-python/numexpr-2.6.2/work/numexpr-2.6.2 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/numexpr-2.6.2/work/numexpr-2.6.2 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/numexpr-2.6.2/work/numexpr-2.6.2 ...
 * python2_7: running distutils-r1_run_phase python_compile
/usr/bin/python2.7 setup.py build
Traceback (most recent call last):
  File "setup.py", line 227, in <module>
    setup_package()
  File "setup.py", line 64, in setup_package
    from numpy.distutils.core import setup
  File "/usr/lib64/python2.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import add_newdocs
  File "/usr/lib64/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/lib64/python2.7/site-packages/numpy/lib/__init__.py", line 19, in <module>
    from .polynomial import *
  File "/usr/lib64/python2.7/site-packages/numpy/lib/polynomial.py", line 20, in <module>
    from numpy.linalg import eigvals, lstsq, inv
  File "/usr/lib64/python2.7/site-packages/numpy/linalg/__init__.py", line 51, in <module>
    from .linalg import *
  File "/usr/lib64/python2.7/site-packages/numpy/linalg/linalg.py", line 30, in <module>
    from numpy.linalg import lapack_lite, _umath_linalg
ImportError: libgfortran.so.3: cannot open shared object file: No such file or directory
 * ERROR: dev-python/numexpr-2.6.2::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_compile
 *   environment, line 4089:  Called distutils-r1_src_compile
 *   environment, line 1116:  Called _distutils-r1_run_foreach_impl 'python_compile'
 *   environment, line  343:  Called python_foreach_impl 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 3533:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 2624:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 2622:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_compile'
 *   environment, line  683:  Called distutils-r1_run_phase 'python_compile'
 *   environment, line 1109:  Called python_compile
 *   environment, line 3121:  Called distutils-r1_python_compile
 *   environment, line  984:  Called esetup.py 'build'
 *   environment, line 1669:  Called die
 * The specific snippet of code:
 *       "${@}" || die "${die_args[@]}";
 * 
 * If you need support, post the output of `emerge --info '=dev-python/numexpr-2.6.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/numexpr-2.6.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/numexpr-2.6.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/numexpr-2.6.2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/numexpr-2.6.2/work/numexpr-2.6.2'
 * S: '/var/tmp/portage/dev-python/numexpr-2.6.2/work/numexpr-2.6.2'
Comment 1 Silvio 2017-12-05 09:41:00 UTC
my emerge --info


Portage 2.3.16 (python 2.7.14-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-7.2.0, glibc-2.26-r3, 4.14.2-gentoo x86_64)
=================================================================
System uname: Linux-4.14.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-7500U_CPU_@_2.70GHz-with-gentoo-2.4.1
KiB Mem:    16286580 total,   2078344 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 05 Dec 2017 08:00:01 +0000
Head commit of repository gentoo: e4ddd5010c6420d7174a775bbc281b04842022ed
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.6-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.10.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            7.2.0::gentoo
sys-devel/gcc-config:     1.9.0-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 

betagarden
    location: /var/lib/layman/betagarden
    masters: gentoo
    priority: 50

flow
    location: /var/lib/layman/flow
    masters: gentoo
    priority: 50

vortex
    location: /var/lib/layman/vortex
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gd.tuwien.ac.at/opsys/linux/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dri3 dts dvd dvdr egl emboss encode exif fam ffmpeg fftw firefox flac fortran gdbm gif glamor gpm gtk hidpi iconv icu id3tag ipv6 jpeg kde kipi kwallet lcms ldap libinput libnotify mad mng modules mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ntfs ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio python qml qt3support qt5 readline s3tc sdl seccomp semantic-desktop session spell ssl startup-notification svg tcpd theora tiff touchpad truetype udev udisks unicode upower usb uxa v4l vaapi vdpau vorbis vpx widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xv xvid xvmc zlib" ABI_X86="64 32" ALSA_CARDS="snd_hda_intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 ssse3 sse4_1 sse4_2 glamor" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse joystick wacom synaptics evdev libinput" KERNEL="linux" L10N="it" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="it en it_IT en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" SANE_BACKENDS="*" USERLAND="GNU" VIDEO_CARDS="intel i965 i915 vesa v4l v4l2 modesetting fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 François Bissey 2017-12-06 07:56:14 UTC
Should we have some sort of meta bug for the fact that gcc 7.2 bump libgfortran.so from .3 to .4?

@ silvio try
revdep-rebuild --library 'libgfortran.so.3' -- --exclude gcc
and after that it should be ok. The problem is you have fortran libraries that were compiled with a previous version of gcc and linked to libgfortran.so.3. But in gcc 7.2.0, gfortran tries to link with libgfortran.so.4.
The above command should rebuild everything that depends on libgfortran.so.3.
Comment 3 Alex 2018-03-07 11:30:07 UTC
Got same error today, running revdep-rebuild as instructed told me 'Your system is consistent'.
Yet ldd on complaining binary shows it being linked to multiple libgfortran libs:

~% ldd /usr/lib64/python2.7/site-packages/numpy/linalg/lapack_lite.so
        linux-vdso.so.1 (0x00007fff769d9000)
        liblapack.so.0 => /usr/lib64/liblapack.so.0 (0x00007f0b0fad4000)
        libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 (0x00007f0b0f6d1000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f0b0f312000)
        libblas.so.0 => /usr/lib64/blas/reference/libblas.so.0 (0x00007f0b0f0be000)
        libgfortran.so.3 => not found
        libm.so.6 => /lib64/libm.so.6 (0x00007f0b0edaf000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libgcc_s.so.1 (0x00007f0b0eb98000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0b0e978000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f0b0e774000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007f0b0e571000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0b10474000)
        libgfortran.so.4 => /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libgfortran.so.4 (0x00007f0b0e17b000)
        libquadmath.so.0 => /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libquadmath.so.0 (0x00007f0b0df3a000)

I already tried reemerging numpy and blas-refernce, both compiles fine, but error remains.
Comment 4 François Bissey 2018-03-07 18:04:46 UTC
Output of `readelf -d /usr/lib64/python2.7/site-packages/numpy/linalg/lapack_lite.so` and `readelf -d /usr/lib64/blas/reference/libblas.so.0` please.
Comment 5 Alex 2018-03-16 17:45:42 UTC
(In reply to François Bissey from comment #4)
> Output of `readelf -d
> /usr/lib64/python2.7/site-packages/numpy/linalg/lapack_lite.so` and `readelf
> -d /usr/lib64/blas/reference/libblas.so.0` please.

welp, can't provide useful readelf output now, as I solved this error and forgot about my comment.
to make it work i did

for pkg in lapack-reference cblas-reference blas-reference numpy; do quickpkg $pkg; emerge --rage-clean $pkg; done
for pkg in lapack-reference cblas-reference blas-reference numpy; do emerge -1 $pkg; done

doing same in one loop didn't fix it for me.
Comment 6 Mathy Vanvoorden 2018-07-29 19:21:22 UTC
I'm bitten by this issue:

# revdep-rebuild --library 'libgfortran.so.3' -- --exclude gcc
 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please file bugs at: https://bugs.gentoo.org/
 * Collecting system binaries and libraries
 * Checking dynamic linking consistency

Your system is consistent


# readelf -d /usr/lib64/python3.6/site-packages/numpy/linalg/lapack_lite.cpython-36m-x86_64-linux-gnu.so

Dynamic section at offset 0x2dd0 contains 26 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [liblapack.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libpython3.6m.so.1.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000c (INIT)               0xea0
 0x000000000000000d (FINI)               0x22b4
 0x0000000000000019 (INIT_ARRAY)         0x202dc0
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x202dc8
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x190
 0x0000000000000005 (STRTAB)             0x608
 0x0000000000000006 (SYMTAB)             0x1e8
 0x000000000000000a (STRSZ)              720 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x203000
 0x0000000000000002 (PLTRELSZ)           648 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0xc18
 0x0000000000000007 (RELA)               0x960
 0x0000000000000008 (RELASZ)             696 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x930
 0x000000006fffffff (VERNEEDNUM)         1
 0x000000006ffffff0 (VERSYM)             0x8d8
 0x000000006ffffff9 (RELACOUNT)          19
 0x0000000000000000 (NULL)               0x0


# readelf -d /usr/lib64/blas/reference/libblas.so.0

Dynamic section at offset 0x55de8 contains 27 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libgfortran.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libblas.so.0]
 0x000000000000000c (INIT)               0x2260
 0x000000000000000d (FINI)               0x522a4
 0x0000000000000019 (INIT_ARRAY)         0x255dd0
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x255dd8
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x190
 0x0000000000000005 (STRTAB)             0x1920
 0x0000000000000006 (SYMTAB)             0x948
 0x000000000000000a (STRSZ)              1419 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x256000
 0x0000000000000002 (PLTRELSZ)           288 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x2140
 0x0000000000000007 (RELA)               0x2080
 0x0000000000000008 (RELASZ)             192 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x2000
 0x000000006fffffff (VERNEEDNUM)         3
 0x000000006ffffff0 (VERSYM)             0x1eac
 0x000000006ffffff9 (RELACOUNT)          3
 0x0000000000000000 (NULL)               0x0

# readelf -d /usr/lib64/lapack/reference/liblapack.so.0

Dynamic section at offset 0x4d4db8 contains 30 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libblas.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgfortran.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [liblapack.so.0]
 0x000000000000001d (RUNPATH)            Library runpath: [/usr/lib64/blas/reference]
 0x000000000000000c (INIT)               0x179f8
 0x000000000000000d (FINI)               0x459c7c
 0x0000000000000019 (INIT_ARRAY)         0x6d4da0
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x6d4da8
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x190
 0x0000000000000005 (STRTAB)             0xc628
 0x0000000000000006 (SYMTAB)             0x2c80
 0x000000000000000a (STRSZ)              13154 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x6d5000
 0x0000000000000002 (PLTRELSZ)           29232 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x107c8
 0x0000000000000007 (RELA)               0x10708
 0x0000000000000008 (RELASZ)             192 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x10658
 0x000000006fffffff (VERNEEDNUM)         4
 0x000000006ffffff0 (VERSYM)             0xf98a
 0x000000006ffffff9 (RELACOUNT)          3
 0x0000000000000000 (NULL)               0x0


Using the old bash-coded version of revdep-rebuild did find the missing dependencies and resolved the issue for me. The packages reinstalled were arpack, lapack-reference and blas-reference.

I have a quickpkg of the old blas-reference if interested.
Comment 7 Benda Xu gentoo-dev 2018-09-23 07:49:47 UTC
@Toolchain and @Portage Teams,

gfortran libraries like has been bumped from 3 to 4 (in gcc-7.2) and from 4 to 5 (in gcc-8), e.g.

  /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libgfortran.so.4

However the old versions of libgfortran.so.x are not preserved, resulting in runtime library dependency errors.


Could you comment on the possibility to have FEATURE preserve-libs work for libgfortran?

Yours,
Benda
Comment 8 Zac Medico gentoo-dev 2018-09-23 08:32:11 UTC
(In reply to Benda Xu from comment #7)
> Could you comment on the possibility to have FEATURE preserve-libs work for
> libgfortran?

It's the same issue as bug 459038, the preserved library would have to be added to the ld.so search path somehow.
Comment 9 Oleh Kravchenko 2019-04-04 07:07:18 UTC
I also reproduce this bug when did upgrade from gcc-7.3.0 to gcc-8.2.0:

> $ python3.6
> Python 3.6.5 (default, Dec 22 2018, 14:25:10) 
> [GCC 7.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numpy
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib64/python3.6/site-packages/numpy/__init__.py", line 142, in <module>
> from . import add_newdocs
> File "/usr/lib64/python3.6/site-packages/numpy/add_newdocs.py", line 13, in <module>
> from numpy.lib import add_newdoc
> File "/usr/lib64/python3.6/site-packages/numpy/lib/__init__.py", line 19, in <module>
> from .polynomial import *
> File "/usr/lib64/python3.6/site-packages/numpy/lib/polynomial.py", line 20, in <module>
> from numpy.linalg import eigvals, lstsq, inv
> File "/usr/lib64/python3.6/site-packages/numpy/linalg/__init__.py", line 51, in <module>
> from .linalg import *
> File "/usr/lib64/python3.6/site-packages/numpy/linalg/linalg.py", line 31, in <module>
> from numpy.linalg import lapack_lite, _umath_linalg
> ImportError: libgfortran.so.4: cannot open shared object file: No such file or directory
> >>>
Comment 10 François Bissey 2019-04-04 07:09:30 UTC
(In reply to Oleh Kravchenko from comment #9)
> I also reproduce this bug when did upgrade from gcc-7.3.0 to gcc-8.2.0:
> 
> > $ python3.6
> > Python 3.6.5 (default, Dec 22 2018, 14:25:10) 
> > [GCC 7.3.0] on linux
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import numpy
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in <module>
> > File "/usr/lib64/python3.6/site-packages/numpy/__init__.py", line 142, in <module>
> > from . import add_newdocs
> > File "/usr/lib64/python3.6/site-packages/numpy/add_newdocs.py", line 13, in <module>
> > from numpy.lib import add_newdoc
> > File "/usr/lib64/python3.6/site-packages/numpy/lib/__init__.py", line 19, in <module>
> > from .polynomial import *
> > File "/usr/lib64/python3.6/site-packages/numpy/lib/polynomial.py", line 20, in <module>
> > from numpy.linalg import eigvals, lstsq, inv
> > File "/usr/lib64/python3.6/site-packages/numpy/linalg/__init__.py", line 51, in <module>
> > from .linalg import *
> > File "/usr/lib64/python3.6/site-packages/numpy/linalg/linalg.py", line 31, in <module>
> > from numpy.linalg import lapack_lite, _umath_linalg
> > ImportError: libgfortran.so.4: cannot open shared object file: No such file or directory
> > >>>

That's because libgfortran was bumped again from so.4 to so.5.
Comment 11 Oleh Kravchenko 2019-04-04 07:27:48 UTC
(In reply to François Bissey from comment #10)
> (In reply to Oleh Kravchenko from comment #9)
> > I also reproduce this bug when did upgrade from gcc-7.3.0 to gcc-8.2.0:
> > 
> > > $ python3.6
> > > Python 3.6.5 (default, Dec 22 2018, 14:25:10) 
> > > [GCC 7.3.0] on linux
> > > Type "help", "copyright", "credits" or "license" for more information.
> > > >>> import numpy
> 
> That's because libgfortran was bumped again from so.4 to so.5.
Agree. I workaround it by:

> emerge sci-libs/blas-reference sci-libs/lapack-reference -qv1
Comment 12 Aaron D Borden 2019-10-20 17:39:45 UTC
I am also running into this with libgfortran.so.4 and gcc-8.3.0.

The python revdep-rebuild script did not detect anything that needed a rebuild but the old shell script worked for me.

    $ revdep-rebuild.sh --library 'libgfortran.so.4'

Which rebuilt sci-libs/lapack-reference and sci-libs/arpack and resolved the issue.
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-03-28 11:28:21 UTC
Old version removed.  Please reopen if it still happens.