Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

156.1. openblas-0.3.34

Optimised BLAS and LAPACK library

0.3.34-1 · BSD-3-Clause · 16.8 SBU · 37.7 MiB, 20 files · 41_system, 54 of 1047 · ports/core/sci-libs/openblas

Homepage: https://www.openblas.net/

Why it is in KDOS. The comment above it in script/phases/41_system/packages.d/sci-libs.txt:

DYNAMIC_ARCH is the OPPOSITE of kdos march's discipline and is right here for one reason: OpenBLAS carries a kernel per microarchitecture and picks by cpuid at RUNTIME. That is the dispatch musl closes off everywhere else, and upstream has maintained it for twenty years.

OpenBLAS is an optimised implementation of BLAS, the basic dense linear algebra routines, with LAPACK built on top of it in the same library. It is the one BLAS and LAPACK in KDOS: there is no reference lapack, blas or cblas port, so numpy, scipy, octave, R, gsl, qrupdate and the rest of the numerical ports all land their matrix work here.

Depends on: gcc, perl.

Required by (17): arpack-ng, bcftools, calculix, ceres-solver, gsl, highs, libggml, numpy, octave, opencv, qrupdate, R, scipy, suitesparse, sundials, translatelocally, xnec2c.

Sources: openblas-0.3.34.tar.gz (24.2 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install openblas'

build.sh:

make \
	DYNAMIC_ARCH=1 \
	TARGET=CORE2 \
	USE_OPENMP=0 \
	USE_THREAD=1 \
	NUM_THREADS=64 \
	NO_STATIC=1 \
	NO_AFFINITY=1 \
	FC=gfortran
make \
	DYNAMIC_ARCH=1 \
	TARGET=CORE2 \
	USE_OPENMP=0 \
	USE_THREAD=1 \
	NUM_THREADS=64 \
	NO_STATIC=1 \
	NO_AFFINITY=1 \
	FC=gfortran \
	PREFIX=/usr DESTDIR=$PKG install

ln -sf libopenblas.so   $PKG/usr/lib/libblas.so
ln -sf libopenblas.so   $PKG/usr/lib/libblas.so.3
ln -sf libopenblas.so   $PKG/usr/lib/liblapack.so
ln -sf libopenblas.so   $PKG/usr/lib/liblapack.so.3
ln -sf libopenblas.so   $PKG/usr/lib/libcblas.so

Libraries: libblas.so, libcblas.so, liblapack.so, libopenblas.so, libopenblasp-r0.3.34.so.

Directories: /usr/lib/cmake/openblas, /usr/share/licenses/openblas.

The five links build.sh makes after the install, libblas.so, libblas.so.3, liblapack.so, liblapack.so.3 and libcblas.so, all point at libopenblas.so. Consumers look the libraries up by those names: without the links a configure script that tests -lblas or -llapack reports no BLAS, and a binary that asks the loader for libblas.so.3 or liblapack.so.3 does not start. They are owned by this package, so no other port may install a reference BLAS or LAPACK under those names.

Both make lines carry the same variables. make install reads Makefile.system again and decides from them what to copy (NO_STATIC=1 is what keeps libopenblas.a out of the package), so a variable changed in one line and not the other installs something other than what was built.