openblas-src icon indicating copy to clipboard operation
openblas-src copied to clipboard

Make openblas-build work on macOS

Open termoshtt opened this issue 4 years ago • 2 comments

Split from https://github.com/blas-lapack-rs/openblas-src/issues/44#issuecomment-748438531 and merges #49 issue because it is resolved by introducing of openblas-build crate on Linux.

macOS support of openblas-build crate looks have several problems.

  • https://github.com/blas-lapack-rs/openblas-src/runs/1399358056
    • thread 'build::tests::build_no_lapacke' panicked at 'assertion failed: shared_lib.has_lapack()', openblas-build/src/build.rs:308:9
    • Library file inspection seems not working correctly. Maybe difference in nm of GNU and BSD?
  • https://github.com/blas-lapack-rs/openblas-src/runs/1399358064
    • lapacke_dggsvp_work.c:127:9: error: implicit declaration of function 'dggsvp_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    • May default C std target of Apple clang causes?
  • https://github.com/blas-lapack-rs/openblas-src/runs/1399358073
    • clang: error: unsupported option '-fopenmp': macOS's clang does not support OpenMP :<

termoshtt avatar Jan 09 '21 08:01 termoshtt

I ran into the second error on macOS Big Sur with current master (87c64776). FWIW I was able to work around the issue by using a real gcc instead of the Apple's /usr/bin/gcc which is clang in disguise.

brew install gcc
CC=gcc-10 cargo test

maoe avatar Mar 03 '21 13:03 maoe

We can test M1 macOS on CI #112 and I have MacBook. It's time to resolve this issue.

termoshtt avatar Feb 03 '24 08:02 termoshtt