Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix conf-openblas on macOS arm64 hardware #25076

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion packages/conf-openblas/conf-openblas.0.2.1/opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ build: [
[
"sh"
"-exc"
"cc $CFLAGS $(pkg-config --cflags openblas) test.c $(pkg-config --libs openblas)"
"printf 'opam-version: \"2.0\"\\nvariables {\\n pkg-config-homebrew: \"%s/lib/pkgconfig\"\\n}' \"$(brew --prefix openblas)\" > %{_:name}%.config"
] {os = "macos" & os-distribution = "homebrew"}
[
"sh"
"-exc"
"printf 'opam-version: \"2.0\"\\nvariables {\\n pkg-config-homebrew: \"\"\\n}' > %{_:name}%.config"
] {os != "macos" | os-distribution != "homebrew"}
[
"sh"
"-exc"
"cc $CFLAGS $(PKG_CONFIG_PATH=\"$(brew --prefix openblas)/lib/pkgconfig:$PKG_CONFIG_PATH\" pkg-config --cflags openblas) test.c $(PKG_CONFIG_PATH=\"$(brew --prefix openblas)/lib/pkgconfig:$PKG_CONFIG_PATH\" pkg-config --libs openblas)"
] {os = "macos" & os-distribution = "homebrew"}
["sh" "-exc" "cc $CFLAGS test.c -lcblas"]
{os-family = "arch"}
Expand All @@ -21,6 +31,9 @@ build: [
["sh" "-exc" "cc $CFLAGS test.c -lopenblas"]
{os-distribution != "fedora" & os-distribution != "centos" & os-family != "suse" & os-family != "opensuse" & os != "macos" & os-family != "arch" & os != "freebsd" & os != "win32"}
]
depends: [
"conf-pkg-config" {os = "macos" & os-distribution = "homebrew"}
]
depexts: [
["libc-dev" "openblas-dev" "lapack-dev"] {os-distribution = "alpine"}
["epel-release" "openblas-devel"] {os-distribution = "centos"}
Expand All @@ -35,6 +48,9 @@ x-ci-accept-failures: [
"oraclelinux-7"
"oraclelinux-8"
]
setenv: [
PKG_CONFIG_PATH += "%{_:pkg-config-homebrew}%"
]
synopsis: "Virtual package to install OpenBLAS and LAPACKE"
description:
"The package prepares OpenBLAS (CBLAS) and LAPACKE backend for Owl (OCaml numerical library). It can only be installed if OpenBLAS and LAPACKE are installed on the system."
Expand Down