Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 681786

Summary: =sci-libs/scipy-1.{0,1}.0: ImportError: libgfortran.so.4: cannot open shared object file: No such file or directory
Product: Gentoo Linux Reporter: Till Schäfer <till2.schaefer>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal CC: frp.bissey
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Till Schäfer 2019-03-26 10:20:14 UTC
Created attachment 570834 [details]
build.log

scipy-1.1.0 fails to build with the error: 

 * python2_7: running distutils-r1_run_phase python_compile
scipy/linalg/_generate_pyx.py: all files up-to-date
Traceback (most recent call last):
  File "scipy/special/_generate_pyx.py", line 152, in <module>
    import numpy
  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 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
Running scipy/special/_generate_pyx.py
Running scipy/linalg/_generate_pyx.py
Traceback (most recent call last):
  File "tools/cythonize.py", line 306, in <module>
    main()
  File "tools/cythonize.py", line 302, in main
    find_process_files(root_dir)
  File "tools/cythonize.py", line 268, in find_process_files
    for result in pool.imap_unordered(lambda fn: process_generate_pyx(fn, lock), jobs):
  File "/usr/lib64/python2.7/multiprocessing/pool.py", line 673, in next
    raise value
RuntimeError: Running scipy/special/_generate_pyx.py failed




# emerge --info scipy
Portage 2.3.62 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-8.2.0, glibc-2.28-r5, 4.20.12-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.20.12-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.6
KiB Mem:    15945108 total,   1996228 free
KiB Swap:   16801788 total,  16801020 free
Timestamp of repository gentoo: Tue, 26 Mar 2019 09:04:26 +0000
Head commit of repository gentoo: 45919ae1a5507dceac245e8403e4e9b01040ae36

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    sync-git-verify-commit-signature: true

shared_overlay
    location: /opt/conf/common/var/db/repos/shared_overlay
    masters: gentoo
    priority: 100

local_overlay
    location: /var/db/repos/local_overlay
    masters: gentoo
    priority: 200

Installed sets: @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ftree-vectorize -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/portage/package.accept_keywords/99-autounmask /etc/portage/package.unmask/99-autounmask /etc/portage/package.use/99-autounmask /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -ftree-vectorize -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --autounmask-write --autounmask-continue --jobs=2 --load-average=8 --backtrack=100"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned sandbox sfperms sign splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
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 aes alsa amd64 apng avx bash-completion berkdb bluetooth branding brotli bzip2 cairo cdaudio cdda cddb cdparanoia cdr chm cli consolekit crypt cups cxx dbus declarative djvu dnssec dri dts dvd dvdr emboss encode epub evdev exif f16c fam ffmpeg flac fortran gdbm gif glamor glib gpg gpm gstreamer gtk gzip iconv icu id3tag idn imagemagick inotify ipv6 irc jpeg jpeg2k kde kipi kwallet lame latex lcms ldap libnotify libsamplerate libtirpc lzma mad matroska mmx mmxext mng mp3 mp4 mpeg mplayer mtp multilib musicbrainz ncurses nls nptl ntp ogg opengl openmp opus otr pam pango pclmul pcre pdf phonon plasma png policykit popcnt ppds pulseaudio qml qt5 quicktime rar readline real rss sdl seccomp semantic-desktop spell spice sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg syslog taglib tcpd theora threads thumbnail tiff truetype twolame udev udisks uefi unicode upower usb v4l v4l2 vaapi vcd vim-syntax visualization vorbis vpx wavpack widgets wma wmf wxwidgets x264 x265 xattr xcb xcomposite xinerama xml xv xvid xvidv xvmc xz zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx f16c mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sci-libs/scipy-0.19.1::gentoo was built with the following:
USE="-doc -sparse -test" ABI_X86="(64)" PYTHON_TARGETS="python2_7 python3_6 -python3_4 -python3_5"
CFLAGS="-march=native -O2 -pipe -ggdb"
CXXFLAGS="-march=native -O2 -pipe -ggdb"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -shared"
Comment 1 Till Schäfer 2019-03-26 10:25:13 UTC
current stable GCC does provide soname libgfortran.so.5 only
Comment 2 Till Schäfer 2019-03-26 10:27:33 UTC
to no surprise, the error also applies to 1.0.0
Comment 3 François Bissey 2019-03-26 10:52:42 UTC
You have to rebuild all the fortran packages linking to libgfortran. That usually includes blas and lapack and their dependencies. 

I keep explaining to people across multiple bugs on bugzilla.
Comment 4 Till Schäfer 2019-03-26 10:59:15 UTC
thx, also found Bug 644020 -> solution (rebuilding blas-reference / lapack-reference) worked for me

*** This bug has been marked as a duplicate of bug 644020 ***