Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 551764 - [science] sci-libs/openblas-0.2.14 fails to install
Summary: [science] sci-libs/openblas-0.2.14 fails to install
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-11 13:12 UTC by Michelangelo Scopelliti
Modified: 2015-12-07 01:19 UTC (History)
3 users (show)

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


Attachments
complete build log (openblas-0.2.14:20150611-131128.log.gz,335.88 KB, application/x-gzip)
2015-06-11 13:18 UTC, Michelangelo Scopelliti
Details
the patch preventing multiple alternative_for calls (lapack-multilib-alternative.diff,1.18 KB, text/plain)
2015-11-24 17:16 UTC, Shunsuke Shimizu
Details
the patch preventing multiple alternative_for calls for open blas (openblas-multilib-alternative.diff,3.52 KB, text/plain)
2015-11-24 17:22 UTC, Shunsuke Shimizu
Details
build log of installation failure (build.log.xz,33.67 KB, application/x-xz)
2015-12-07 01:11 UTC, Jeremy Murphy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michelangelo Scopelliti 2015-06-11 13:12:44 UTC
openblas compiles fine, but fails to install with error

!!! Error: /var/tmp/portage/sci-libs/openblas-0.2.11/image//etc/env.d/alternatives/blas/openblas-openmp already present. You need ot remove it before adding it again



Reproducible: Always




emerge --info:

Portage 2.2.20 (python 3.4.3-final-0, default/linux/amd64/13.0, gcc-4.9.2, glibc-2.20-r2, 4.0.5 x86_64)
=================================================================
System uname: Linux-4.0.5-x86_64-AMD_A8-3870_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2
KiB Mem:    15888956 total,  11263268 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 11 Jun 2015 06:30:02 +0000
sh bash 4.3_p39
ld ld di GNU (Gentoo 2.25 p1.2) 2.25
app-shells/bash:          4.3_p39::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2-r1::gentoo
dev-lang/python:          2.7.9-r1::libressl, 3.4.3::gentoo
dev-util/cmake:           3.2.3::gentoo
dev-util/pkgconfig:       0.28-r3::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.16.4::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25-r1::gentoo
sys-devel/gcc:            4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.0::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

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

kernelpanic
    location: /usr/local/portage
    masters: gentoo

libressl
    location: /var/lib/layman/libressl
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/libressl.git
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    sync-type: laymansync
    sync-uri: https://github.com/gentoo-science/sci.git
    masters: gentoo
    priority: 50

tox-overlay
    location: /var/lib/layman/tox-overlay
    sync-type: laymansync
    sync-uri: git://github.com/urras/gentoo-overlay-tox.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA @EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/lib64/tomoyo/conf /usr/share/config /usr/share/gnupg/qualified.txt /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-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /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 -mtune=native -O2 -pipe"
DISTDIR="/var/portage/distfiles"
FCFLAGS="-march=native -mtune=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-march=native -mtune=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
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"
PORTAGE_TMPDIR="/var/tmp"
USE="3dnow 3dnowext X a52 aac aalib acl alisp alsa amd64 amr ao apng bazaar bluetooth bs2b bzip2 cairo cblas-external cdio chm clang cli colord contrast cracklib crypt cups curl cvs cxx dbus dhcp djbfft djvu dri dri3 dv dvb dvd dvdnav ebook egl emf encode excel exif faac fdk ffmpeg fftw firmware flac fontconfig fontforge fortran fpx ftp gbm gcj gdbm gif gimp gmp gpg gpm graphite gsm gstreamer gudev hdri hwdb iconv icu id3tag inotify int64 ipv6 ipython ithreads jbig jemalloc jpeg jpeg2k kdrive lame lapack latex lcms lensfun libass libcaca libkms libnotify libressl libsamplerate lqr lzma lzo mad matplotlib mercurial metric mmap mmx mmxext mng modplug modules mp3 mp3rtp mpeg mpi multicall multilib multitarget natspec ncurses netlink network nlopt nls nptl numpy obex offensive offlinehelp ogg opencl openexr opengl openmp opus osmesa pam pango passwdqc pcre pdf png pnm popcnt postproc postscript python q16 q32 q64 q8 qt3support quicktime rar raw readline romio rtmp scanner schroedinger secure-delete session smp sndfile sound sox speex sse sse2 sse3 sse4a ssl startup-notification svg system-cairo system-icu system-jpeg system-jsoncpp system-libvpx system-sqlite t1lib tftp tga theora threads tiff timezone truetype twolame type3 udev umfpack unicode usb vcd vdpau vf-dlopen video vim-syntax vorbis vpx wavpack webp wmf wxwidgets x264 x265 xa xdg xephyr xkb xml xmp xorg xpm xscreensaver xv xvfb xvid xvmc yuv4mpeg zlib" ABI_X86="32 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="it en" OFFICE_IMPLEMENTATION="libreoffice" OPENMPI_FABRICS="knem" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="aarch64 arm i386 x86_64" QEMU_USER_TARGETS="aarch64 arm i386 x86_64 armeb" RUBY_TARGETS="ruby22" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Michelangelo Scopelliti 2015-06-11 13:18:06 UTC
Created attachment 404934 [details]
complete build log

relevant messages

 * ERROR: sci-libs/openblas-0.2.14::science failed (install phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_install
 *   environment, line 2831:  Called multibuild_foreach_variant 'run_in_build_dir' 'fortran-int64_multilib_multibuild_wrapper' 'my_src_install'
 *   environment, line 2015:  Called _multibuild_run 'run_in_build_dir' 'fortran-int64_multilib_multibuild_wrapper' 'my_src_install'
 *   environment, line 2013:  Called run_in_build_dir 'fortran-int64_multilib_multibuild_wrapper' 'my_src_install'
 *   environment, line 2735:  Called fortran-int64_multilib_multibuild_wrapper 'my_src_install'
 *   environment, line 1271:  Called my_src_install
 *   environment, line 2811:  Called alternatives_for 'blas' 'openblas-openmp' '0' '/usr/lib64/pkgconfig/blas.pc' 'openblas-openmp.pc'
 *   environment, line  546:  Called die
 * The specific snippet of code:
 *       ALTERNATIVESDIR_ROOTLESS="${ED}/etc/env.d/alternatives" eselect alternatives add ${@} || die;
 * 
 * If you need support, post the output of `emerge --info '=sci-libs/openblas-0.2.14::science'`,
 * the complete build log and the output of `emerge -pqv '=sci-libs/openblas-0.2.14::science'`.
 * The complete build log is located at '/var/log/portage/build/sci-libs/openblas-0.2.14:20150611-131128.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sci-libs/openblas-0.2.14/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-libs/openblas-0.2.14/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-libs/openblas-0.2.14/work/openblas-0.2.14-amd64'
 * S: '/var/tmp/portage/sci-libs/openblas-0.2.14/work/openblas-0.2.14'
Comment 2 Shunsuke Shimizu 2015-11-24 17:16:17 UTC
Created attachment 417756 [details]
the patch preventing multiple alternative_for calls
Comment 3 Shunsuke Shimizu 2015-11-24 17:17:30 UTC
This bug is caused because `alternatives_for` is called several times in multilib environment (typically twice: for lib32 and lib64). First call of `alternative_for` successfully creates an alternative for openblas, and second call fails complaining that the alternative openblas already exists.

The solution is unify `alternative_for` calls to one call, by aggregating its arguments. With attached patch doing this fix, the problem is solved in my environment.
Comment 4 Shunsuke Shimizu 2015-11-24 17:19:40 UTC
Sorry I uploaded a different patch (previous attached patch is for lapack, fixing the same problem). I will update the correct patch.
Comment 5 Shunsuke Shimizu 2015-11-24 17:22:20 UTC
Created attachment 417758 [details]
the patch preventing multiple alternative_for calls for open blas

This is a correct patch.

Though this patch is a bit long since I eliminated unnecessary .pc file search and changed indent level, the fix is fundamentally simple.
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2015-11-24 17:23:16 UTC
(In reply to Shunsuke Shimizu from comment #5)
> Created attachment 417758 [details]
> the patch preventing multiple alternative_for calls for open blas
> 
> This is a correct patch.
> 
> Though this patch is a bit long since I eliminated unnecessary .pc file
> search and changed indent level, the fix is fundamentally simple.

Thanks for the patches. But I rewrote the whole eclass. It's nearly finished, Just need to update all ebuild. Expect the work to land until the end of the week.
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2015-11-28 17:30:43 UTC
commit bc36b5406f2bb289a3920ef13d50853a567bc83d
Author: Justin Lecher <jlec@gentoo.org>
Date:   Sat Sep 19 09:14:19 2015 +0200

    Large fix of numeric code

    fortran-int64.eclass code has been splitted into
    numeric-int64-multibuild.eclass, fortran-2.eclass and
    numeric.eclass.

    Gentoo:
    https://bugs.gentoo.org/show_bug.cgi?id=563292
    https://bugs.gentoo.org/show_bug.cgi?id=551764
    https://bugs.gentoo.org/show_bug.cgi?id=555302

    Github:
    resolves gentoo-science/sci#438
    resolves gentoo-science/sci#443
    resolves gentoo-science/sci#447
    resolves gentoo-science/sci#450
    resolves gentoo-science/sci#467
    resolves gentoo-science/sci#492
    resolves gentoo-science/sci#507
    resolves gentoo-science/sci#508
    resolves gentoo-science/sci#522

    Signed-off-by: Justin Lecher <jlec@gentoo.org>
Comment 8 Jeremy Murphy 2015-12-07 01:06:28 UTC
I think I just hit this bug trying to emerge openblas-0.2.15. 
Here is an excerpt from the error:

 * amd64_int32: running numeric-int64-multibuild_multilib_wrapper pc_file blas openblas
 * int32: running numeric-int64-multibuild_multilib_wrapper pc_install blas openblas
 * ACCESS DENIED:  mkdir:        /etc/env.d/alternatives/blas/openblas-threads
mkdir: cannot create directory ‘/etc/env.d/alternatives/blas/openblas-threads’: Permission denied
!!! Error: Failed to create /etc/env.d/alternatives/blas/openblas-threads
Call stack:
    * alternatives_do_add (alternatives-common.bash:288)
    * do_add (alternatives.eselect:147)
    * check_do (core.bash:24)
    * do_action (core.bash:105)
    * main (eselect:309)
exiting

I'll attach the full log too.
Comment 9 Jeremy Murphy 2015-12-07 01:11:07 UTC
Created attachment 418700 [details]
build log of installation failure

Build log for installation failure in previous message.
Comment 10 François Bissey 2015-12-07 01:19:09 UTC
Can you open another bug please? Since this one has been marked "resolved fixed" other dev may be ignoring it. Plus that's a separate issue from the original one and it stems from code we incorporated in the latest commit to provide support for prefix. And of course you don't get access denied on prefix so we missed it when testing.

The solution will require some thought.