Issues with the latest versions of openblas (0.3.13-1+)

Problems with packages? Post here, using [tags] of the package name.

Issues with the latest versions of openblas (0.3.13-1+)

Postby Feakster » Fri Jan 08, 2021 6:43 pm

Has anyone else had issues using the latest version of openblas with R? When trying to launch R, I got the following error message:

Code: Select all
/usr/lib/R/bin/exec/R: error while loading shared libraries: cannot open shared object file: No such file or directory

I had to downgrade openblas to version 0.3.12-1 in order to get R to launch as expected.
Posts: 5
Joined: Wed Nov 11, 2020 9:49 am

Re: Issues with the latest versions of openblas (0.3.13-1+)

Postby Feakster » Tue Jan 12, 2021 5:44 pm

The issue seems to revolve around the symlink for:

Code: Select all

not being created. However, I'm not sure why this is the case as the link is present in:

Code: Select all

when manually running makepkg on the PKGBUILD.
Posts: 5
Joined: Wed Nov 11, 2020 9:49 am

Re: Issues with the latest versions of openblas (0.3.13-1+)

Postby Feakster » Wed Jan 13, 2021 8:10 pm

I've been faffing with the PKGBUILD to try some things & have made a few modifications:

  • - Bump in package release.
  • - Added 'openmp' to the "depends" array, as it's listed as an option the "make" step.
  • - Removed 'perl' from the "makedepends" array. I presume 'perl' was added by accident, in place of 'sed'.
  • - Altered the "arch" array to reflect the ARM build targets.
  • - Moved the makefile erasure and "TARGET" detection steps to the prepare() function.
  • - Refactored the "TARGET" detection sequence to use case/esac. The previous sequence would trigger errors where it formed the last call of a function. There's probably an obvious reason for this, but I lack the bash skills to fix it, so I changed it.
  • - Added the 'DYNAMIC_ARCH=1' option for aarch64 architecture. When the TARGET is set to ARMV8, this seems to result in openblas being compiled for all ARMv8 cortex targets, which does increase the build time somewhat, but may have performance benefits. I haven't been able to test this, but welcome feedback. Incidentally, this fixes the bug on aarch64 architecture where the shared object for libopenblas has "armv8" randomly shoved in its name, which had broken the symlinking.
  • - Removed some unnecessary options from the 'make install' line as they weren't doing anything.
  • - Removed the '-e' option from all 'sed' commands, as it's not required here (no multiple expression 'sed' calls.)
  • - Restructured the package() function.
  • - Added comments.
  • - Added myself to the Contributors section (as I think I've now spend enough time on this).

Code: Select all
# Maintainer: Felix Yan <>
# Contributor: Giuseppe Borzi <gborzi _AT_ ieee _DOT_ org>
# Contributor: Feakster <feakster at posteo dot eu>

# ALARM: Kevin Mihelich <>
#  - set build targets
#  - clear Makefile.arm (bad cflags overrides)

pkgdesc='An optimized BLAS library based on GotoBLAS2 1.13 BSD'
arch=('arm' 'armv6h' 'armv7h' 'aarch64')
depends=('gcc-libs' 'openmp')
provides=('blas=3.8.0') # 3.9.0? Does the version even need to be set?

prepare() {
    # Change Directory
    cd "$srcdir/$_pkgname-$pkgver"

    # Wipe 32-Bit ARM Makefile Contents
    truncate -s 0 Makefile.arm

    # Manually Set CONFIG Target & Opts
    case $CARCH in
            CFLAGS=`echo $CFLAGS | sed 's/vfpv3-d16/neon/'`
            CXXFLAGS="$CFLAGS" # Used?
            echo 'CPU architecture not supported'
            exit 1

build() {
    # Change Directory
    cd "$srcdir/$_pkgname-$pkgver"

    # Build Libs
    libs shared

package() {
    # Change Directory
    cd "$srcdir/$_pkgname-$pkgver"

    # Install
    make install PREFIX="$pkgdir"/usr

    # Remove Crud
    rm -f "$pkgdir"/usr/include/cblas.h "$pkgdir"/usr/include/lapack*
    rmdir "$pkgdir"/usr/bin

    # Install License
    install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE

    # Symlink Shared Objects
    cd "$pkgdir"/usr/lib/
    ln -s libopenblasp-r$
    ln -s libopenblasp-r$

    # Mod Ancillary Files
    ln -s openblas.pc "$pkgdir"/usr/lib/pkgconfig/blas.pc
    sed -i "s|$pkgdir||" "$pkgdir"/usr/lib/pkgconfig/openblas.pc
    sed -i "s|$pkgdir||" "$pkgdir"/usr/lib/cmake/openblas/OpenBLASConfig.cmake

# vim:set ts=2 sw=2 et:

Looking over the PKGBUILD, I also have a few queries:

  • -Is 'gcc-fortran' required in the "makedepends" array? The GitHub README for openblas states that a fortran compiler is only required for the optional compilation of LAPACK, but the PKGBUILD had/has the 'NO_LAPACK=1' option set in the 'make' command.
  • - Is 'CXXFLAGS' being referenced in any way on armv7h? I've left the code in there, just in case.
  • - Should the 'provides' array not reference the latest version of blas (3.9.0)?
Posts: 5
Joined: Wed Nov 11, 2020 9:49 am

Return to Packages

Who is online

Users browsing this forum: No registered users and 3 guests