From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: gsmecher@threespeedlogic.com
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] host-python-numpy: correct implied host-lapack/host-blas dependency.
Date: Mon, 5 Feb 2024 19:04:30 +0100 [thread overview]
Message-ID: <ZcEjLpAWFjQuYCWc@landeda> (raw)
In-Reply-To: <20240129204032.1980414-1-gsmecher@threespeedlogic.com>
Graeme, All,
On 2024-01-29 12:40 -0800, gsmecher@threespeedlogic.com spake thusly:
> From: Graeme Smecher <gsmecher@threespeedlogic.com>
>
> Before this patch, host-python-numpy attempted (and failed) to detect
> OpenBLAS as follows:
>
> buildroot$ make
> >>> host-python-numpy 1.25.0 Configuring
> [...]
> Run-time dependency openblas found: NO (tried pkgconfig and cmake)
> WARNING: CMake Toolchain: Failed to determine CMake compilers state
> Run-time dependency openblas found: YES 0.3.21
> Dependency openblas found: YES 0.3.21 (cached)
> Program _build_utils/process_src_template.py found: YES (/path/to/buildroot/output/host/bin/python3 /path/to/buildroot/output/build/host-python-numpy-1.25.0/numpy/_build_utils/process_src_template.py)
> Program _build_utils/tempita.py found: YES (/path/to/buildroot/output/build/host-python-numpy-1.25.0/numpy/_build_utils/tempita.py)
>
> output/build/host-python-numpy-1.25.0/numpy/meson.build:201:44: ERROR: Could not get cmake variable and no default provided for <CMakeDependency OpenBLAS: True None>
> [...]
So I dug in the Numpy git history, and before we bumped to 1.25, it was
using distutils, which would only warn and disable BLAS support if not
found, but the meson switch made the default to fail.
> Two obvious ways to correct this:
>
> - Add some kind of host-lapack / host-openblas dependency to
> host-python-numpy, or
> - Tell host-python-numpy not to look for (or rely on) external code.
>
> Because the host numpy environment shouldn't be doing any numerical
> heavy lifting, we opt for the latter here.
>
> Signed-off-by: Graeme Smecher <gsmecher@threespeedlogic.com>
Applied to master, with an extended commit log about the history,
thanks.
Regards,
Yann E. MORIN.
> ---
> package/python-numpy/python-numpy.mk | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk
> index b52e0da17d..cc5dfc9224 100644
> --- a/package/python-numpy/python-numpy.mk
> +++ b/package/python-numpy/python-numpy.mk
> @@ -36,6 +36,10 @@ else
> PYTHON_NUMPY_CONF_OPTS += -Dblas=""
> endif
>
> +# Rather than add a host-blas or host-lapack dependencies, just use unoptimized,
> +# in-tree code.
> +HOST_PYTHON_NUMPY_CONF_OPTS = -Dblas="" -Dlapack=""
> +
> # Fixup the npymath.ini prefix path with actual target staging area where
> # numpy core was built. Without this, target builds using numpy distutils
> # extensions like python-scipy, python-numba cannot find -lnpymath since
> --
> 2.39.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-02-05 18:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 19:54 [Buildroot] host-python-numpy - confused about host openblas dependency Graeme Smecher
2024-01-29 20:22 ` Yann E. MORIN
2024-01-29 20:40 ` [Buildroot] [PATCH] host-python-numpy: correct implied host-lapack/host-blas dependency gsmecher
2024-01-29 20:58 ` Yann E. MORIN
2024-02-05 18:04 ` Yann E. MORIN [this message]
2024-02-29 15:38 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZcEjLpAWFjQuYCWc@landeda \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=gsmecher@threespeedlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox