From nobody Sat Apr 4 19:30:58 2026 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fp5Kx71frz6WPZM; Sat, 04 Apr 2026 19:31:01 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fp5Kx6jNBz3Y16; Sat, 04 Apr 2026 19:31:01 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775331061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=X2USD+Smpj//l6qcZzcByyCmPtxyFykiVzo89VimJGM=; b=dAV2Oin5dD3EQ2D7EeQLlss7Lg7r6sqPoxPXM2JRIf4704M0m9QrWlnX3v7oWKm7WQTG5n nGlaeFzxJcr+FpEGgV/eC0xYggYYNjoSo8AR/eTYU0wsNpG4WlLyy5YR558HrcrbeRrwNW THKnWZylV82Yjku8LW4ea6IZXhME8k07GeLYooYTng45Lv/XPNxss3cunZjWCV++6lMYyh V0PBu92qZPyKVJ/jIvfPwV4lyKgoFrmLfnxXqzjItE32Y2q5ieWlkFXN352G+klO1b+5Md nASRuZfmtwt5eu6LCahsuExljGW8ttkgV39wwxmx2h1r4FEnBpNhromL4utuaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775331061; a=rsa-sha256; cv=none; b=nb/xodgBRaR9WnfycGdwEQ/MgWE1OU2eM8ECENY9+58gv7pVA28aYOMHh1KmDuhWXFmCw6 3qY3g1jPPHmnuqRUGJZjrK5dEc4FRAfjYFW+1j3Hp0vfavOoZ5+8hRTrCfo9VymRt+rEU5 FetFyNzDOw8vBlYXSc2RCAmkuu6sJc4urMPnZ4FFr1dhhijPK79iPOMRJ2rDtMK3Og00jv JLLJm7HbJ6f5KrWDP4MP4lv2setnPdBBNt8GRd7YOk/qOPC3Zx1PoKqP23rUUa0rSZSEyv ULjaA1UPvD30DW+jGJUiCyDc21Zfy0VVKNEI95izdEGX+ZKjqcBMrjgsy6Plqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775331061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=X2USD+Smpj//l6qcZzcByyCmPtxyFykiVzo89VimJGM=; b=toT+kMO6Qg7rDKqIpfjnZ004VxKxbSm5a6fu8T06mToqQ3ilAycVcIlRVSm1dp1SeYWN/i I90RJ1RA1f6Juc7mJ1Pnu0KwctuH7/he6r7VX6/6qps84uXaNhlhWL/EueAfuLL9NuY7AV BPXw6slpRQA5A+jZ6fOzxuXqcpeuj10VB846iv70HYofAkpGk1oU5P6xy7sUOCOD+oiUeT dfiQ6/sb2OTHaoO+D69nLNk1qiwYBdlvrhu1mVGf0HAa0LgYAfEnTRYyhGzg6+ZP0Z5hrK YAcDZdBSrfVXxB9CMgAcPNb8TFjUxf3KlqK9bX328EuzCYbcY0LSfYC+ym8gig== Received: from [10.216.0.108] (unknown [188.243.165.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fp5Kx18LXz1BFl; Sat, 04 Apr 2026 19:31:01 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Date: Sat, 4 Apr 2026 22:30:58 +0300 From: Dima Panov To: dev-commits-ports-all@FreeBSD.org, ports-committers@FreeBSD.org, dev-commits-ports-main@FreeBSD.org, Charlie Li Message-ID: <4f3f2978-762f-43ec-8507-4c780a316b98@Canary> In-Reply-To: References: <69d06e94.335f7.791ef923@gitrepo.freebsd.org> Subject: Re: git: 28081ef83218 - main - math/py-numpy1: backport configtool/pkg-config file from numpy 2 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="69d166f2_7545e146_b864" --69d166f2_7545e146_b864 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline BTW, it looks like missing -lm in LD=46LAGS -- Dima. (desktop, kde, x11, office, ports-secteam)=40=46reeBSD team (fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD) > On =D1=81=D1=83=D0=B1=D0=B1=D0=BE=D1=82=D0=B0, =D0=B0=D0=BF=D1=80. 04, = 2026 at 8:08 PM, Dima Panov wrote: > hello=21 > > > This not fixed Imath and boot-python-libs on -current ( =46reeBSD 16.0-= CURRENT =230 main-2d843b7c9758: =46ri Apr 3 23:38:53 MSK 2026 arm64) :( > > However, build is fine on releng/15 and releng/14 > > -- generating PyImath.pc > -- Configuring imathnumpy module > Traceback (most recent call last): > =46ile =22/usr/local/lib/python3.11/site-packages/numpy/core/=5F=5Finit= =5F=5F.py=22, line 24, in > from . import multiarray > =46ile =22/usr/local/lib/python3.11/site-packages/numpy/core/multiarray= .py=22, line 10, in > from . import overrides > =46ile =22/usr/local/lib/python3.11/site-packages/numpy/core/overrides.= py=22, line 8, in > from numpy.core.=5Fmultiarray=5Fumath import ( > ImportError: /usr/local/lib/python3.11/site-packages/numpy/core/=5Fmult= iarray=5Fumath.cpython-311.so: Undefined symbol =22feraiseexcept=22 > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > =46ile =22/usr/local/lib/python3.11/site-packages/numpy/=5F=5Finit=5F=5F= .py=22, line 130, in > from numpy.=5F=5Fconfig=5F=5F import show as show=5Fconfig > =46ile =22/usr/local/lib/python3.11/site-packages/numpy/=5F=5Fconfig=5F= =5F.py=22, line 4, in > from numpy.core.=5Fmultiarray=5Fumath import ( > =46ile =22/usr/local/lib/python3.11/site-packages/numpy/core/=5F=5Finit= =5F=5F.py=22, line 50, in > raise ImportError(msg) > ImportError: > > IMPORTANT: PLEASE READ THIS =46OR ADVICE ON HOW TO SOLVE THIS ISSUE=21 > > Importing the numpy C-extensions failed. This error can happen for > many reasons, often due to issues with your setup or how NumPy was > installed. > > We have compiled some common reasons and troubleshooting tips at: > > https://numpy.org/devdocs/user/troubleshooting-importerror.html > > Please note and check the following: > > * The Python version is: Python3.11 from =22/usr/local/bin/python3.11=22= > * The NumPy version is: =221.26.4=22 > > and make sure that they are the versions you expect. > Please carefully study the documentation linked above for further help.= > > Original error was: /usr/local/lib/python3.11/site-packages/numpy/core/= =5Fmultiarray=5Fumath.cpython-311.so: Undefined symbol =22feraiseexcept=22= > > > The above exception was the direct cause of the following exception: > > Traceback (most recent call last): > =46ile =22=22, line 1, in > =46ile =22/usr/local/lib/python3.11/site-packages/numpy/=5F=5Finit=5F=5F= .py=22, line 135, in > raise ImportError(msg) from e > ImportError: Error importing numpy: you should not try to import numpy = from > its source directory; please exit the numpy source tree, and relaunch > your python interpreter from there. > -- installing imathnumpy module to lib/python3.11/site-packages > > > > On 04.04.2026 04:51, Charlie Li wrote: > > The branch main has been updated by vishwin: > > > > URL: https://cgit.=46reeBSD.org/ports/commit/=3Fid=3D28081ef83218b02f= e882f736d7935ea05bb23d68 > > > > commit 28081ef83218b02fe882f736d7935ea05bb23d68 > > Author: Charlie Li > > AuthorDate: 2026-04-04 01:47:26 +0000 > > Commit: Charlie Li > > CommitDate: 2026-04-04 01:47:26 +0000 > > > > math/py-numpy1: backport configtool/pkg-config file from numpy 2 > > > > Traditionally the way to query for the numpy C API has been through > > distutils/setuptools, but the use of setuptools beyond a PEP-517 > > build backend is increasingly discouraged. numpy 2 introduced > > numpy-config and a pkg-config file to allow consumer build systems > > to better support the use of numpy as a dependency. > > > > Based on: https://github.com/numpy/numpy/commit/2634f803313f349170c09= 606d3cc619accd72247 > > > > Reported by: fluffy > > PR: 281470 > > --- > > math/py-numpy1/Makefile =7C 1 + > > math/py-numpy1/files/patch-numpy=5F=5F=5Fconfigtool.py =7C 42 +++++++= ++++++++++++++ > > math/py-numpy1/files/patch-numpy=5Fcore=5Fmeson.build =7C 26 ++++++++= +++++ > > math/py-numpy1/files/patch-numpy=5Fcore=5Fnumpy.pc.in =7C 10 +++++ > > math/py-numpy1/files/patch-numpy=5Flib=5Futils.py =7C 35 ++++++++++++= +++++ > > math/py-numpy1/files/patch-numpy=5Fmeson.build =7C 10 +++++ > > .../files/patch-numpy=5Ftests=5Ftest=5F=5Fconfigtool.py =7C 44 ++++++= ++++++++++++++++ > > math/py-numpy1/files/patch-pyproject.toml =7C 21 +++++++++++ > > 8 files changed, 189 insertions(+) > > > > diff --git a/math/py-numpy1/Makefile b/math/py-numpy1/Makefile > > index e6b83231570d..7873d11b3784 100644 > > --- a/math/py-numpy1/Makefile > > +++ b/math/py-numpy1/Makefile > > =40=40 -1,5 +1,6 =40=40 > > PORTNAME=3D numpy > > DISTVERSION=3D 1.26.4 > > +PORTREVISION=3D 1 > > CATEGORIES=3D math python > > MASTER=5FSITES=3D PYPI =5C > > https://numpy.org/doc/=24=7BDISTVERSION:R=7D/:doc > > diff --git a/math/py-numpy1/files/patch-numpy=5F=5F=5Fconfigtool.py b= /math/py-numpy1/files/patch-numpy=5F=5F=5Fconfigtool.py > > new file mode 100644 > > index 000000000000..4d6158efa35a > > --- /dev/null > > +++ b/math/py-numpy1/files/patch-numpy=5F=5F=5Fconfigtool.py > > =40=40 -0,0 +1,42 =40=40 > > +--- numpy/=5Fconfigtool.py.orig 2026-04-04 01:24:53 UTC > > ++++ numpy/=5Fconfigtool.py > > +=40=40 -0,0 +1,39 =40=40 > > ++import argparse > > ++from pathlib import Path > > ++import sys > > ++ > > ++from .version import =5F=5Fversion=5F=5F > > ++from .lib.utils import get=5Finclude > > ++ > > ++ > > ++def main() -> None: > > ++ parser =3D argparse.ArgumentParser() > > ++ parser.add=5Fargument( > > ++ =22--version=22, > > ++ action=3D=22version=22, > > ++ version=3D=5F=5Fversion=5F=5F, > > ++ help=3D=22Print the version and exit.=22, > > ++ ) > > ++ parser.add=5Fargument( > > ++ =22--cflags=22, > > ++ action=3D=22store=5Ftrue=22, > > ++ help=3D=22Compile flag needed when using the NumPy headers.=22, > > ++ ) > > ++ parser.add=5Fargument( > > ++ =22--pkgconfigdir=22, > > ++ action=3D=22store=5Ftrue=22, > > ++ help=3D(=22Print the pkgconfig directory in which =60numpy.pc=60 i= s stored =22 > > ++ =22(useful for setting =24PKG=5FCON=46IG=5FPATH).=22), > > ++ ) > > ++ args =3D parser.parse=5Fargs() > > ++ if not sys.argv=5B1:=5D: > > ++ parser.print=5Fhelp() > > ++ if args.cflags: > > ++ print(=22-I=22 + get=5Finclude()) > > ++ if args.pkgconfigdir: > > ++ =5Fpath =3D Path(get=5Finclude()) / '..' / 'lib' / 'pkgconfig' > > ++ print(=5Fpath.resolve()) > > ++ > > ++ > > ++if =5F=5Fname=5F=5F =3D=3D =22=5F=5Fmain=5F=5F=22: > > ++ main() > > diff --git a/math/py-numpy1/files/patch-numpy=5Fcore=5Fmeson.build b/= math/py-numpy1/files/patch-numpy=5Fcore=5Fmeson.build > > new file mode 100644 > > index 000000000000..1e0b9cdc79ce > > --- /dev/null > > +++ b/math/py-numpy1/files/patch-numpy=5Fcore=5Fmeson.build > > =40=40 -0,0 +1,26 =40=40 > > +--- numpy/core/meson.build.orig 2024-02-05 21:17:48 UTC > > ++++ numpy/core/meson.build > > +=40=40 -621,6 +621,23 =40=40 src=5Fufunc=5Fapi =3D custom=5Ftarget('= =5F=5Fufunc=5Fapi', > > + install=5Fdir: np=5Fdir / 'core/include/numpy' > > + ) > > + > > ++=23 Write out pkg-config file > > ++=23 ------------------------- > > ++ > > ++=23 Note: we can't use Meson's built-in pkgconfig module, because w= e have to > > ++=23 install numpy.pc within site-packages rather than in its normal= location. > > ++cdata=5Fnumpy=5Fpc =3D configuration=5Fdata() > > ++cdata=5Fnumpy=5Fpc.set('version', meson.project=5Fversion()) > > ++ > > ++=23 Note: keep install path in sync with numpy/=5Fconfigtool.py > > ++=5Fnumpy=5Fpc =3D configure=5Ffile( > > ++ input: 'numpy.pc.in', > > ++ output: 'numpy.pc', > > ++ configuration: cdata=5Fnumpy=5Fpc, > > ++ install: true, > > ++ install=5Fdir: np=5Fdir / 'core/lib/pkgconfig', > > ++ install=5Ftag: 'devel' > > ++) > > + > > + =23 Set common build flags for C and C++ code > > + =23 ----------------------------------------- > > diff --git a/math/py-numpy1/files/patch-numpy=5Fcore=5Fnumpy.pc.in b/= math/py-numpy1/files/patch-numpy=5Fcore=5Fnumpy.pc.in > > new file mode 100644 > > index 000000000000..58f33ee87633 > > --- /dev/null > > +++ b/math/py-numpy1/files/patch-numpy=5Fcore=5Fnumpy.pc.in > > =40=40 -0,0 +1,10 =40=40 > > +--- numpy/core/numpy.pc.in.orig 2026-04-04 00:13:21 UTC > > ++++ numpy/core/numpy.pc.in > > +=40=40 -0,0 +1,7 =40=40 > > ++prefix=3D=24=7Bpcfiledir=7D/../.. > > ++includedir=3D=24=7Bprefix=7D/include > > ++ > > ++Name: numpy > > ++Description: NumPy is the fundamental package for scientific comput= ing with Python. > > ++Version: =40version=40 > > ++Cflags: -I=24=7Bincludedir=7D > > diff --git a/math/py-numpy1/files/patch-numpy=5Flib=5Futils.py b/math= /py-numpy1/files/patch-numpy=5Flib=5Futils.py > > new file mode 100644 > > index 000000000000..03914f54522c > > --- /dev/null > > +++ b/math/py-numpy1/files/patch-numpy=5Flib=5Futils.py > > =40=40 -0,0 +1,35 =40=40 > > +--- numpy/lib/utils.py.orig 2024-02-05 21:17:48 UTC > > ++++ numpy/lib/utils.py > > +=40=40 -76,18 +76,29 =40=40 def get=5Finclude(): > > + =22=22=22 > > + Return the directory that contains the NumPy =5C=5C*.h header files= . > > + > > +- Extension modules that need to compile against NumPy should use th= is > > ++ Extension modules that need to compile against NumPy may need to u= se this > > + function to locate the appropriate include directory. > > + > > + Notes > > + ----- > > +- When using =60=60distutils=60=60, for example in =60=60setup.py=60= =60:: > > ++ When using =60=60setuptools=60=60, for example in =60=60setup.py=60= =60:: > > + > > + import numpy as np > > + ... > > + Extension('extension=5Fname', ... > > +- include=5Fdirs=3D=5Bnp.get=5Finclude()=5D) > > ++ include=5Fdirs=3D=5Bnp.get=5Finclude()=5D) > > + ... > > ++ > > ++ Note that a CLI tool =60=60numpy-config=60=60 was introduced in Nu= mPy 2.0, using > > ++ that is likely preferred for build systems other than =60=60setupt= ools=60=60:: > > ++ > > ++ =24 numpy-config --cflags > > ++ -I/path/to/site-packages/numpy/=5Fcore/include > > ++ > > ++ =23 Or rely on pkg-config: > > ++ =24 export PKG=5FCON=46IG=5FPATH=3D=24(numpy-config --pkgconfigdir= ) > > ++ =24 pkg-config --cflags > > ++ -I/path/to/site-packages/numpy/=5Fcore/include > > + > > + =22=22=22 > > + import numpy > > diff --git a/math/py-numpy1/files/patch-numpy=5Fmeson.build b/math/py= -numpy1/files/patch-numpy=5Fmeson.build > > new file mode 100644 > > index 000000000000..77cd8dd42fc0 > > --- /dev/null > > +++ b/math/py-numpy1/files/patch-numpy=5Fmeson.build > > =40=40 -0,0 +1,10 =40=40 > > +--- numpy/meson.build.orig 2024-02-05 21:17:48 UTC > > ++++ numpy/meson.build > > +=40=40 -215,6 +215,7 =40=40 python=5Fsources =3D =5B > > + '=5F=5Finit=5F=5F.pxd', > > + '=5F=5Finit=5F=5F.py', > > + '=5F=5Finit=5F=5F.pyi', > > ++ '=5Fconfigtool.py', > > + '=5Fdistributor=5Finit.py', > > + '=5Fglobals.py', > > + '=5Fpytesttester.py', > > diff --git a/math/py-numpy1/files/patch-numpy=5Ftests=5Ftest=5F=5Fcon= figtool.py b/math/py-numpy1/files/patch-numpy=5Ftests=5Ftest=5F=5Fconfigt= ool.py > > new file mode 100644 > > index 000000000000..306e0f5f677b > > --- /dev/null > > +++ b/math/py-numpy1/files/patch-numpy=5Ftests=5Ftest=5F=5Fconfigtool= .py > > =40=40 -0,0 +1,44 =40=40 > > +--- numpy/tests/test=5Fconfigtool.py.orig 2026-04-04 00:20:07 UTC > > ++++ numpy/tests/test=5Fconfigtool.py > > +=40=40 -0,0 +1,41 =40=40 > > ++import os > > ++import subprocess > > ++import sysconfig > > ++ > > ++import pytest > > ++import numpy as np > > ++ > > ++ > > ++is=5Feditable =3D not bool(np.=5F=5Fpath=5F=5F) > > ++numpy=5Fin=5Fsitepackages =3D sysconfig.get=5Fpath('platlib') in np= .=5F=5Ffile=5F=5F > > ++=23 We only expect to have a =60numpy-config=60 available if NumPy = was installed via > > ++=23 a build frontend (and not =60spin=60 for example) > > ++if not (numpy=5Fin=5Fsitepackages or is=5Feditable): > > ++ pytest.skip(=22=60numpy-config=60 not expected to be installed=22,= > > ++ allow=5Fmodule=5Flevel=3DTrue) > > ++ > > ++ > > ++def check=5Fnumpyconfig(arg): > > ++ p =3D subprocess.run(=5B'numpy-config', arg=5D, capture=5Foutput=3D= True, text=3DTrue) > > ++ p.check=5Freturncode() > > ++ return p.stdout.strip() > > ++ > > ++ > > ++def test=5Fconfigtool=5Fversion(): > > ++ stdout =3D check=5Fnumpyconfig('--version') > > ++ assert stdout =3D=3D np.=5F=5Fversion=5F=5F > > ++ > > ++ > > ++def test=5Fconfigtool=5Fcflags(): > > ++ stdout =3D check=5Fnumpyconfig('--cflags') > > ++ assert stdout.endswith(os.path.join('numpy', 'core', 'include')) > > ++ > > ++ > > ++def test=5Fconfigtool=5Fpkgconfigdir(): > > ++ stdout =3D check=5Fnumpyconfig('--pkgconfigdir') > > ++ assert stdout.endswith(os.path.join('numpy', 'core', 'lib', 'pkgco= nfig')) > > ++ > > ++ if not is=5Feditable: > > ++ =23 Also check that the .pc file actually exists (unless we're usi= ng an > > ++ =23 editable install, then it'll be hiding in the build dir) > > ++ assert os.path.exists(os.path.join(stdout, 'numpy.pc')) > > diff --git a/math/py-numpy1/files/patch-pyproject.toml b/math/py-nump= y1/files/patch-pyproject.toml > > new file mode 100644 > > index 000000000000..f26d7ee283c7 > > --- /dev/null > > +++ b/math/py-numpy1/files/patch-pyproject.toml > > =40=40 -0,0 +1,21 =40=40 > > +--- pyproject.toml.orig 2024-02-05 21:17:48 UTC > > ++++ pyproject.toml > > +=40=40 -1,8 +1,8 =40=40 requires =3D =5B > > + =5Bbuild-system=5D > > + build-backend =3D =22mesonpy=22 > > + requires =3D =5B > > +- =22Cython>=3D0.29.34,<3.1=22, > > +- =22meson-python>=3D0.15.0,<0.16.0=22, > > ++ =22Cython>=3D0.29.34=22, > > ++ =22meson-python>=3D0.15.0=22, > > + =5D > > + > > + =5Bproject=5D > > +=40=40 -43,6 +43,7 =40=40 f2py =3D 'numpy.f2py.f2py2e:main' > > + > > + =5Bproject.scripts=5D > > + f2py =3D 'numpy.f2py.f2py2e:main' > > ++numpy-config =3D 'numpy.=5Fconfigtool:main' > > + > > + =5Bproject.entry-points.array=5Fapi=5D > > + numpy =3D 'numpy.array=5Fapi' > > > > -- > Sincerely, > Dima (fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD, =40fluffy:matri= x-dev.freebsd.org) > (desktop, kde, x11, office, ports-secteam)=40=46reeBSD team > --69d166f2_7545e146_b864 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline <= meta name=3D=22viewport=22 content=3D=22width=3Ddevice-width, initial-sca= le=3D1.0, user-scalable=3Dno=22>
BTW, it looks like missing -lm in LD=46LAGS
=
--
= Dima. (desktop, kde, x11, office, ports-secteam)=40=46reeBSD team
(fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD)
<= div>
On =D1=81=D1=83=D0=B1=D0=B1= =D0=BE=D1=82=D0=B0, =D0=B0=D0=BF=D1=80. 04, 2026 at 8:08 PM, Dima Panov &= lt;fluffy=40=46reeBSD.org> wrote:
hello=21


This= not fixed Imath and boot-python-libs on -current ( =46reeBSD 16.0-CURREN= T =230 main-2d843b7c9758: =46ri Apr 3 23:38:53 MSK 2026 arm64) :(
However, build is fine on releng/15 and releng/14

-- generatin= g PyImath.pc
-- Configuring imathnumpy module
Traceback (most rec= ent call last):
=46ile =22/usr/local/lib/python3.11/site-packages/nu= mpy/core/=5F=5Finit=5F=5F.py=22, line 24, in <module>
from . i= mport multiarray
=46ile =22/usr/local/lib/python3.11/site-packages/n= umpy/core/multiarray.py=22, line 10, in <module>
from . import= overrides
=46ile =22/usr/local/lib/python3.11/site-packages/numpy/c= ore/overrides.py=22, line 8, in <module>
from numpy.core.=5Fmu= ltiarray=5Fumath import (
ImportError: /usr/local/lib/python3.11/site= -packages/numpy/core/=5Fmultiarray=5Fumath.cpython-311.so: Undefined symb= ol =22feraiseexcept=22

During handling of the above exception, a= nother exception occurred:

Traceback (most recent call last): =46ile =22/usr/local/lib/python3.11/site-packages/numpy/=5F=5Finit=5F=5F= .py=22, line 130, in <module>
from numpy.=5F=5Fconfig=5F=5F im= port show as show=5Fconfig
=46ile =22/usr/local/lib/python3.11/site-= packages/numpy/=5F=5Fconfig=5F=5F.py=22, line 4, in <module>
f= rom numpy.core.=5Fmultiarray=5Fumath import (
=46ile =22/usr/local/l= ib/python3.11/site-packages/numpy/core/=5F=5Finit=5F=5F.py=22, line 50, i= n <module>
raise ImportError(msg)
ImportError:

IM= PORTANT: PLEASE READ THIS =46OR ADVICE ON HOW TO SOLVE THIS ISSUE=21
=
Importing the numpy C-extensions failed. This error can happen for <= br>many reasons, often due to issues with your setup or how NumPy was installed.

We have compiled some common reasons and troubleshoo= ting tips at:

https://numpy.org/devdocs/user/troubleshooting-im= porterror.html

Please note and check the following:

* = The Python version is: Python3.11 from =22/usr/local/bin/python3.11=22 * The NumPy version is: =221.26.4=22

and make sure that they = are the versions you expect.
Please carefully study the documentation= linked above for further help.

Original error was: /usr/local/l= ib/python3.11/site-packages/numpy/core/=5Fmultiarray=5Fumath.cpython-311.= so: Undefined symbol =22feraiseexcept=22


The above exceptio= n was the direct cause of the following exception:

Traceback (mo= st recent call last):
=46ile =22<string>=22, line 1, in <mo= dule>
=46ile =22/usr/local/lib/python3.11/site-packages/numpy/=5F= =5Finit=5F=5F.py=22, line 135, in <module>
raise ImportError(m= sg) from e
ImportError: Error importing numpy: you should not try to = import numpy from
its source directory; please exit the numpy source= tree, and relaunch
your python interpreter from there.
-- insta= lling imathnumpy module to lib/python3.11/site-packages


On 04.04.2026 04:51, Charlie Li wrote:
The branch main has been updated by vishwin:

URL: https://cgit.= =46reeBSD.org/ports/commit/=3Fid=3D28081ef83218b02fe882f736d7935ea05bb23d= 68

commit 28081ef83218b02fe882f736d7935ea05bb23d68
Author: C= harlie Li <vishwin=40=46reeBSD.org>
AuthorDate: 2026-04-04 01:4= 7:26 +0000
Commit: Charlie Li <vishwin=40=46reeBSD.org>
Com= mitDate: 2026-04-04 01:47:26 +0000

math/py-numpy1: backport conf= igtool/pkg-config file from numpy 2

Traditionally the way to que= ry for the numpy C API has been through
distutils/setuptools, but the= use of setuptools beyond a PEP-517
build backend is increasingly dis= couraged. numpy 2 introduced
numpy-config and a pkg-config file to al= low consumer build systems
to better support the use of numpy as a de= pendency.

Based on: https://github.com/numpy/numpy/commit/2634f8= 03313f349170c09606d3cc619accd72247

Reported by: fluffy
PR: 2= 81470
---
math/py-numpy1/Makefile =7C 1 +
math/py-numpy1/file= s/patch-numpy=5F=5F=5Fconfigtool.py =7C 42 +++++++++++++++++++++
math= /py-numpy1/files/patch-numpy=5Fcore=5Fmeson.build =7C 26 +++++++++++++ math/py-numpy1/files/patch-numpy=5Fcore=5Fnumpy.pc.in =7C 10 +++++
= math/py-numpy1/files/patch-numpy=5Flib=5Futils.py =7C 35 ++++++++++++++++= +
math/py-numpy1/files/patch-numpy=5Fmeson.build =7C 10 +++++
...= /files/patch-numpy=5Ftests=5Ftest=5F=5Fconfigtool.py =7C 44 +++++++++++++= +++++++++
math/py-numpy1/files/patch-pyproject.toml =7C 21 ++++++++++= +
8 files changed, 189 insertions(+)

diff --git a/math/py-nu= mpy1/Makefile b/math/py-numpy1/Makefile
index e6b83231570d..7873d11b3= 784 100644
--- a/math/py-numpy1/Makefile
+++ b/math/py-numpy1/Mak= efile
=40=40 -1,5 +1,6 =40=40
PORTNAME=3D numpy
DISTVERSION=3D= 1.26.4
+PORTREVISION=3D 1
CATEGORIES=3D math python
MASTER=5F= SITES=3D PYPI =5C
https://numpy.org/doc/=24=7BDISTVERSION:R=7D/:doc =
diff --git a/math/py-numpy1/files/patch-numpy=5F=5F=5Fconfigtool.py b= /math/py-numpy1/files/patch-numpy=5F=5F=5Fconfigtool.py
new file mode= 100644
index 000000000000..4d6158efa35a
--- /dev/null
+++ b/= math/py-numpy1/files/patch-numpy=5F=5F=5Fconfigtool.py
=40=40 -0,0 +1= ,42 =40=40
+--- numpy/=5Fconfigtool.py.orig 2026-04-04 01:24:53 UTC <= br>++++ numpy/=5Fconfigtool.py
+=40=40 -0,0 +1,39 =40=40
++import= argparse
++from pathlib import Path
++import sys
++
++fr= om .version import =5F=5Fversion=5F=5F
++from .lib.utils import get=5F= include
++
++
++def main() -> None:
++ parser =3D argp= arse.ArgumentParser()
++ parser.add=5Fargument(
++ =22--version=22= ,
++ action=3D=22version=22,
++ version=3D=5F=5Fversion=5F=5F, ++ help=3D=22Print the version and exit.=22,
++ )
++ parser.add= =5Fargument(
++ =22--cflags=22,
++ action=3D=22store=5Ftrue=22, <= br>++ help=3D=22Compile flag needed when using the NumPy headers.=22, ++ )
++ parser.add=5Fargument(
++ =22--pkgconfigdir=22,
++ a= ction=3D=22store=5Ftrue=22,
++ help=3D(=22Print the pkgconfig directo= ry in which =60numpy.pc=60 is stored =22
++ =22(useful for setting =24= PKG=5FCON=46IG=5FPATH).=22),
++ )
++ args =3D parser.parse=5Fargs= ()
++ if not sys.argv=5B1:=5D:
++ parser.print=5Fhelp()
++ if= args.cflags:
++ print(=22-I=22 + get=5Finclude())
++ if args.pkg= configdir:
++ =5Fpath =3D Path(get=5Finclude()) / '..' / 'lib' / 'pkg= config'
++ print(=5Fpath.resolve())
++
++
++if =5F=5Fname= =5F=5F =3D=3D =22=5F=5Fmain=5F=5F=22:
++ main()
diff --git a/math= /py-numpy1/files/patch-numpy=5Fcore=5Fmeson.build b/math/py-numpy1/files/= patch-numpy=5Fcore=5Fmeson.build
new file mode 100644
index 00000= 0000000..1e0b9cdc79ce
--- /dev/null
+++ b/math/py-numpy1/files/pa= tch-numpy=5Fcore=5Fmeson.build
=40=40 -0,0 +1,26 =40=40
+--- nump= y/core/meson.build.orig 2024-02-05 21:17:48 UTC
++++ numpy/core/meson= .build
+=40=40 -621,6 +621,23 =40=40 src=5Fufunc=5Fapi =3D custom=5Ft= arget('=5F=5Fufunc=5Fapi',
+ install=5Fdir: np=5Fdir / 'core/include/= numpy'
+ )
+
++=23 Write out pkg-config file
++=23 ------= -------------------
++
++=23 Note: we can't use Meson's built-in = pkgconfig module, because we have to
++=23 install numpy.pc within si= te-packages rather than in its normal location.
++cdata=5Fnumpy=5Fpc = =3D configuration=5Fdata()
++cdata=5Fnumpy=5Fpc.set('version', meson.= project=5Fversion())
++
++=23 Note: keep install path in sync wit= h numpy/=5Fconfigtool.py
++=5Fnumpy=5Fpc =3D configure=5Ffile(
++= input: 'numpy.pc.in',
++ output: 'numpy.pc',
++ configuration: c= data=5Fnumpy=5Fpc,
++ install: true,
++ install=5Fdir: np=5Fdir /= 'core/lib/pkgconfig',
++ install=5Ftag: 'devel'
++)
+
+ = =23 Set common build flags for C and C++ code
+ =23 -----------------= ------------------------
diff --git a/math/py-numpy1/files/patch-nump= y=5Fcore=5Fnumpy.pc.in b/math/py-numpy1/files/patch-numpy=5Fcore=5Fnumpy.= pc.in
new file mode 100644
index 000000000000..58f33ee87633
-= -- /dev/null
+++ b/math/py-numpy1/files/patch-numpy=5Fcore=5Fnumpy.pc= .in
=40=40 -0,0 +1,10 =40=40
+--- numpy/core/numpy.pc.in.orig 202= 6-04-04 00:13:21 UTC
++++ numpy/core/numpy.pc.in
+=40=40 -0,0 +1,= 7 =40=40
++prefix=3D=24=7Bpcfiledir=7D/../..
++includedir=3D=24=7B= prefix=7D/include
++
++Name: numpy
++Description: NumPy is th= e fundamental package for scientific computing with Python.
++Version= : =40version=40
++Cflags: -I=24=7Bincludedir=7D
diff --git a/math= /py-numpy1/files/patch-numpy=5Flib=5Futils.py b/math/py-numpy1/files/patc= h-numpy=5Flib=5Futils.py
new file mode 100644
index 000000000000.= .03914f54522c
--- /dev/null
+++ b/math/py-numpy1/files/patch-nump= y=5Flib=5Futils.py
=40=40 -0,0 +1,35 =40=40
+--- numpy/lib/utils.= py.orig 2024-02-05 21:17:48 UTC
++++ numpy/lib/utils.py
+=40=40 -= 76,18 +76,29 =40=40 def get=5Finclude():
+ =22=22=22
+ Return the= directory that contains the NumPy =5C=5C*.h header files.
+
+- E= xtension modules that need to compile against NumPy should use this
+= + Extension modules that need to compile against NumPy may need to use th= is
+ function to locate the appropriate include directory.
+
= + Notes
+ -----
+- When using =60=60distutils=60=60, for example = in =60=60setup.py=60=60::
++ When using =60=60setuptools=60=60, for e= xample in =60=60setup.py=60=60::
+
+ import numpy as np
+ ...=
+ Extension('extension=5Fname', ...
+- include=5Fdirs=3D=5Bnp.ge= t=5Finclude()=5D)
++ include=5Fdirs=3D=5Bnp.get=5Finclude()=5D)
+= ...
++
++ Note that a CLI tool =60=60numpy-config=60=60 was intr= oduced in NumPy 2.0, using
++ that is likely preferred for build syst= ems other than =60=60setuptools=60=60::
++
++ =24 numpy-config --= cflags
++ -I/path/to/site-packages/numpy/=5Fcore/include
++
+= + =23 Or rely on pkg-config:
++ =24 export PKG=5FCON=46IG=5FPATH=3D=24= (numpy-config --pkgconfigdir)
++ =24 pkg-config --cflags
++ -I/pa= th/to/site-packages/numpy/=5Fcore/include
+
+ =22=22=22
+ imp= ort numpy
diff --git a/math/py-numpy1/files/patch-numpy=5Fmeson.build= b/math/py-numpy1/files/patch-numpy=5Fmeson.build
new file mode 10064= 4
index 000000000000..77cd8dd42fc0
--- /dev/null
+++ b/math/p= y-numpy1/files/patch-numpy=5Fmeson.build
=40=40 -0,0 +1,10 =40=40 +--- numpy/meson.build.orig 2024-02-05 21:17:48 UTC
++++ numpy/meson= .build
+=40=40 -215,6 +215,7 =40=40 python=5Fsources =3D =5B
+ '=5F= =5Finit=5F=5F.pxd',
+ '=5F=5Finit=5F=5F.py',
+ '=5F=5Finit=5F=5F.= pyi',
++ '=5Fconfigtool.py',
+ '=5Fdistributor=5Finit.py',
+ = '=5Fglobals.py',
+ '=5Fpytesttester.py',
diff --git a/math/py-num= py1/files/patch-numpy=5Ftests=5Ftest=5F=5Fconfigtool.py b/math/py-numpy1/= files/patch-numpy=5Ftests=5Ftest=5F=5Fconfigtool.py
new file mode 100= 644
index 000000000000..306e0f5f677b
--- /dev/null
+++ b/math= /py-numpy1/files/patch-numpy=5Ftests=5Ftest=5F=5Fconfigtool.py
=40=40= -0,0 +1,44 =40=40
+--- numpy/tests/test=5Fconfigtool.py.orig 2026-04= -04 00:20:07 UTC
++++ numpy/tests/test=5Fconfigtool.py
+=40=40 -0= ,0 +1,41 =40=40
++import os
++import subprocess
++import sysc= onfig
++
++import pytest
++import numpy as np
++
++ <= br>++is=5Feditable =3D not bool(np.=5F=5Fpath=5F=5F)
++numpy=5Fin=5Fs= itepackages =3D sysconfig.get=5Fpath('platlib') in np.=5F=5Ffile=5F=5F ++=23 We only expect to have a =60numpy-config=60 available if NumPy wa= s installed via
++=23 a build frontend (and not =60spin=60 for exampl= e)
++if not (numpy=5Fin=5Fsitepackages or is=5Feditable):
++ pyte= st.skip(=22=60numpy-config=60 not expected to be installed=22,
++ all= ow=5Fmodule=5Flevel=3DTrue)
++
++
++def check=5Fnumpyconfig(a= rg):
++ p =3D subprocess.run(=5B'numpy-config', arg=5D, capture=5Fout= put=3DTrue, text=3DTrue)
++ p.check=5Freturncode()
++ return p.st= dout.strip()
++
++
++def test=5Fconfigtool=5Fversion():
+= + stdout =3D check=5Fnumpyconfig('--version')
++ assert stdout =3D=3D= np.=5F=5Fversion=5F=5F
++
++
++def test=5Fconfigtool=5Fcflag= s():
++ stdout =3D check=5Fnumpyconfig('--cflags')
++ assert stdo= ut.endswith(os.path.join('numpy', 'core', 'include'))
++
++
+= +def test=5Fconfigtool=5Fpkgconfigdir():
++ stdout =3D check=5Fnumpyc= onfig('--pkgconfigdir')
++ assert stdout.endswith(os.path.join('numpy= ', 'core', 'lib', 'pkgconfig'))
++
++ if not is=5Feditable:
+= + =23 Also check that the .pc file actually exists (unless we're using an=
++ =23 editable install, then it'll be hiding in the build dir)
= ++ assert os.path.exists(os.path.join(stdout, 'numpy.pc'))
diff --git= a/math/py-numpy1/files/patch-pyproject.toml b/math/py-numpy1/files/patch= -pyproject.toml
new file mode 100644
index 000000000000..f26d7ee2= 83c7
--- /dev/null
+++ b/math/py-numpy1/files/patch-pyproject.tom= l
=40=40 -0,0 +1,21 =40=40
+--- pyproject.toml.orig 2024-02-05 21= :17:48 UTC
++++ pyproject.toml
+=40=40 -1,8 +1,8 =40=40 requires = =3D =5B
+ =5Bbuild-system=5D
+ build-backend =3D =22mesonpy=22 + requires =3D =5B
+- =22Cython>=3D0.29.34,<3.1=22,
+- =22= meson-python>=3D0.15.0,<0.16.0=22,
++ =22Cython>=3D0.29.34=22= ,
++ =22meson-python>=3D0.15.0=22,
+ =5D
+
+ =5Bprojec= t=5D
+=40=40 -43,6 +43,7 =40=40 f2py =3D 'numpy.f2py.f2py2e:main' +
+ =5Bproject.scripts=5D
+ f2py =3D 'numpy.f2py.f2py2e:main' ++numpy-config =3D 'numpy.=5Fconfigtool:main'
+
+ =5Bproject.en= try-points.array=5Fapi=5D
+ numpy =3D 'numpy.array=5Fapi'


--
Sincerely,
Dima (fluffy=40=46reeBSD.org, https= ://t.me/=46luffyBSD, =40fluffy:matrix-dev.freebsd.org)
(desktop, kde,= x11, office, ports-secteam)=40=46reeBSD team

--69d166f2_7545e146_b864--