Openblas and openblas64 module issue in F39

Hi there, this is my first post on this forum so pardon me if I am doing something wrong.

I am facing issue with cmake errors, cannot find openblas and openblas64 module.

My Aim: build llama cpp with openblas
Issue at steps: cmake … -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS
cmake --build . --config Release

Initial error:

Then, I followed BUG: pip install scipy from git fails with `"openblas" not found` · Issue #16308 · scipy/scipy · GitHub and created my openblas.pc, setting pkg config path and rebuilding. It worked, but it was a false positive.

This is my openblas.pc content →

libdir=/usr/lib64
includedir=/usr/include/openblas
version=0.3.21
extralib=-lm -lpthread -lgfortran
Name: openblas
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version
Version: ${version}
URL: GitHub - OpenMathLib/OpenBLAS: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
Libs: -L${libdir} -lopenblas
Libs.private: ${extralib}
Cflags: -I${includedir}

I got this output after running
export PKG_CONFIG_PATH=/home/void/void:$PKG_CONFIG_PATH

So I thought why not do same for openblas64, and I created openblas64.pc just changing Name: openblas64. It successfully build (but it just looked like it).

When I am actually building cmake --build . --config Release, I am getting error cblas.h not found. It’s actually there in /usr/include/openblas directory, I re-checked. So its evident that creating my own openblas.pc and opeblas64.pc doesn’t seem to work truly.

Things I have tried:

  1. reinstalling openblas and openblas-devel
  2. changing includedir=/usr/include/openblas instead of includedir=/usr/include/ in both .pc files
  3. restarting terminal for final check (re-running export pkg config command ofc)

Additional info which might help, not sure: Imgur: The magic of the Internet
Can someone please help in this?

Seems that we are both trying to use LLMs without GPUs.

I was able to fix this with only a minor hack.

I used:

cmake -DBLAS_INCLUDE_DIRS=/usr/include/openblas -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS …/

Looking at their build code, you can just include the headers you want and bypass the pkg-config stuff.

Seems that we are both trying to use LLMs without GPUs.

I was told openblas discreetly uses GPU though…?

Anyways, thanks for the command, I will reply again after testing it out.

I don’t think openblas supports GPUs. Does this support GPU? · Issue #516 · OpenMathLib/OpenBLAS · GitHub

I would look at your GPU vendor and use their BLAS libraries if you want BLAS + GPU acceleration.