I am mostly following this post to install OBOE in MAC OS 10.9:
https://projects.coin-or.org/OBOE/wiki/MacosxOboe

However, in step 4:

I tried to install LAPACK++ with failure :

I type ./configure

configure: error: Blas/Lapack was not found.
*** This means Lapack++ and matrix support cannot be compiled.
*** This makes this library unusable. Please get blas and lapack
*** installed. If you do have these installed, use the options
*** --with-blas=<libname> or --with-lapack=<libname> and/or set
*** the env variable LDFLAGS to include the appropriate linker
*** flags.

But I have libblas.a, liblapack.a, librefblas.a, libtmglib.a in my /usr/local/lin folder. Can any one help?

Dani AI

Generated

Brief summary and context referencing the thread: saw LAPACK++ fail its configure test because BLAS/LAPACK "were not found." That often happens on macOS for two separate reasons: a simple path/typo issue (the post shows /usr/local/lin, which looks like a misspelling of /usr/local/lib), and the fact that macOS commonly supplies BLAS/LAPACK through Apple’s Accelerate framework rather than as plain libblas/liblapack files. (developer.apple.com)

Practical approaches (ordered, concise):

  • Confirm the library files are actually in the right directory and readable (the path in the post should be checked). Also inspect the build log (config.log) to see the exact test that failed — that log shows the compiler/linker command that the configure script tried and why it failed.
  • Use the system Accelerate implementation by having the build/link step include the Accelerate framework. Many configure-based builds accept additional linker flags; when the framework is used, linking is done against -framework Accelerate. That covers BLAS/LAPACK APIs on macOS. (stackoverflow.com)
  • If a reference OpenBLAS/LAPACK is preferred, install it via Homebrew and point the build system at its include/lib paths. Homebrew’s OpenBLAS is keg-only on macOS (so it won’t be auto-linked into /usr/local); the formula documents the need to export appropriate LDFLAGS/CPPFLAGS or use the brew prefix. Installing a Fortran runtime (gfortran via Homebrew’s gcc) is often required too. (formulae.brew.sh)

Short example snippets (adapt to the build system and avoid overwriting system libraries):

# Use Accelerate
export LDFLAGS="-framework Accelerate"

# Or, use Homebrew OpenBLAS
brew install openblas
export LDFLAGS="-L$(brew --prefix openblas)/lib -lopenblas"
export CPPFLAGS="-I$(brew --prefix openblas)/include"

Notes and cautions: forcing Homebrew libraries into /usr/local can conflict with Apple's libraries; check config.log for the failing test string before changing system links. Also reference ’s point that /usr/local/lib is not always searched by default — passing explicit link/include flags is the safer fix.

Have you verified that both the basic lapack and blas packages have been properly installed? Look in /usr/lib for the appropriate libraries, or download and install them directly.

In any case, lapack and lapack++ are system performance testing tools, primarily to scope the math processing capabilities of a system. Is that what you are trying to do?

Also, libraries in /usr/local/lib will not be seen by default. There are other ./configure options that will find them there. In addition, you may need to set the configuration to use static libraries instead of the default shared libraries (such as libblas.so, etc). Execute the command ./configure --help for a full lising of the options.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.